mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-18 17:51:28 +00:00
feat: add support for Claude 3 tool use (function calling) (#1587)
* feat: add tool support for AWS & Claude * fix: add {} for openai compatibility in streaming tool_use
This commit is contained in:
@@ -2,13 +2,13 @@ package model
|
||||
|
||||
type Tool struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
Type string `json:"type"`
|
||||
Type string `json:"type,omitempty"` // when splicing claude tools stream messages, it is empty
|
||||
Function Function `json:"function"`
|
||||
}
|
||||
|
||||
type Function struct {
|
||||
Description string `json:"description,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Name string `json:"name,omitempty"` // when splicing claude tools stream messages, it is empty
|
||||
Parameters any `json:"parameters,omitempty"` // request
|
||||
Arguments any `json:"arguments,omitempty"` // response
|
||||
}
|
||||
|
Reference in New Issue
Block a user