Gaianet Chat Bot is an automated multi-wallet chat program that interacts with Gaianet AI nodes. This guide provides steps to install, configure, and run the bot on Windows and MacOS/Linux.
Before installing, ensure you have the following installed:
- Node.js (LTS version recommended)
- Git
- A terminal or command prompt (PowerShell for Windows, Terminal for MacOS/Linux)
Open a terminal and run:
git clone https://github.com/RPC-Hubs/Gaianet-Chat-Bot.git
cd Gaianet-Chat-BotRun the following command to install the required packages:
npm install-
Private Key Storage
- Create a file named
priv.txtin the root directory. - Add your private wallet keys, each on a new line.
- Create a file named
-
Groq API Key Setup
- Visit Groq API and sign in.
- Generate an API key from the API management section.
- Open
main.js, locate line 13, and replace"Groq-Api-Key"with your actual API key:const groqClient = new Groq({ apiKey: "your-groq-api-key", });
-
Environment Variables (Optional)
- If required, set up environment variables using
.env. - Example format:
GROQ_API_KEY=your-groq-api-key
- If required, set up environment variables using
The main bot logic is in main.js. Ensure the following are correctly set:
- API endpoints (
API_CONFIG) - AI models (
MODEL_CONFIG) - Retry and authentication settings
- System prompt messages
Use the terminal and navigate to the bot directory:
cd Gaianet-Chat-Bot
node main.jsUse PowerShell or Command Prompt:
cd Gaianet-Chat-Bot
node main.js