copyWith method
Creates a copy with modified fields.
Implementation
AIConfig copyWith({
String? apiKey,
String? model,
int? maxTokens,
double? temperature,
double? topP,
String? baseUrl,
Duration? timeout,
String? systemPrompt,
Map<String, dynamic>? extraParams,
int? maxAttachmentBytes,
}) {
return AIConfig(
apiKey: apiKey ?? this.apiKey,
model: model ?? this.model,
maxTokens: maxTokens ?? this.maxTokens,
temperature: temperature ?? this.temperature,
topP: topP ?? this.topP,
baseUrl: baseUrl ?? this.baseUrl,
timeout: timeout ?? this.timeout,
systemPrompt: systemPrompt ?? this.systemPrompt,
extraParams: extraParams ?? this.extraParams,
maxAttachmentBytes: maxAttachmentBytes ?? this.maxAttachmentBytes,
);
}