copyWith method
Create a new provider with updated configuration
Implementation
PhindProvider 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,
}) {
final newConfig = config.copyWith(
apiKey: apiKey,
baseUrl: baseUrl,
model: model,
maxTokens: maxTokens,
temperature: temperature,
systemPrompt: systemPrompt,
timeout: timeout,
topP: topP,
topK: topK,
tools: tools,
toolChoice: toolChoice,
);
return PhindProvider(newConfig);
}