Skip to content

A simple chatbot page to simulate chatting with generative AI model from Google Gemini API with simplest answer possible.

Notifications You must be signed in to change notification settings

Realitaa/SimpleAI-gemini-chatbot-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleAI - Gemini Chatbot API

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".

Table of Contents

Getting Started

Follow these instructions to get a local copy up and running.

Prerequisites

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/Realitaa/SimpleAI-gemini-chatbot-api.git
    cd SimpleAI-gemini-chatbot-api
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env file in the root of the project by copying the example file.

    cp .env.example .env
  4. 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

Usage

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.

License

This project is licensed under the MIT License.

About

A simple chatbot page to simulate chatting with generative AI model from Google Gemini API with simplest answer possible.

Topics

Resources

Stars

Watchers

Forks