XAIConfig constructor

const XAIConfig({
  1. required String apiKey,
  2. String baseUrl = 'https://api.x.ai/v1/',
  3. String model = 'grok-3',
  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,
  17. LLMConfig? originalConfig,
})

Implementation

const XAIConfig({
  required this.apiKey,
  this.baseUrl = 'https://api.x.ai/v1/',
  this.model = 'grok-3',
  this.maxTokens,
  this.temperature,
  this.systemPrompt,
  this.timeout,
  this.topP,
  this.topK,
  this.tools,
  this.toolChoice,
  this.jsonSchema,
  this.embeddingEncodingFormat,
  this.embeddingDimensions,
  this.searchParameters,
  this.liveSearch,
  LLMConfig? originalConfig,
}) : _originalConfig = originalConfig;