GoogleConfig class
Google (Gemini) provider configuration
This class contains all configuration options for the Google providers. It's extracted from the main provider to improve modularity and reusability.
Constructors
-
GoogleConfig.new({required String apiKey, String baseUrl = 'https://generativelanguage.googleapis.com/v1beta/', String model = 'gemini-1.5-flash', int? maxTokens, double? temperature, String? systemPrompt, Duration? timeout, bool stream = false, double? topP, int? topK, List<
Tool> ? tools, ToolChoice? toolChoice, StructuredOutputFormat? jsonSchema, ReasoningEffort? reasoningEffort, int? thinkingBudgetTokens, bool? includeThoughts, bool? enableImageGeneration, List<String> ? responseModalities, List<SafetySetting> ? safetySettings, int maxInlineDataSize = 20 * 1024 * 1024, int? candidateCount, List<String> ? stopSequences, String? embeddingTaskType, String? embeddingTitle, int? embeddingDimensions, LLMConfig? originalConfig}) -
const
- GoogleConfig.fromLLMConfig(LLMConfig config)
-
Create GoogleConfig from unified LLMConfig
factory
Properties
- apiKey → String
-
final
- baseUrl → String
-
final
- candidateCount → int?
-
final
- embeddingDimensions → int?
-
final
- embeddingTaskType → String?
-
final
- embeddingTitle → String?
-
final
- enableImageGeneration → bool?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeThoughts → bool?
-
final
- jsonSchema → StructuredOutputFormat?
-
final
- maxInlineDataSize → int
-
final
- maxTokens → int?
-
final
- model → String
-
final
- originalConfig → LLMConfig?
-
Get the original LLMConfig for HTTP configuration
no setter
- reasoningEffort → ReasoningEffort?
-
final
-
responseModalities
→ List<
String> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
safetySettings
→ List<
SafetySetting> ? -
final
-
stopSequences
→ List<
String> ? -
final
- stream → bool
-
final
- supportsEmbeddings → bool
-
Check if this model supports embeddings
no setter
- supportsImageGeneration → bool
-
Check if this model supports image generation
no setter
- supportsReasoning → bool
-
Check if this model supports reasoning/thinking
no setter
- supportsToolCalling → bool
-
Check if this model supports tool calling
no setter
- supportsTTS → bool
-
Check if this model supports text-to-speech
no setter
- supportsVision → bool
-
Check if this model supports vision
no setter
- systemPrompt → String?
-
final
- temperature → double?
-
final
- thinkingBudgetTokens → int?
-
final
- timeout → Duration?
-
final
- toolChoice → ToolChoice?
-
final
-
tools
→ List<
Tool> ? -
final
- topK → int?
-
final
- topP → double?
-
final
Methods
-
copyWith(
{String? apiKey, String? baseUrl, String? model, int? maxTokens, double? temperature, String? systemPrompt, Duration? timeout, bool? stream, double? topP, int? topK, List< Tool> ? tools, ToolChoice? toolChoice, StructuredOutputFormat? jsonSchema, ReasoningEffort? reasoningEffort, int? thinkingBudgetTokens, bool? includeThoughts, bool? enableImageGeneration, List<String> ? responseModalities, List<SafetySetting> ? safetySettings, int? maxInlineDataSize, int? candidateCount, List<String> ? stopSequences, String? embeddingTaskType, String? embeddingTitle, int? embeddingDimensions}) → GoogleConfig -
getExtension<
T> (String key) → T? - Get extension value from original config
-
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
-
defaultSafetySettings
→ List<
SafetySetting> -
Get default safety settings (permissive for development)
no setter