From e8272efd9f71ad27a0e62b6b3fa3d13e99a6736f Mon Sep 17 00:00:00 2001 From: T Date: Mon, 25 May 2026 12:19:50 -0700 Subject: work --- libpanto/src/config.zig | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 libpanto/src/config.zig (limited to 'libpanto/src/config.zig') diff --git a/libpanto/src/config.zig b/libpanto/src/config.zig new file mode 100644 index 0000000..295f2c6 --- /dev/null +++ b/libpanto/src/config.zig @@ -0,0 +1,25 @@ +pub const APIStyle = enum { + anthropic, +}; + +pub const Config = struct { + api_style: APIStyle, + api_key: []const u8, + base_url: []const u8, + model: []const u8, +}; + +const t = @import("std").testing; + +test "Config - construct with all fields" { + const cfg = Config{ + .api_style = .anthropic, + .api_key = "sk-ant-test", + .base_url = "https://api.anthropic.com", + .model = "claude-sonnet-4-20250514", + }; + try t.expectEqual(APIStyle.anthropic, cfg.api_style); + try t.expectEqualStrings("sk-ant-test", cfg.api_key); + try t.expectEqualStrings("https://api.anthropic.com", cfg.base_url); + try t.expectEqualStrings("claude-sonnet-4-20250514", cfg.model); +} -- cgit v1.3