Text Generation
You can generate text using the Llama 3.1 8B Instruct model deployed on your Cube via an OpenAI-compatible API.
JavaScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://llama-eukodyne.edgescaleai-cube.com/v1/"
});
const completion = await client.chat.completions.create({
model: "meta-llama/Llama-3.1-8B-Instruct",
messages: [
{ role: "system", content: "You are a helpful AI assistant." },
{ role: "user", content: "what model are you, how can you help?" }
],
max_tokens: 256,
temperature: 0.7
});
console.log(completion.choices[0].message.content);Python
cURL
Last updated

