feat: support claude tool calling

This commit is contained in:
CalciumIon
2024-07-18 00:36:05 +08:00
parent 0f94ff47b5
commit 11fd993574
4 changed files with 128 additions and 39 deletions

View File

@@ -86,9 +86,11 @@ type ToolCall struct {
}
type FunctionCall struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Name string `json:"name,omitempty"`
// call function with arguments in JSON format
Arguments string `json:"arguments,omitempty"`
Parameters any `json:"parameters,omitempty"` // request
Arguments string `json:"arguments,omitempty"`
}
type ChatCompletionsStreamResponse struct {