A simple chatbot page to simulate chatting with generative AI model from Google Gemini API. This chatbot model have a motto: "A short, simple and to the point chatbot".
Follow these instructions to get a local copy up and running.
- Node.js: Version 18.x or newer is recommended.
- npm or yarn: Package manager for Node.js.
- Google Gemini API Key: You'll need an API key to communicate with the Gemini models. You can obtain one from Google AI Studio.
-
Clone the repository:
git clone https://github.com/Realitaa/SimpleAI-gemini-chatbot-api.git cd SimpleAI-gemini-chatbot-api
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file in the root of the project by copying the example file.cp .env.example .env
-
Add your API key: Open the newly created
.env
file and add your Google Gemini API key.GEMINI_API_KEY=YOUR_GEMINI_API_KEY_HERE
You can run the server in two modes:
-
Development Mode: Uses
nodemon
to automatically restart the server on file changes.npm run dev
-
Production Mode: Runs the server using
node
.npm start
By default, the server will be running at port 3000
(you can change this in the .env
file)
Open http://localhost:3000
in your browser after running the server.
This project is licensed under the MIT License.