copyWith method
GoogleConfig
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,
Implementation
GoogleConfig 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(
apiKey: apiKey ?? this.apiKey,
baseUrl: baseUrl ?? this.baseUrl,
model: model ?? this.model,
maxTokens: maxTokens ?? this.maxTokens,
temperature: temperature ?? this.temperature,
systemPrompt: systemPrompt ?? this.systemPrompt,
timeout: timeout ?? this.timeout,
stream: stream ?? this.stream,
topP: topP ?? this.topP,
topK: topK ?? this.topK,
tools: tools ?? this.tools,
toolChoice: toolChoice ?? this.toolChoice,
jsonSchema: jsonSchema ?? this.jsonSchema,
reasoningEffort: reasoningEffort ?? this.reasoningEffort,
thinkingBudgetTokens: thinkingBudgetTokens ?? this.thinkingBudgetTokens,
includeThoughts: includeThoughts ?? this.includeThoughts,
enableImageGeneration:
enableImageGeneration ?? this.enableImageGeneration,
responseModalities: responseModalities ?? this.responseModalities,
safetySettings: safetySettings ?? this.safetySettings,
maxInlineDataSize: maxInlineDataSize ?? this.maxInlineDataSize,
candidateCount: candidateCount ?? this.candidateCount,
stopSequences: stopSequences ?? this.stopSequences,
embeddingTaskType: embeddingTaskType ?? this.embeddingTaskType,
embeddingTitle: embeddingTitle ?? this.embeddingTitle,
embeddingDimensions: embeddingDimensions ?? this.embeddingDimensions,
);