copyWith method
OllamaConfig
copyWith({
- String? baseUrl,
- String? apiKey,
- String? model,
- int? maxTokens,
- double? temperature,
- String? systemPrompt,
- Duration? timeout,
- double? topP,
- int? topK,
- List<
Tool> ? tools, - StructuredOutputFormat? jsonSchema,
- int? numCtx,
- int? numGpu,
- int? numThread,
- bool? numa,
- int? numBatch,
- String? keepAlive,
- bool? raw,
- bool? reasoning,
Implementation
OllamaConfig copyWith({
String? baseUrl,
String? apiKey,
String? model,
int? maxTokens,
double? temperature,
String? systemPrompt,
Duration? timeout,
double? topP,
int? topK,
List<Tool>? tools,
StructuredOutputFormat? jsonSchema,
// Ollama-specific parameters
int? numCtx,
int? numGpu,
int? numThread,
bool? numa,
int? numBatch,
String? keepAlive,
bool? raw,
bool? reasoning,
}) =>
OllamaConfig(
baseUrl: baseUrl ?? this.baseUrl,
apiKey: apiKey ?? this.apiKey,
model: model ?? this.model,
maxTokens: maxTokens ?? this.maxTokens,
temperature: temperature ?? this.temperature,
systemPrompt: systemPrompt ?? this.systemPrompt,
timeout: timeout ?? this.timeout,
topP: topP ?? this.topP,
topK: topK ?? this.topK,
tools: tools ?? this.tools,
jsonSchema: jsonSchema ?? this.jsonSchema,
numCtx: numCtx ?? this.numCtx,
numGpu: numGpu ?? this.numGpu,
numThread: numThread ?? this.numThread,
numa: numa ?? this.numa,
numBatch: numBatch ?? this.numBatch,
keepAlive: keepAlive ?? this.keepAlive,
raw: raw ?? this.raw,
reasoning: reasoning ?? this.reasoning,
);