View Source HyperLLM.Provider.XAI (hyper_llm v0.6.0)

Provider implementation for X.ai.

API Reference: X.ai API Reference

Configuration

config :hyper_llm,
  x_ai: [
    api_url: "https://api.x.ai/v1",
    api_key: "YOUR_API_KEY"
  ]

Summary

Functions

Check if a model is supported by the provider.

Functions

completion(params, config)

@spec completion(
  HyperLLM.Provider.completion_params(),
  HyperLLM.Provider.completion_config()
) ::
  {:ok, binary()} | {:error, binary()}

See HyperLLM.Chat.completion/3 for more information.

model_supported?(model)

Check if a model is supported by the provider.

Supported Models:

  • grok-vision-beta
  • grok-2-vision-1212
  • grok-2-vision
  • grok-2-vision-latest
  • grok-2-1212
  • grok-2
  • grok-2-latest
  • grok-beta