Reject empty and truncated answers and expose complete tool calls
This commit is contained in:
1 parent
019a38f111
commit
3ca0994437
14 files changed
+278
-7
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user