Reject empty and truncated answers and expose complete tool calls

This commit is contained in:
sausheong committed 2026-09-11 23:48:25 +08:00
1 parent 019a38f111
commit 3ca0994437
14 files changed
+278 -7

No files matched your search

+2 -1
View File
@@ -24,7 +24,8 @@ func (p *attachmentReplayProvider) ChatStream(_ context.Context, req llm.ChatReq
for _, msg := range req.Messages {
p.images = append(p.images, msg.Images...)
}
events := make(chan llm.ChatEvent, 1)
events := make(chan llm.ChatEvent, 2)
events <- llm.ChatEvent{Type: llm.EventTextDelta, Text: "Answer"}
events <- llm.ChatEvent{Type: llm.EventDone}
close(events)
return events, nil