ProviderPreset class final
A provider the package knows how to reach: endpoint, protocol and a few suggested models. Users still bring their own API key.
Constructors
-
ProviderPreset({required String id, required String name, required ProviderProtocol protocol, required String baseUrl, required bool requiresApiKey, List<
String> suggestedModels = const [], StructuredOutputMode structuredOutput = StructuredOutputMode.jsonSchema, MaxTokensField maxTokensField = MaxTokensField.maxTokens, bool isLocal = false, String? apiKeyUrl, String? note}) -
const
Properties
- apiKeyUrl → String?
-
Where the user creates an API key.
final
- baseUrl → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
- isLocal → bool
-
Runs on the user's own machine or network (Ollama, LM Studio).
final
- maxTokensField → MaxTokensField
-
final
- name → String
-
final
- note → String?
-
One line of setup advice to show next to the preset.
final
- protocol → ProviderProtocol
-
final
- requiresApiKey → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- structuredOutput → StructuredOutputMode
-
final
-
suggestedModels
→ List<
String> -
Starting points only: model names change often, so offer the live list
from
RemoteLanguageModel.listModelstoo.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toConfig(
{required String id, String? model, String? name}) → ProviderConfig - A new user entry based on this preset.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited