langchain/libs/partners/xai
2025-07-10 11:06:37 -04:00
..
langchain_xai docs(xai): update for Grok 4 (#31953) 2025-07-10 11:06:37 -04:00
scripts
tests docs(xai): update for Grok 4 (#31953) 2025-07-10 11:06:37 -04:00
LICENSE
Makefile fix: automatically fix issues with ruff (#31897) 2025-07-07 14:13:10 -04:00
pyproject.toml ruff: more rules across the board & fixes (#31898) 2025-07-07 17:48:01 -04:00
README.md
uv.lock standard-tests: add benchmarks (#31302) 2025-05-29 15:21:37 +00:00

langchain-xai

This package contains the LangChain integrations for xAI through their APIs.

Installation and Setup

  • Install the LangChain partner package
pip install -U langchain-xai
  • Get your xAI api key from the xAI Dashboard and set it as an environment variable (XAI_API_KEY)

Chat Completions

This package contains the ChatXAI class, which is the recommended way to interface with xAI chat models.