From 1f0915edbe0213e8bc134922f10933468d35a172 Mon Sep 17 00:00:00 2001 From: T Date: Tue, 26 May 2026 20:14:37 -0600 Subject: 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 --- libpanto/src/openai_chat_json.zig | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'libpanto/src/openai_chat_json.zig') 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, }; -- cgit v1.3