diff options
| author | T <t@tjp.lol> | 2026-05-25 22:54:43 -0600 |
|---|---|---|
| committer | T <t@tjp.lol> | 2026-05-26 10:10:42 -0600 |
| commit | c2f727e188c1558bcc6b34569af2feab3b0366c0 (patch) | |
| tree | 24573b32e92cb45f998c24c304d2b060c6737b1f /libpanto/src/provider.zig | |
| parent | f026bb81ae68f516910d0eb4f23c9344dd36b62b (diff) | |
phase 3 part 1
Diffstat (limited to 'libpanto/src/provider.zig')
| -rw-r--r-- | libpanto/src/provider.zig | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/libpanto/src/provider.zig b/libpanto/src/provider.zig index 6d97bb7..177fc2f 100644 --- a/libpanto/src/provider.zig +++ b/libpanto/src/provider.zig @@ -1,6 +1,9 @@ const std = @import("std"); -const conversation = @import("conversation.zig"); + const config_mod = @import("config.zig"); +const conversation = @import("conversation.zig"); +const tool_registry_mod = @import("tool_registry.zig"); +pub const ToolRegistry = tool_registry_mod.ToolRegistry; pub const ContentBlockType = enum { Text, @@ -66,7 +69,12 @@ pub const Receiver = struct { }; pub const ProviderVTable = struct { - streamStep: *const fn (*anyopaque, *conversation.Conversation, *Receiver) anyerror!void, + streamStep: *const fn ( + *anyopaque, + *conversation.Conversation, + *const ToolRegistry, + *Receiver, + ) anyerror!void, deinit: *const fn (*anyopaque) void, }; @@ -103,8 +111,13 @@ pub const Provider = struct { } } - pub fn streamStep(self: Provider, conv: *conversation.Conversation, receiver: *Receiver) anyerror!void { - return self.vtable.streamStep(self.ptr, conv, receiver); + pub fn streamStep( + self: Provider, + conv: *conversation.Conversation, + tools: *const ToolRegistry, + receiver: *Receiver, + ) anyerror!void { + return self.vtable.streamStep(self.ptr, conv, tools, receiver); } pub fn deinit(self: Provider) void { |
