Documentation
¶
Overview ¶
Package ollama is the v1 ai://embed backend: a local, keyless Ollama instance (https://ollama.com) speaking its /api/embed endpoint.
It is the developer/offline default — `nomic-embed-text` (768-dim) over http://localhost:11434 needs no API key, so embedding works out of the box in `txco dev` and for offline catalog work. The OpenAI-direct backend (which needs OPENAI_KEY) is a follow-up for deployments where a local Ollama isn't reachable.
The backend self-registers in init() under the name "ollama"; the chassis activates it with a blank import.
**Task prefixes.** nomic-embed-text expects `search_document:` / `search_query:` prefixes for best retrieval quality. That is a per-call, author-visible decision: the txcl author prepends the prefix in the WITH value (e.g. `WITH text = &concat("search_query: ", @web.req.body)`). The backend stays dumb and embeds exactly what it is given.