https://github.com/weberi/node-red-contrib-croq-api
Enhance your Node-RED flows with AI! Integrate free Groq models to enable AI-powered chat, user-friendly speech interfaces, and intelligent automations, with built-in support for prompt engineering.
https://github.com/weberi/node-red-contrib-croq-api
ai artificial-intelligence automation chatbot conversational-ai flow intelligence large-language-model llm node-red prompt-engineering qroc
Last synced: 5 months ago
JSON representation
Enhance your Node-RED flows with AI! Integrate free Groq models to enable AI-powered chat, user-friendly speech interfaces, and intelligent automations, with built-in support for prompt engineering.
- Host: GitHub
- URL: https://github.com/weberi/node-red-contrib-croq-api
- Owner: weberi
- Created: 2024-12-06T18:27:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-06T18:30:18.000Z (over 1 year ago)
- Last Synced: 2025-10-05T09:36:42.470Z (9 months ago)
- Topics: ai, artificial-intelligence, automation, chatbot, conversational-ai, flow, intelligence, large-language-model, llm, node-red, prompt-engineering, qroc
- Language: HTML
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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](https://console.groq.com/keys).
- 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
1. Drag the **croq** node from the palette into your Node-RED workspace.
2. Double-click the node to open the configuration panel:
- Enter your **Groq API Key**. If you don’t have one, visit the [GroqCloud Console](https://console.groq.com/keys) 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.
3. Use the **model** node to retrieve a list of available models.
4. Use the **prompt** node to configure a multi-part structured prompt and pass it to the **croq** node as `msg.prompt`.
5. 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.