Documentation
¶
Index ¶
- Constants
- func Available() bool
- func BaseURL() string
- func DefaultOptions() []llm.Option
- type Provider
- func (p *Provider) CreateStream(ctx context.Context, src llm.Buildable) (llm.Stream, error)
- func (p *Provider) Download(ctx context.Context, models []llm.Model) error
- func (p *Provider) FetchModels(ctx context.Context) ([]llm.Model, error)
- func (p *Provider) Models() llm.Models
- func (p *Provider) Name() string
- func (p *Provider) Resolve(modelID string) (llm.Model, error)
Constants ¶
View Source
const ( ModelGLM47Flash = "glm-4.7-flash" ModelMinistral38B = "ministral-3:8b" ModelRNJ1 = "rnj-1" ModelFunctionGemma = "functiongemma" ModelDevstralSmall2 = "devstral-small-2" ModelNemotron3Nano30 = "nemotron-3-nano:30b" ModelLlama321B = "llama3.2:1b" ModelQwen317B = "qwen3:1.7b" ModelQwen306B = "qwen3:0.6b" ModelGranite31MoE1B = "granite3.1-moe:1b" ModelQwen2505B = "qwen2.5:0.5b" ModelLlama32 = "llama3.2" ModelLlama31 = "llama3.1" ModelQwen25 = "qwen2.5" ModelPhi3 = "phi3" ModelDeepSeekR1 = "deepseek-r1" ModelMistral = "mistral" ModelGemma3 = "gemma3" ModelDefault = ModelGLM47Flash )
View Source
const EnvOllamaHost = "OLLAMA_HOST"
EnvOllamaHost is the environment variable that overrides the Ollama base URL. Set it to signal that Ollama is available for auto-detection:
export OLLAMA_HOST=http://localhost:11434
Variables ¶
This section is empty.
Functions ¶
func Available ¶ added in v0.40.0
func Available() bool
Available reports whether an Ollama server is reachable.
It returns true immediately when OLLAMA_HOST is set (explicit configuration). Otherwise it probes http://localhost:11434 with a 200 ms timeout, which is negligible on the loopback interface when Ollama is running locally.
func BaseURL ¶ added in v0.40.0
func BaseURL() string
BaseURL returns the effective Ollama base URL. Returns the value of OLLAMA_HOST if set, otherwise http://localhost:11434.
func DefaultOptions ¶ added in v0.12.0
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) CreateStream ¶
func (*Provider) FetchModels ¶
Click to show internal directories.
Click to hide internal directories.