Documentation
¶
Overview ¶
Package xai provides preset configurations for xAI Grok models
Index ¶
Constants ¶
View Source
const APIKeyEnvVar = "XAI_API_KEY"
APIKeyEnvVar is the environment variable name for the xAI API key
View Source
const BaseURL = "https://api.x.ai/v1"
BaseURL is the API endpoint for xAI Grok models
Variables ¶
View Source
var Models = llm.CustomModels{ Reasoning: []string{ "grok-code-fast-1", "grok-4-0709", "grok-3-mini", }, NonReasoning: []string{ "grok-3", "grok-2-image-1212", }, }
Models defines the xAI Grok model categorization for reasoning and non-reasoning models
View Source
var Pricing = llm.CustomPricing{ "grok-code-fast-1": llm.ModelPricing{ Input: 0.0000002, Output: 0.0000015, ContextWindow: 256000, }, "grok-4-0709": llm.ModelPricing{ Input: 0.000003, Output: 0.000015, ContextWindow: 256000, }, "grok-3": llm.ModelPricing{ Input: 0.000003, Output: 0.000015, ContextWindow: 131072, }, "grok-3-mini": llm.ModelPricing{ Input: 0.0000003, Output: 0.0000005, ContextWindow: 131072, }, "grok-2-image-1212": llm.ModelPricing{ Input: 0, Output: 0.00007, ContextWindow: 32768, }, }
Pricing defines the pricing information for all xAI Grok models
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.