1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-09 09:19:54 +00:00

improvements

This commit is contained in:
2025-08-30 00:25:48 +02:00
parent c7c3bff2d8
commit be17a801f8
3 changed files with 15 additions and 8 deletions

16
chat.go
View File

@@ -14,12 +14,13 @@ import (
)
type ToolCall struct {
ID string `json:"id"`
Name string `json:"name"`
Args string `json:"args"`
Result string `json:"result,omitempty"`
Done bool `json:"done,omitempty"`
Cost float64 `json:"cost,omitempty"`
ID string `json:"id"`
Name string `json:"name"`
Args string `json:"args"`
Result string `json:"result,omitempty"`
Done bool `json:"done,omitempty"`
Invalid bool `json:"invalid,omitempty"`
Cost float64 `json:"cost,omitempty"`
}
type TextFile struct {
@@ -323,7 +324,8 @@ func HandleChat(w http.ResponseWriter, r *http.Request) {
return
}
default:
return
tool.Invalid = true
tool.Result = "error: invalid tool call"
}
tool.Done = true