copyWith method

OllamaConfig copyWith({
  1. String? baseUrl,
  2. String? apiKey,
  3. String? model,
  4. int? maxTokens,
  5. double? temperature,
  6. String? systemPrompt,
  7. Duration? timeout,
  8. double? topP,
  9. int? topK,
  10. List<Tool>? tools,
  11. StructuredOutputFormat? jsonSchema,
  12. int? numCtx,
  13. int? numGpu,
  14. int? numThread,
  15. bool? numa,
  16. int? numBatch,
  17. String? keepAlive,
  18. bool? raw,
  19. 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,
    );