GoogleConfig constructor
const
GoogleConfig({
- 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,
Implementation
const GoogleConfig({
required this.apiKey,
this.baseUrl = 'https://generativelanguage.googleapis.com/v1beta/',
this.model = 'gemini-1.5-flash',
this.maxTokens,
this.temperature,
this.systemPrompt,
this.timeout,
this.stream = false,
this.topP,
this.topK,
this.tools,
this.toolChoice,
this.jsonSchema,
this.reasoningEffort,
this.thinkingBudgetTokens,
this.includeThoughts,
this.enableImageGeneration,
this.responseModalities,
this.safetySettings,
this.maxInlineDataSize = 20 * 1024 * 1024, // 20MB default
this.candidateCount,
this.stopSequences,
this.embeddingTaskType,
this.embeddingTitle,
this.embeddingDimensions,
LLMConfig? originalConfig,
}) : _originalConfig = originalConfig;