AudioProviderFactory<T extends ChatCapability> class
abstract
Specialized base factory for audio-only providers
- Inheritance
-
- Object
- BaseProviderFactory<
T> - AudioProviderFactory
Constructors
Properties
- description → String
-
Get description of this provider
no setterinherited
- displayName → String
-
Get human-readable name for this provider
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- providerId → String
-
Unique identifier for this provider
no setterinherited
- requiresApiKey → bool
-
Whether this provider requires an API key
Override this for providers like Ollama that don't need API keys
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedCapabilities
→ Set<
LLMCapability> -
Set of capabilities this provider supports
no setteroverride
Methods
-
create(
LLMConfig config) → T -
Create a provider instance from the given configuration
inherited
-
createProviderSafely<
P> (LLMConfig config, P configFactory(), T providerFactory(P)) → T -
Helper method for creating provider instances with error handling
inherited
-
getAudioConfigMap(
LLMConfig config) → Map< String, dynamic> - Audio providers typically need voice-related extensions
-
getBaseConfigMap(
LLMConfig config) → Map< String, dynamic> -
Common configuration transformation for basic parameters
This handles the most common config fields that most providers use
inherited
-
getDefaultConfig(
) → LLMConfig -
Create default config with provider-specific defaults
Subclasses should override getProviderDefaults() to customize
inherited
-
getExtension<
E> (LLMConfig config, String key, [E? defaultValue]) → E? -
Helper method to safely get extensions with type checking
inherited
-
getProviderDefaults(
) → Map< String, dynamic> -
Provider-specific default values
Subclasses must implement this to provide their defaults
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateApiKey(
LLMConfig config) → bool -
Common API key validation
Most providers require an API key
inherited
-
validateConfig(
LLMConfig config) → bool -
Default validation that checks for API key presence
Override this method for providers with different requirements
inherited
-
validateConfigWithDetails(
LLMConfig config) → void -
Enhanced validation with detailed error messages
inherited
-
validateModelOnly(
LLMConfig config) → bool -
Validation for providers that don't require API key (like Ollama)
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited