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

14
relay/model/tool.go Normal file
View File

@@ -0,0 +1,14 @@
package model
type Tool struct {
Id string `json:"id,omitempty"`
Type string `json:"type"`
Function Function `json:"function"`
}
type Function struct {
Description string `json:"description,omitempty"`
Name string `json:"name"`
Parameters any `json:"parameters,omitempty"` // request
Arguments any `json:"arguments,omitempty"` // response
}