diff options
| author | T <t@tjp.lol> | 2026-04-26 11:09:37 -0600 |
|---|---|---|
| committer | T <t@tjp.lol> | 2026-05-25 11:48:47 -0700 |
| commit | 52b2ca78aed7950af27d4865aee65da781514a99 (patch) | |
| tree | 24f512e67afd677b6c0d8a8064819e8f5332d28d /libawl/src/agent.zig | |
| parent | d3d5a6295a67bdc99e35e5bfd77359d98a850c3f (diff) | |
Initial work, and name change to pantograph
Diffstat (limited to 'libawl/src/agent.zig')
| -rw-r--r-- | libawl/src/agent.zig | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libawl/src/agent.zig b/libawl/src/agent.zig new file mode 100644 index 0000000..7ebc058 --- /dev/null +++ b/libawl/src/agent.zig @@ -0,0 +1,23 @@ +const std = @import("std"); +const provider = @import("provider.zig"); +const conversation = @import("conversation.zig"); + +pub const Agent = struct { + provider: provider.Provider, + allocator: std.mem.Allocator, + + pub fn init(allocator: std.mem.Allocator, prov: provider.Provider) Agent { + return .{ + .provider = prov, + .allocator = allocator, + }; + } + + pub fn runStep(self: Agent, conv: *conversation.Conversation, receiver: *provider.Receiver) !void { + try self.provider.streamStep(conv, receiver); + } + + pub fn deinit(self: Agent) void { + self.provider.deinit(); + } +}; |
