feat: support function call for ali (close #1242)

This commit is contained in:
JustSong
2024-03-30 10:43:26 +08:00
parent 5e81e19bc8
commit 2ba28c72cb
9 changed files with 74 additions and 40 deletions

View File

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