Integration with LangChain & LangGraph
Method 1: Using langchain-crynux (Recommended)
langchain-crynux (Recommended)Installation
pip install langchain-crynuxUsage
import os
from langchain_crynux import ChatCrynux
# You can set the API key in the environment variable
# os.environ["OPENAI_API_KEY"] = "your-api-key"
chat = ChatCrynux(
base_url="https://bridge.crynux.io/v1/llm",
model="Qwen/Qwen2.5-7B-Instruct",
vram_limit=24, # Specify the required VRAM in GB
# api_key="your-api-key", # Or pass it directly
)
response = chat.invoke("Hello, introduce yourself.")
print(response.content)Method 2: Using langchain-openai
langchain-openaiInstallation
Usage
Using with LangGraph
Installation
Example
Last updated