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
View File
@@ -27,6 +27,8 @@ func (p *authoringProvider) ChatStream(_ context.Context, req llm.ChatRequest) (
ch <- llm.ChatEvent{Type: llm.EventToolCallDone, ToolCall: &llm.ToolCall{ID: "author", Name: "skill_manage", Input: json.RawMessage(`{"action":"create","name":"authored-skill","body":"---\ndescription: newly authored workflow\n---\nunique procedure body"}`)}}
case 2:
ch <- llm.ChatEvent{Type: llm.EventToolCallDone, ToolCall: &llm.ToolCall{ID: "load", Name: "load_skill", Input: json.RawMessage(`{"name":"authored-skill"}`)}}
default:
ch <- llm.ChatEvent{Type: llm.EventTextDelta, Text: "Skill created and loaded."}
}
ch <- llm.ChatEvent{Type: llm.EventDone}
close(ch)