207 lines
4.9 KiB
JSON
207 lines
4.9 KiB
JSON
{
|
|
"model": "openai/gpt-4o",
|
|
"messages": [
|
|
{
|
|
"role": "user",
|
|
"content": "List all files in the directory C:\\Users\\zx\\Desktop\\polymech\\polymech-mono\\packages\\kbot\\tests\\unit\\test-data. Return the list as a JSON array of filenames."
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": "USER Preferences : # Preferences\r\n\r\nYou are a helpful AI assistant. When asked to perform calculations, you should return only the numerical result without any explanation or comments. "
|
|
}
|
|
],
|
|
"tools": [
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "list_files",
|
|
"description": "List all files in a directory",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"directory": {
|
|
"type": "string"
|
|
},
|
|
"pattern": {
|
|
"type": "string",
|
|
"optional": true
|
|
}
|
|
},
|
|
"required": [
|
|
"directory"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "read_files",
|
|
"description": "Reads files in a directory with a given pattern",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"directory": {
|
|
"type": "string"
|
|
},
|
|
"pattern": {
|
|
"type": "string",
|
|
"optional": true
|
|
}
|
|
},
|
|
"required": [
|
|
"directory"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "remove_file",
|
|
"description": "Remove a file at given path",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "rename_file",
|
|
"description": "Rename or move a file or directory",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"src": {
|
|
"type": "string"
|
|
},
|
|
"dst": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "modify_project_files",
|
|
"description": "Create or modify existing project files in one shot, preferably used for creating project structure)",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"files": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "base64 encoded string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"content"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"files"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "write_file",
|
|
"description": "Writes to a file, given a path and content (base64). No directory or file exists check needed!",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "base64 encoded string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"file"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "file_exists",
|
|
"description": "check if a file or folder exists",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"file"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "read_file",
|
|
"description": "read a file, at given a path",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"file"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"tool_choice": "auto",
|
|
"parallel_tool_calls": false
|
|
} |