Warning
The project moved to: github.com/mgilangjanuar/tanyacapres-2.0
This is a web-based application that can be used to chat with the PDF file of the presidential candidate. This application is built using ExpressJS, React, and TypeScript with OpenAI integration to generate embeddings and answer questions.
-
Clone this repository.
-
Install dependencies.
cd api && yarn install && cd ../web && yarn install && cd ..
-
Define environment variables.
cp api/.env.example api/.env
Variable Description OPENAI_API_KEY OpenAI API key SECRET Secret for decrypting prompt DECRYPT_KEY Key for authentication cp web/.env.example web/.env.local
Variable Description VITE_API_URL API URL DECRYPT_KEY Key for authentication OPENAI_API_KEY OpenAI API key -
Run in development mode.
yarn dev