Skip to content
SETU by SUPREME AI

Integrations

LangChain

Use Setu models with ChatOpenAI in Python or TypeScript.

Setup

ChatOpenAI talks to the Chat Completions API, so it only needs the Setu base URL and key.

# pip install langchain-openai
import os
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="quantum-lite",
    base_url="https://setu.supremeai.services/api/setu/v1",
    api_key=os.environ["SETU_API_KEY"],
)
print(llm.invoke("What is Euler's formula?").content)