Wrapper around Groq API for large language models fine-tuned for chat

Groq API is compatible to the OpenAI API with some limitations. View the full API ref at:

To use, you should have the GROQ_API_KEY environment variable set.

const model = new ChatGroq({
temperature: 0.9,
apiKey: process.env.GROQ_API_KEY,
});

const response = await model.invoke([new HumanMessage("Hello there!")]);
console.log(response);

Hierarchy (view full)

Constructors

Methods