We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using Sonnet-3.5 with a tool similar to the file editor described here: https://www.anthropic.com/research/swe-bench-sonnet
I run into an issue where sometimes instead of returning an object as a key of the ToolUseBlock.input the client returns a string.
ToolUseBlock.input
Specifically, the string contains a python multiline string expression for the file editor content, original, or replacement payload.
content
original
replacement
So ToolUseBlock.input might look something like this:
'{"path": "path_to_file", "content": """This is some file content""", "message": "fix: file"}'
As shown in the referenced blog post, I'm prompting the model to pay attention to whitespace, which is why it might add the multiline string here.
The schema for my tool is the following:
{ "properties": { "command": { "type": "string", "enum": ["edit", "create", "delete", "undo"], "description": "Operation to perform on the file" }, "payload": { "type": "object", "description": """Command-specific parameters: - edit command requires: path, message, original, replacement - delete command requires: path, message - create command requires: path, message, content""", "properties": { "path": { "type": "string", "description": "Path to the file to operate on" }, "message": { "type": "string", "description": "Commit message for the operation" }, "content": { "type": "string", "description": "Content for file creation" }, "original": { "type": "string", "description": "Original text to replace when editing" }, "replacement": { "type": "string", "description": "New text to replace the original with when editing" } }, "enum": ["path", "message", "content", "original", "replacement"] } }, "required": ["command", "payload"], "type": "object" }
It would be great if this could be fixed.
Alternatively, any recommendations to avoid this by making changes to my prompt or tools?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using Sonnet-3.5 with a tool similar to the file editor described here: https://www.anthropic.com/research/swe-bench-sonnet
I run into an issue where sometimes instead of returning an object as a key of the
ToolUseBlock.input
the client returns a string.Specifically, the string contains a python multiline string expression for the file editor
content
,original
, orreplacement
payload.So
ToolUseBlock.input
might look something like this:As shown in the referenced blog post, I'm prompting the model to pay attention to whitespace, which is why it might add the multiline string here.
The schema for my tool is the following:
It would be great if this could be fixed.
Alternatively, any recommendations to avoid this by making changes to my prompt or tools?
The text was updated successfully, but these errors were encountered: