Groq
Usage
First, create an API key at the Groq Console. Then save it in your environment:
export GROQ_API_KEY=<your-api-key>
The initialize the Groq module.
import { Groq, serviceContextFromDefaults } from "llamaindex";
const groq = new Groq({
// If you do not wish to set your API key in the environment, you may
// configure your API key when you initialize the Groq class.
// apiKey: "<your-api-key>",
});
const serviceContext = serviceContextFromDefaults({ llm: groq });