Expand description
The seam between cerno and whatever runs the model.
A host knows nothing about Noul, Choice or Score beyond the Shape of what was offered,
which only a host that takes questions rather than prompts reads. It answers exactly one
question: given a prompt, what is the probability distribution over the first token the
model would generate? All primitive logic lives in cerno-core and therefore holds for every
host equally.
Three adapters cover the runtimes: OllamaHost for Ollama’s native API,
OpenAiCompatHost for everything speaking /v1/chat/completions, and SystemOneHost
for Ollama’s /v1/systemone, which writes its own prompt for its decision models. connect
picks one from a HostKind; for HostKind::Ollama it builds an OllamaRouter over
the two Ollama adapters, which sends each model to the endpoint made for it.
Structs§
- First
Token Distribution - The distribution over the first generated token.
- First
Token Request - One prompt, one token, full distribution.
- Host
Capabilities - What a host can and cannot do.
cerno-corereads this to size its label alphabet. - Offer
- What the model was asked, before it was rendered into a prompt.
- Ollama
Host - Ollama
Router - Open
AiCompat Host - System
OneHost - Unknown
Host Kind
Enums§
- Flavour
- Which OpenAI-compatible runtime is on the other end.
- Host
Error - Host
Kind - Which runtime a server talks to. One per process.
- Shape
- How the offered options relate to each other.
Traits§
Functions§
- connect
- Build the adapter for
kind. Ollama takes no API key; the others send it as a bearer token.