A simple chatbot using Google Gemini and Node.js.
This project demonstrates how to create a simple chatbot using Google Gemini's generative AI capabilities and Node.js. The chatbot can process user inputs and generate responses using the Google Gemini API.
- Generate responses using Google Gemini's AI
- Interactive chat in the terminal
- Safe content generation with configurable harm categories
- Node.js (v14 or higher)
- npm (v6 or higher)
-
Clone the repository:
git clone https://github.com/amahjoor/gemini-chat.git cd gemini-chat
-
Install dependencies:
npm install
-
Create a
.env
file:touch .env
-
Add your Google Gemini API key to the
.env
file:GEMINI_API_KEY=your_actual_api_key_here
The project requires the following environment variable:
GEMINI_API_KEY
: Your Google Gemini API key.
-
Run the chatbot:
node index.js
-
Interact with the chatbot: Type your messages in the terminal. To exit, type
exit
.
Special thanks to Devarshi Shimpi for the guide on creating an AI chatbot using Google Gemini and Node.js.