Introduction
Cinna LLM Gateway
arduinoCopy codehttps://llm-gateway.cinna.aiCore Advantages
Getting Started
tsCopy codeimport OpenAI from "openai"
const openai = new OpenAI({
apiKey: process.env["CINNA_API_TOKEN"],
baseURL: "https://llm-gateway.cinna.ai"
})
const response = await openai.chat.completions.create({
model: "mistralai/mixtral-8x7b-instruct",
messages: [
{
role: "user",
content: "Write rap lyrics about Solana"
}
],
maxTokens: 64,
stream: true
})
for await (const part of response) {
process.stdout.write(part.choices[0]?.delta?.content || "")
}Last updated