Enha: models toolcall into answer
This commit is contained in:
@@ -11,6 +11,12 @@ type Answer struct {
|
|||||||
Answer string `json:"answer"`
|
Answer string `json:"answer"`
|
||||||
Model string `json:"model"`
|
Model string `json:"model"`
|
||||||
// resp time?
|
// resp time?
|
||||||
|
ToolCall ToolCall `json:"tool_call"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ToolCall struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Args map[string]ToolArgProps `json:"args"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// type OpenRouterResp struct {
|
// type OpenRouterResp struct {
|
||||||
|
2
tools.go
2
tools.go
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
func sendEmail(args map[string]string) []byte {
|
func sendEmail(args map[string]string) []byte {
|
||||||
logger.Info("send-email is used", "args", args)
|
logger.Info("send-email is used", "args", args)
|
||||||
return nil
|
return []byte("email was sent")
|
||||||
}
|
}
|
||||||
|
|
||||||
func getCurrentTimestamp(args map[string]string) []byte {
|
func getCurrentTimestamp(args map[string]string) []byte {
|
||||||
|
Reference in New Issue
Block a user