ollama

package
v0.2.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2026 License: MPL-2.0 Imports: 11 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL