mirror of
https://github.com/coalaura/whiskr.git
synced 2025-12-02 20:22:52 +00:00
tweaks
This commit is contained in:
4
chat.go
4
chat.go
@@ -276,6 +276,8 @@ func HandleChat(w http.ResponseWriter, r *http.Request) {
|
||||
for iteration := range raw.Iterations {
|
||||
debug("iteration %d of %d", iteration+1, raw.Iterations)
|
||||
|
||||
response.Send(StartChunk())
|
||||
|
||||
if len(request.Tools) > 0 && iteration == raw.Iterations-1 {
|
||||
debug("no more tool calls")
|
||||
|
||||
@@ -341,6 +343,8 @@ func HandleChat(w http.ResponseWriter, r *http.Request) {
|
||||
tool.AsAssistantToolCall(message),
|
||||
tool.AsToolMessage(),
|
||||
)
|
||||
|
||||
response.Send(EndChunk())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user