The article also provides a detailed guide on how to use the library, including how to start a server, issue requests, and extract structured data from strings. It also explains how to map the extracted result onto an arbitrary struct. The library's API may change over time as new features are implemented. The article concludes with a mention of a related project, a llama.cpp load balancer, supervisor, and request queue, and an invitation to join the community on Discord.
Key takeaways:
- The project is a Go conversion of a general-purpose library, featuring a language-agnostic HTTP server that can be set up in front of llama.cpp.
- It is model agnostic and can map data from arbitrary JSON schema to arbitrary Go struct or plain JSON.
- The HTTP API allows you to start a server and point it to your local llama.cpp instance, issue requests, and receive responses in JSON matching your schema.
- Programmatic usage of the API includes initializing the mapper, extracting structured data from string, and mapping extracted result onto an arbitrary struct.