Skip to main content

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_url defaults to https://bridge.crynux-as.xyz/v1/llm.

  • vram_limit is the minimum GPU VRAM (in GB) required for the inference run. Default is 24.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_crynux-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_crynux-0.1.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file langchain_crynux-0.1.0.tar.gz.

File metadata

  • Download URL: langchain_crynux-0.1.0.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

Hashes for langchain_crynux-0.1.0.tar.gz
Algorithm Hash digest
SHA256 357c86b3ee4584b70dd510ee8faedde982596a28670544c5a8faede80c756673
MD5 398baa2b59f12f8c5f870c15e6a6c0b1
BLAKE2b-256 e4092f635c3a88174b621b702117a1d8272f1a9ef70977f1ac136969b4666bd0

See more details on using hashes here.

File details

Details for the file langchain_crynux-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_crynux-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c829ff95785562a175fb45f86c0d7c281a25d876d2f249b058f7adf3124faef0
MD5 b487e99c8a87a97d8cb7d2822a684c4f
BLAKE2b-256 862e896d09aa8af8d0143c99d3d85e05728bc41da211d867c8439dde1cce06f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page