node-red-contrib-croq-api
v1.0.0
Published
A Node-RED node for interacting with the Groq API
Downloads
79
Readme
node-red-contrib-croq-api
A Node-RED node for interacting with the Groq API.
Currently, it supports only synchronous API calls.
Features
- Easily interact with the Groq API for chat-based completions.
- Customize the model, temperature, and token limits.
- Requires an API key: Get yours from GroqCloud Console.
- Lightweight implementation using Node.js's native
https
module.
Installation
Install the nodes directly through Node-RED's built-in palette manager.
Nodes
- croq: Calls the API.
- prompt: Helps construct the prompt.
- models: Retrieves available models.
Usage
- Drag the croq node from the palette into your Node-RED workspace.
- Double-click the node to open the configuration panel:
- Enter your Groq API Key. If you don’t have one, visit the GroqCloud Console to generate it. You will need to create a Groq account. Usage is restricted but free within defined limits.
- Specify a model in the node or in the input payload, e.g., llama3-8b-8192.
- Optionally set values for temperature and maximum tokens.
- Use the model node to retrieve a list of available models.
- Use the prompt node to configure a multi-part structured prompt and pass it to the croq node as
msg.prompt
. - The croq node returns the API response in
msg.payload
.
Example Flow
The example flow demonstrates how to use the nodes together:
You can import it from the repository to get started quickly.