copyWith method

XAIConfig 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. StructuredOutputFormat? jsonSchema,
  13. String? embeddingEncodingFormat,
  14. int? embeddingDimensions,
  15. SearchParameters? searchParameters,
  16. bool? liveSearch,
})

Implementation

XAIConfig copyWith({
  String? apiKey,
  String? baseUrl,
  String? model,
  int? maxTokens,
  double? temperature,
  String? systemPrompt,
  Duration? timeout,
  double? topP,
  int? topK,
  List<Tool>? tools,
  ToolChoice? toolChoice,
  StructuredOutputFormat? jsonSchema,
  String? embeddingEncodingFormat,
  int? embeddingDimensions,
  SearchParameters? searchParameters,
  bool? liveSearch,
}) =>
    XAIConfig(
      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,
      jsonSchema: jsonSchema ?? this.jsonSchema,
      embeddingEncodingFormat:
          embeddingEncodingFormat ?? this.embeddingEncodingFormat,
      embeddingDimensions: embeddingDimensions ?? this.embeddingDimensions,
      searchParameters: searchParameters ?? this.searchParameters,
      liveSearch: liveSearch ?? this.liveSearch,
    );