copyWith method

OpenAIConfig copyWith({
  1. String? apiKey,
  2. String? baseUrl,
  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. ToolChoice? toolChoice,
  12. ReasoningEffort? reasoningEffort,
  13. StructuredOutputFormat? jsonSchema,
  14. String? voice,
  15. String? embeddingEncodingFormat,
  16. int? embeddingDimensions,
  17. List<String>? stopSequences,
  18. String? user,
  19. ServiceTier? serviceTier,
  20. bool? useResponsesAPI,
  21. String? previousResponseId,
  22. List<OpenAIBuiltInTool>? builtInTools,
})

Implementation

OpenAIConfig copyWith({
  String? apiKey,
  String? baseUrl,
  String? model,
  int? maxTokens,
  double? temperature,
  String? systemPrompt,
  Duration? timeout,
  double? topP,
  int? topK,
  List<Tool>? tools,
  ToolChoice? toolChoice,
  ReasoningEffort? reasoningEffort,
  StructuredOutputFormat? jsonSchema,
  String? voice,
  String? embeddingEncodingFormat,
  int? embeddingDimensions,
  List<String>? stopSequences,
  String? user,
  ServiceTier? serviceTier,
  bool? useResponsesAPI,
  String? previousResponseId,
  List<OpenAIBuiltInTool>? builtInTools,
}) =>
    OpenAIConfig(
      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,
      topP: topP ?? this.topP,
      topK: topK ?? this.topK,
      tools: tools ?? this.tools,
      toolChoice: toolChoice ?? this.toolChoice,
      reasoningEffort: reasoningEffort ?? this.reasoningEffort,
      jsonSchema: jsonSchema ?? this.jsonSchema,
      voice: voice ?? this.voice,
      embeddingEncodingFormat:
          embeddingEncodingFormat ?? this.embeddingEncodingFormat,
      embeddingDimensions: embeddingDimensions ?? this.embeddingDimensions,
      stopSequences: stopSequences ?? this.stopSequences,
      user: user ?? this.user,
      serviceTier: serviceTier ?? this.serviceTier,
      useResponsesAPI: useResponsesAPI ?? this.useResponsesAPI,
      previousResponseId: previousResponseId ?? this.previousResponseId,
      builtInTools: builtInTools ?? this.builtInTools,
    );