Documentation
¶
Index ¶
- Constants
- func IsModelSupported(model string) bool
- func Models() []string
- func New(cfg config.ProviderConfig) (provider.Provider, error)
- type Client
- func (c *Client) ContextWindow(model string) int
- func (c *Client) DefaultModel() string
- func (c *Client) EstimateTokens(s string) int
- func (c *Client) Name() string
- func (c *Client) Pricing(model string) provider.Pricing
- func (c *Client) Review(ctx context.Context, req provider.Request) (provider.Response, error)
- func (c *Client) ReviewStream(ctx context.Context, req provider.Request) (<-chan provider.Event, error)
- func (c *Client) TestConnection(ctx context.Context) error
Constants ¶
View Source
const ( Name = "ollama" // DefaultModel is the placeholder model name used when the caller has // not configured one. Ollama installs are user-specific (models must // be pulled locally with `ollama pull`); the setup wizard discovers // the actual list via /api/tags. We keep a common default name so // out-of-the-box TestConnection gives a recognizable error if absent. DefaultModel = "qwen2.5-coder:14b" )
View Source
const (
DefaultBaseURL = "http://localhost:11434"
)
Variables ¶
This section is empty.
Functions ¶
func IsModelSupported ¶
IsModelSupported is intentionally permissive: Ollama accepts any model tag the user has pulled, so the only invalid input is the empty string.
func Models ¶
func Models() []string
Models returns a small list of known-popular Ollama models for setup- wizard suggestions when /api/tags discovery fails (offline / first run). The authoritative list is whatever `ollama list` reports on the user's machine; the wizard falls back to free-text entry when needed.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ContextWindow ¶
func (*Client) DefaultModel ¶
func (*Client) EstimateTokens ¶
func (*Client) ReviewStream ¶
Click to show internal directories.
Click to hide internal directories.