Files
go-llm/README.md
T

1.3 KiB

go-llm

Go library for chat LLM calls. One client speaks either the Ollama native protocol or an OpenAI-compatible protocol. Callers pass messages. The library does not load files or build product prompts.

Import: gitea.neitzel.de/konrad/go-llm (package gollm).

go get gitea.neitzel.de/konrad/go-llm

Included

  • Adapters — Ollama native and OpenAI-compatible
  • Chat — one assistant reply, including temperature and max tokens
  • Stream — the same call, delivered as text chunks
  • List Models — names the server reports

Excluded

  • Embeddings, tools, and raw generate
  • Nextcloud types and story types

Testing

Unit tests use httptest. No live model server is required.

go test ./... fails when docs/api.md does not match the exported API. Regenerate it with:

UPDATE_API_DOCS=1 go test -run TestAPIDoc -count=1
  • Tales — ExApp that consumes this library
  • Workspace ADR docs/adr/go-llm/0001-native-adapters.md
  • Workspace ADR docs/adr/go-llm/0002-wire-only.md