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
@@ -20,7 +20,8 @@ func (p *outputLimitProvider) ChatStream(_ context.Context, r llm.ChatRequest) (
if p.fallback && len(p.limits) == 1 {
return nil, errors.New("529 overloaded")
}
ch := make(chan llm.ChatEvent, 1)
ch := make(chan llm.ChatEvent, 2)
ch <- llm.ChatEvent{Type: llm.EventTextDelta, Text: "Answer"}
ch <- llm.ChatEvent{Type: llm.EventDone}
close(ch)
return ch, nil