Skip to content

Instantly share code, notes, and snippets.

@davila7
Created April 22, 2025 22:06
Show Gist options
  • Select an option

  • Save davila7/39fd776e9981c9c050673916e103c548 to your computer and use it in GitHub Desktop.

Select an option

Save davila7/39fd776e9981c9c050673916e103c548 to your computer and use it in GitHub Desktop.
{
"name": "editFile",
"description": "Edits one or multiple files by replacing their content with the provided new content. Use this function to edit one or multiple files when the user has already asked for editing a file. The tasks array contains the files to edit.",
"parameters": {
"type": "object",
"properties": {
"tasks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The path of the file to edit."
},
"instruction": {
"type": "string",
"description": "A single sentence instruction describing what you are going to do for the sketched edit. This is used to assist the less intelligent model in applying the edit. Please use the first person to describe what you are going to do. Don’t repeat what you have said previously in normal messages. And use it to disambiguate uncertainty in the edit."
},
"codeEdit": {
"type": "string",
"description": "Specify ONLY the precise lines of code that you wish to edit. NEVER specify or write out unchanged code. Instead, represent all unchanged code using the comment of the language you're editing in - example: // ... existing code ..."
},
"language": {
"type": "string",
"description": "The language of the file to edit."
}
},
"required": [
"path",
"instruction",
"language",
"codeEdit"
]
}
}
},
"required": [
"tasks"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment