XAIConfig constructor
const
XAIConfig({
- required String apiKey,
- String baseUrl = 'https://api.x.ai/v1/',
- String model = 'grok-3',
- 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,
- 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;