pantry.rs
Rust library for the pantry llm runner.
Read the documentation at docs.rs
Usage
The API connects to your local pantry installation, so you need to download pantry first. Client library for the Pantry LLM API.
Example
It's strongly recommended that you use PantryClient and LLMSession, which are a higher level wrapper around PantryAPI.
let perms = UserPermissions ;
let pantry = register.await.unwrap;
// Pause here and use the UI to accept the permission request.
// The empty hashmap means we just use default parameters.
// create_session just uses the best currently running LLM. use create_session_id or _flex for
// more finegrained control
let sess = pantry.create_session.await.unwrap;
let recv = ses.prompt_session.await.unwrap;
If you aren't already running an LLM from the ui, you can use
pantry.load_llm_flex.await.unwrap;
If you want to use your existing ggml infrastructure, you can get a bare model path
let = pantry.bare_model_flex.await.unwrap;