diff options
| author | Lucas Faria Mendes <dsn.lucas@proton.me> | 2026-02-19 17:53:40 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <dsn.lucas@proton.me> | 2026-02-19 17:53:40 +0000 |
| commit | 7775275046c956e8458921405ac257deeda86747 (patch) | |
| tree | 512b6236b8cdc3dff80a49e0fe0c794875682136 /src | |
| parent | 8b2818d1a237a12f54b3ef03f565642700d59a6d (diff) | |
| download | claude-zig-7775275046c956e8458921405ac257deeda86747.tar.gz claude-zig-7775275046c956e8458921405ac257deeda86747.zip | |
Add function definition for file reading and create shell environment setup
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.zig | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index 7f7c16a..89c0bc4 100644 --- a/src/main.zig +++ b/src/main.zig @@ -32,6 +32,41 @@ pub fn main() !void { .messages = &[_]struct { role: []const u8, content: []const u8 }{ .{ .role = "user", .content = prompt_str }, }, + .tools = &[_]struct { + type: []const u8, + function: struct { + name: []const u8, + description: []const u8, + parameters: struct { + type: []const u8, + properties: struct { + file_path: struct { + type: []const u8, + description: []const u8, + }, + }, + required: []const []const u8, + }, + }, + }{ + .{ + .type = "function", + .function = .{ + .name = "Read", + .description = "Read and return the contents of a file", + .parameters = .{ + .type = "object", + .properties = .{ + .file_path = .{ + .type = "string", + .description = "The path to the file to read", + }, + }, + .required = &[_][]const u8{"file_path"}, + }, + }, + }, + }, }); const body = body_out.written(); |