OllamaProvider class
Provider for native Ollama API (local, not OpenAI-compatible).
- Inheritance
-
- Object
- Provider<
OllamaChatOptions, EmbeddingsModelOptions, MediaGenerationModelOptions> - OllamaProvider
Constructors
Properties
-
aliases
→ List<
String> -
Alternative names for lookup (e.g., 'claude' => 'anthropic').
finalinherited
- apiKey → String?
-
The API key for this provider.
finalinherited
- apiKeyName → String?
-
The environment variable for the API key (if any).
finalinherited
- baseUrl → Uri?
-
The default API endpoint for this provider.
finalinherited
-
defaultModelNames
→ Map<
ModelKind, String> -
The default model for this provider.
finalinherited
- displayName → String
-
Human-readable name for display.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
Custom HTTP headers to include with all API requests.
finalinherited
- name → String
-
The canonical provider name (e.g., 'openai', 'ollama').
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createChatModel(
{String? name, List< Tool< ? tools, double? temperature, bool enableThinking = false, OllamaChatOptions? options}) → ChatModel<Object> >OllamaChatOptions> -
Creates a chat model instance for this provider.
override
-
createEmbeddingsModel(
{String? name, EmbeddingsModelOptions? options}) → EmbeddingsModel< EmbeddingsModelOptions> -
Creates an embeddings model instance for this provider.
override
-
createMediaModel(
{String? name, List< Tool< ? tools, MediaGenerationModelOptions? options}) → MediaGenerationModel<Object> >MediaGenerationModelOptions> -
Creates a media generation model instance for this provider.
override
-
listModels(
) → Stream< ModelInfo> -
Returns all available models for this provider.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultBaseUrl → Uri
-
The default base URL to use unless another is specified.
final