Usage
Simply set theopenai_api_base and openai_api_key to point to Neutrino and the model_name to the Neutrino Router ID.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Call the Neutrino Router using LangChain
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)