feat: 注册 git_status, git_diff, git_commit 工具定义
This commit is contained in:
parent
cbbb7d399d
commit
a41c4f3d08
@ -127,4 +127,39 @@ var FileTools = []openai.Tool{
|
||||
}`,
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: openai.ToolTypeFunction,
|
||||
Function: &openai.FunctionDefinition{
|
||||
Name: "git_status",
|
||||
Description: "查看 Git 工作区状态",
|
||||
Parameters: `{"type": "object", "properties": {}}`,
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: openai.ToolTypeFunction,
|
||||
Function: &openai.FunctionDefinition{
|
||||
Name: "git_diff",
|
||||
Description: "查看文件变更",
|
||||
Parameters: `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"filename": {"type": "string", "description": "文件名"}
|
||||
}
|
||||
}`,
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: openai.ToolTypeFunction,
|
||||
Function: &openai.FunctionDefinition{
|
||||
Name: "git_commit",
|
||||
Description: "提交更改",
|
||||
Parameters: `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {"type": "string", "description": "提交信息"}
|
||||
},
|
||||
"required": ["message"]
|
||||
}`,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user