diff options
| author | t <t@tjp.lol> | 2026-06-02 10:50:05 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-02 11:11:29 -0600 |
| commit | 16ea45b6854232541fb45f7d2e5b767118cccf43 (patch) | |
| tree | 1bf37d766e4b9de2b646c1475497ae7e9d5699c7 /libpanto/src/openai_chat_json.zig | |
| parent | 9c64a7d4462a11674e2dea481b037b5f5d9c62fc (diff) | |
tool call resiliency
Diffstat (limited to 'libpanto/src/openai_chat_json.zig')
| -rw-r--r-- | libpanto/src/openai_chat_json.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libpanto/src/openai_chat_json.zig b/libpanto/src/openai_chat_json.zig index 3b81c41..8e6c9be 100644 --- a/libpanto/src/openai_chat_json.zig +++ b/libpanto/src/openai_chat_json.zig @@ -91,6 +91,9 @@ pub fn serializeRequest( try s.objectField("stream"); try s.write(true); + try s.objectField("max_tokens"); + try s.write(cfg.max_tokens); + // Ask for the final-chunk usage block. Without this the server // sends `usage: null` and we can't stamp token counts on the // session log. Most OpenAI-compatible proxies accept this; ones |
