gollm

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

README

Scitrera LLM for Go

Provider-neutral LLM contracts and an HTTP client for Go, in one module:

Package Import path What it is
protocol github.com/scitrera/go-llm/protocol Request, response, streaming and usage types, translation codecs for five provider wire formats, and an embedding-codec registry
protocol/codec github.com/scitrera/go-llm/protocol/codec The codecs themselves: OpenAI Chat Completions and Responses, Anthropic Messages, Gemini GenerateContent, Amazon Bedrock Converse
client github.com/scitrera/go-llm/client Buffered and streaming execution over those types: backend configuration, retries, liveness deadlines, SigV4, Bedrock event-stream framing
auth github.com/scitrera/go-llm/auth Provider-neutral renewable credential and host-owned storage contracts
auth/openai github.com/scitrera/go-llm/auth/openai OpenAI subscription OAuth, token refresh, account continuity, and request authentication
provider/openai github.com/scitrera/go-llm/provider/openai The ChatGPT subscription backend and Responses request profile
go get github.com/scitrera/go-llm@latest

Authentication follows the same ownership boundary as AWS credential resolution: go-llm implements provider mechanics and the client.Authenticator contract, while the host chooses login UX and supplies an auth.Store. Dynamic authenticators may additionally implement client.UnauthorizedRecoverer; the client then performs one credential recovery and one replay after HTTP 401 for buffered, embedding, and pre-event streaming requests.

Versioning

versions.yaml is authoritative; sync-versions propagates the number to version.go, and the release workflow refuses a tag that disagrees with it. While below v1, a breaking exported-contract change increments the minor version.

License

Apache-2.0. See LICENSE and NOTICE.

Documentation

Overview

Package gollm is the root of a module holding two packages that are released together: github.com/scitrera/go-llm/protocol, the provider-neutral LLM request, response, streaming and translation contracts, and github.com/scitrera/go-llm/client, a buffered and streaming HTTP client built on them. Neither depends on anything outside the standard library.

This package itself declares only the module version.

Index

Constants

View Source
const Version = "0.3.0"

Version is the released version of this module, covering both the protocol and client packages. Kept in sync with versions.yaml by `sync-versions`, and checked against the release tag before a tag is published.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package llmauth defines provider-neutral credential storage contracts.
Package llmauth defines provider-neutral credential storage contracts.
openai
Package openaiauth implements renewable ChatGPT subscription OAuth credentials.
Package openaiauth implements renewable ChatGPT subscription OAuth credentials.
Package llmclient provides provider-neutral buffered and streaming HTTP execution without importing gateway or agent-runtime concerns.
Package llmclient provides provider-neutral buffered and streaming HTTP execution without importing gateway or agent-runtime concerns.
Package llmprotocol defines provider-neutral LLM request, response, and streaming contracts.
Package llmprotocol defines provider-neutral LLM request, response, and streaming contracts.
codec
Package codec translates provider wire formats through llmprotocol's neutral representation.
Package codec translates provider wire formats through llmprotocol's neutral representation.
provider
openai
Package openaiprovider contains OpenAI-specific request profiles that sit alongside go-llm's provider-neutral client and protocol packages.
Package openaiprovider contains OpenAI-specific request profiles that sit alongside go-llm's provider-neutral client and protocol packages.

Jump to

Keyboard shortcuts

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