cerebras
npm install --save portkey-ai
import Portkey from 'portkey-ai' const portkey = new Portkey({ apiKey: "PORTKEY_API_KEY", // defaults to process.env["PORTKEY_API_KEY"] virtualKey: "CEREBRAS_VIRTUAL_KEY" // Your Cerebras Inference virtual key })
const chatCompletion = await portkey.chat.completions.create({ messages: [{ role: 'user', content: 'Say this is a test' }], model: 'llama3.1-8b', }); console.log(chatCompletion.choices);
Llama-3.1-8B
Llama-3.1-70B
Was this page helpful?