Skip to content

mattfreire/zig-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZigLLM

ZigLLM is a wrapper around LLM APIs such as OpenAI.

Simple and easy to use

ZigLLM aims to provide simple interfaces for common LLM APIs. For example, here's how you can use the OpenAI API:

Installation

Add it to your build.zig.zon file:

.{
    .name = "zig-example-use",
    .version = "0.0.1",
    .dependencies = .{
        .zig_llm = .{
            .url = "https://github.com/mattfreire/zig-llm/archive/refs/tags/v0.0.3.tar.gz",
            .hash = "1220145cd26ccbbf94dd8c23c4d66acc4fbf56cec2c876592000732ce6b7481278b9",
        },
    },
    .paths = .{""},
}

Example Usage

Check the example folder for how to use ZigLLM.

OpenAI Todos

  • Implement more endpoints from the OpenAI API
  • Handle streaming responses
  • Abstract system messages so they can be passed in
  • Write tests
  • Error handling

About

An llm wrapper for OpenAI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages