Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A simple chatbot with history integrated with ChatGPT using Langchain and NestJS

Notifications You must be signed in to change notification settings

erickmarx/chatbot

Repository files navigation


Logo

An Chat Bot

An simple chat bot API with simple frontend for example
View Demo

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About The Project

Chat Bot

An API project in NestJS with the aim of serving as a chatbot with history managed by Langchain with ChatGPT 3.5 and saved in Firestore that answers user questions.

Simple frontend to represent API usage.

API hosted on Google Cloud Platform using App Engine for hosting and Firestore for database.

Built With

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Installation

  1. Clone the repo
    git clone https://github.com/erickmarx/chatbot.git
  2. Configure the environment variables copying and renaming .env.example to .env
    PORT=3000
    OPENAI_API_KEY=
    GOOGLE_PROJECT_ID=
    FIRESTORE_DATABASE_ID=
    FIRESTORE_PRIVATE_KEY=
    FIRESTORE_CLIENT_EMAIL=
  3. Install PNPM packages
    pnpm install

Usage

  1. Start the aplication

      pnpm run build && pnpm run start
  2. Make a POST http request to /chat

    curl --request POST \
    --url 'http://chat-ia-426719.ue.r.appspot.com/chat?sessionId=123' \
    --header 'Content-Type: application/json' \
    --data '{"content": "a example message to test chatbot"}'
    

License

Distributed under the MIT License.

Contact

Erick Marx - Linkedin - [email protected]

About

A simple chatbot with history integrated with ChatGPT using Langchain and NestJS

Resources

Stars

Watchers

Forks