LangChain ChatOpenAI wrapper for Crynux.
Project description
langchain-crynux
Drop-in replacement for langchain-openai ChatOpenAI that lets existing OpenAI-compatible LLM code run on the Crynux network without changes.
Installation
pip install langchain-crynux
Dependencies:
- langchain-openai>=1.0.1
Usage
import os
from langchain_crynux import ChatCrynux
# Option 1: environment variable (same as langchain-openai)
os.environ["OPENAI_API_KEY"] = "your-api-key"
chat = ChatCrynux(
base_url="https://bridge.crynux-as.xyz/v1/llm",
model="Qwen/Qwen-2.5-7B-Instruct",
vram_limit=24,
# Option 2: pass api_key directly
# api_key="your-api-key",
)
response = chat.invoke("Hello from Crynux.")
print(response.content)
-
base_urldefaults tohttps://bridge.crynux-as.xyz/v1/llm. -
vram_limitis the minimum GPU VRAM (in GB) required for the inference run. Default is 24.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_crynux-0.1.1.tar.gz.
File metadata
- Download URL: langchain_crynux-0.1.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f7d1b5270fb0a9aeab3cd474a6257d9b5fd3cb9058233aecd47aa563602db22
|
|
| MD5 |
de94701a744b44959fe48a6af34a5bf0
|
|
| BLAKE2b-256 |
8535dbe8a294561976a0bb123ebaf0d084a4c78c437ee2a43f4b067735c07fed
|
File details
Details for the file langchain_crynux-0.1.1-py3-none-any.whl.
File metadata
- Download URL: langchain_crynux-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19b7f7d35637b964aeecafe7a8bca9981b76aaceb2a79adac3fc5d5fe30ed327
|
|
| MD5 |
cb7b5403457e03d791b5ae63f4a91521
|
|
| BLAKE2b-256 |
a06fed3a4f3d5ecf6de182dd3df71d71687d9b78a9f8a5e02dce3155ad35451e
|