ChatXAI
chat models. For detailed documentation of all ChatXAI
features and configurations head to the API reference.
Class | Package | Local | Serializable | PY support | Package downloads | Package latest |
---|---|---|---|---|---|---|
ChatXAI | @langchain/xai | ❌ | ✅ | ❌ |
Tool calling | Structured output | JSON mode | Image input | Audio input | Video input | Token-level streaming | Token usage | Logprobs |
---|---|---|---|---|---|---|---|---|
✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
ChatXAI
models you’ll need to create an xAI account, get an API key, and install the @langchain/xai
integration package.
XAI_API_KEY
environment variable:
ChatXAI
integration lives in the @langchain/xai
package: