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:
Mikey
2024-07-02 00:12:01 +08:00
committed by GitHub
parent 1ce1e529ee
commit 0fc07ea558
6 changed files with 168 additions and 14 deletions

View File

@@ -1,10 +1,11 @@
package model
type Message struct {
Role string `json:"role,omitempty"`
Content any `json:"content,omitempty"`
Name *string `json:"name,omitempty"`
ToolCalls []Tool `json:"tool_calls,omitempty"`
Role string `json:"role,omitempty"`
Content any `json:"content,omitempty"`
Name *string `json:"name,omitempty"`
ToolCalls []Tool `json:"tool_calls,omitempty"`
ToolCallId string `json:"tool_call_id,omitempty"`
}
func (m Message) IsStringContent() bool {