75c67150d0
build / build (3.13) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build wheels (macos-aarch64) (push) Has been cancelled
release-please / build wheels (macos-x86_64) (push) Has been cancelled
release-please / build wheels (windows-x86_64) (push) Has been cancelled
release-please / build wheels (linux-aarch64) (push) Has been cancelled
release-please / build wheels (linux-x86_64) (push) Has been cancelled
release-please / build sdist (push) Has been cancelled
release-please / publish release artifacts (push) Has been cancelled
1.2 KiB
1.2 KiB
Grok (xAI) Integration
MemU supports Grok, the AI model from xAI, as a first-class LLM provider.
Prerequisites
- xAI Account: You need an active account with xAI.
- API Key: Obtain an API key from the xAI Console.
Configuration
To enable Grok, you need to set the XAI_API_KEY environment variable.
Environment Variable
export XAI_API_KEY="your-xai-api-key-here"
PowerShell:
$env:XAI_API_KEY="your-xai-api-key-here"
Usage
To use Grok as your LLM provider, switch the provider setting to grok. This can be done in your configuration file or when initializing the application.
Python Example
from memu.app.settings import LLMConfig
# Configure MemU to use Grok
config = LLMConfig(
provider="grok",
# The default API key env var is XAI_API_KEY
# The default model is grok-2-latest
)
print(f"Using provider: {config.provider}")
print(f"Base URL: {config.base_url}")
print(f"Chat Model: {config.chat_model}")
Models Supported
We currently support the following Grok models:
- grok-2-latest (Default)
The integration automatically sets the base URL to https://api.x.ai/v1.