Documentation
¶
Overview ¶
Package provider defines Alaska's LLM provider abstraction. Concrete providers (Anthropic, OpenAI, OpenAI-compatible) live in subpackages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatRequest ¶
type ChatRequest struct {
Model string
System string
Messages []Message
MaxTokens int
Temperature float64
// ReasoningEffort maps to OpenAI's `reasoning_effort` ("minimal"/"low"/
// "medium"/"high") for o-series, gpt-5 and proxies that honour it.
// Empty string means "don't send the field".
ReasoningEffort string
}
type ModelInfo ¶
ModelCatalog is a curated list of models known to work with each provider type. Used by `/model` (interactive picker) and `alaska provider models`. Custom providers of type "openai" with a base_url get no default catalog — users list models via `alaska provider models <name>` which hits the remote /models endpoint.
func KnownModels ¶
KnownModels returns a static catalog for a provider type. Empty slice means "no known catalog — discover at runtime or let the user type the id".
type Provider ¶
type Provider interface {
Name() string
Stream(ctx context.Context, req ChatRequest) (<-chan StreamChunk, error)
}
type StreamChunk ¶
StreamChunk carries one piece of the provider's streaming response. Exactly one of Delta or Err is populated per chunk.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package anthropic implements the provider.Provider interface on top of the official anthropics/anthropic-sdk-go client.
|
Package anthropic implements the provider.Provider interface on top of the official anthropics/anthropic-sdk-go client. |
|
Package factory constructs a provider.Provider from a config entry + OS keyring.
|
Package factory constructs a provider.Provider from a config entry + OS keyring. |
|
Package openai implements the provider.Provider interface on top of the official openai/openai-go client.
|
Package openai implements the provider.Provider interface on top of the official openai/openai-go client. |