LangChain
Installation
pip install -U langchain-openaiQuick Start
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="z-ai/glm-5.1",
base_url="https://api.tensorx.ai/v1",
api_key="your-tensorx-api-key",
)
response = llm.invoke("Hello, how are you?")
print(response.content)Configuration
Parameter
Value
Examples
Basic Chat
Streaming
Tool Calling
Structured Output
Async Usage
Available Models
Model
ID
Best For
Tips
Resources
Last updated
Was this helpful?

