Table of Contents
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.
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.
- Clone the repo
git clone https://github.com/erickmarx/chatbot.git
- Configure the environment variables copying and renaming
.env.exampleto.envPORT=3000 OPENAI_API_KEY= GOOGLE_PROJECT_ID= FIRESTORE_DATABASE_ID= FIRESTORE_PRIVATE_KEY= FIRESTORE_CLIENT_EMAIL=
- Install PNPM packages
pnpm install
-
Start the aplication
pnpm run build && pnpm run start -
Make a POST http request to
/chatcurl --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"}'
Distributed under the MIT License.
Erick Marx - Linkedin - [email protected]