diff options
| author | T <t@tjp.lol> | 2026-05-25 12:19:50 -0700 |
|---|---|---|
| committer | T <t@tjp.lol> | 2026-05-25 12:39:24 -0700 |
| commit | e8272efd9f71ad27a0e62b6b3fa3d13e99a6736f (patch) | |
| tree | 16932c3f947aac908e15b77a71f9db3184e18a5c /libpanto/src/config.zig | |
| parent | 52b2ca78aed7950af27d4865aee65da781514a99 (diff) | |
work
Diffstat (limited to 'libpanto/src/config.zig')
| -rw-r--r-- | libpanto/src/config.zig | 25 |
1 files changed, 25 insertions, 0 deletions
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); +} |
