Firebase Genkit <> Groq Plugin
genkitx-groq
is a community plugin for using OpenAI APIs with
Firebase GenKit. Built by The Fire Company. 🔥
Installation
Install the plugin in your project with your favorite package manager:
npm install genkitx-groq
yarn add genkitx-groq
pnpm add genkitx-groq
Usage
Basic examples
The simplest way to call the text generation model is by using the helper function generate
:
// Basic usage of an LLM
const response = await generate({
model: llama_3_70b,
prompt: 'Tell me a joke.',
});
console.log(await response.text());
Using the same interface, you can prompt a multimodal model:
const response = await generate({
model: llama_3_70b,
prompt: [
{ text: 'What animal is in the photo?' },
{ media: { url: imageUrl} },
],
config:{
// control of the level of visual detail when processing image embeddings
// Low detail level also decreases the token usage
visualDetailLevel: 'low',
}
});
console.log(await response.text());
Contributing
Want to contribute to the project? That's awesome! Head over to our Contribution Guidelines.
Need support?
[!NOTE]
This repository depends on Google's Firebase Genkit. For issues and questions related to GenKit, please refer to instructions available in GenKit's repository.
Reach out by opening a discussion on Github Discussions.
Credits
This plugin is proudly maintained by the team at The Fire Company. 🔥
License
This project is licensed under the Apache 2.0 License.