diff options
| author | T <t@tjp.lol> | 2026-05-26 20:14:37 -0600 |
|---|---|---|
| committer | T <t@tjp.lol> | 2026-05-27 06:26:36 -0600 |
| commit | 1f0915edbe0213e8bc134922f10933468d35a172 (patch) | |
| tree | 11834769555c7037f3393ef8d98bf5841846144a /libpanto/src/openai_chat_json.zig | |
| parent | b788eb05c6d194b91fdc141b6655e61ccaa76ddb (diff) | |
finish lua runtime makeover
- new multi-tool registration via ToolSource
- thread per source-or-standalone-tool
- switched to zig 0.16 Io threading interface
- cli: include `luv` package and run concurrent lua tools via libuv
- one single long-lived lua_State for the whole cli program
Diffstat (limited to 'libpanto/src/openai_chat_json.zig')
| -rw-r--r-- | libpanto/src/openai_chat_json.zig | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libpanto/src/openai_chat_json.zig b/libpanto/src/openai_chat_json.zig index 7ca9546..9531131 100644 --- a/libpanto/src/openai_chat_json.zig +++ b/libpanto/src/openai_chat_json.zig @@ -89,12 +89,12 @@ pub fn serializeRequest( try s.objectField("function"); try s.beginObject(); try s.objectField("name"); - try s.write(t.name); + try s.write(t.decl.name); try s.objectField("description"); - try s.write(t.description); + try s.write(t.decl.description); try s.objectField("parameters"); // Emit the tool's JSON Schema verbatim. - try writeRawJson(&s, t.schema_json); + try writeRawJson(&s, t.decl.schema_json); try s.endObject(); try s.endObject(); } @@ -580,9 +580,11 @@ fn makeStaticTool( schema: []const u8, ) tool_mod.Tool { return .{ - .name = name, - .description = description, - .schema_json = schema, + .decl = .{ + .name = name, + .description = description, + .schema_json = schema, + }, .ctx = &static_tool_ctx_sentinel, .vtable = &StaticToolVT.v, }; |
