LangChain

LangGraph

LangChain's graph framework for agents. Models come from LangChain, so it is one base_url.

Step by step

01
Install
pip install langgraph langchain-openai
02
Build the model
ChatOpenAI(model, base_url, api_key) below.
03
Wire the graph
Pass the model to your nodes.
Protocol
OpenAI Chat Completions
Configured in
ChatOpenAI base_url
Base URL
https://api.luxechain.si/v1

Copy this

langgraph
from langchain_openai import ChatOpenAI

model = ChatOpenAI(
    model="YOUR_MODEL_ID",                 # any model id from the /models page
    base_url="https://api.luxechain.si/v1",
    api_key="lxc_live_YOUR_KEY",
)
The keyword is base_url (alias openai_api_base). LangGraph itself has no model layer.

← All tools Get tokens