Integrations
LangChain
Call the Neutrino Router using LangChain
Usage
Simply set the openai_api_base
and openai_api_key
to point to Neutrino and the model_name
to the Neutrino Router ID.
from langchain.chat_models import ChatOpenAI
from langchain.schema import HumanMessage
client = ChatOpenAI(
openai_api_base="https://router.neutrinoapp.com/api/llm-router",
openai_api_key="<Neutrino-API-key>",
model_name="your-neutrino-router-id", # (or 'default')
)
response = client.invoke([HumanMessage(content="What is the capital of France?")])
print(response.content)