Lyber
Request access
DocsLangChain

Integrations

Markdown

LangChain

Use Lyber models in LangChain and LangGraph through ChatOpenAI.

terminal
pip install langchain-openai
main.py
import os
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="minimax-m3.1-flash-abliterated",
    base_url="https://lyber-paid-acceptance-gateway-production.up.railway.app/v1",
    api_key=os.environ["LYBER_API_KEY"],
    max_tokens=1024,
    max_retries=0,
)
print(llm.invoke("Explain abliteration in two sentences.").content)

bind_tools works as usual. with_structured_output needs response_format or JSON mode, which Lyber doesn't support; use method="function_calling" instead.