import SambaNova from "sambanova";
const client = new SambaNova({
baseURL: "your-sambanova-base-url",
apiKey: "your-sambanova-api-key",
});
const chatCompletion = await client.chat.completions.create({
messages: [
{ role: "system", content: "Answer the question in a couple sentences." },
{ role: "user", content: "Share a happy story with me" },
],
model: "Meta-Llama-3.3-70B-Instruct",
logprobs: true,
top_logprobs: 2,
});
console.log(chatCompletion.choices[0].message.content);