The application is a monstrosity(frontend made by a Data Scientist) trying to simulate something looking like chatGPT. It allows the user to communicate with OPENAIs GPT model through a chat interface or through speech.
This project was made as a learning experience to get insight into various OPENAI APIs, such as:
- Whisper [https://platform.openai.com/docs/guides/speech-to-text]
- Functional [https://platform.openai.com/docs/guides/gpt/function-calling]
- Chat Completion [https://platform.openai.com/docs/guides/gpt/chat-completions-api]
- Node.js and npm: Ensure you have Node.js and npm installed. If not, you can download them here.
To get a local copy up and running, follow these simple steps:
-
Clone the repository:
-
Install Dependencies:
cd jarviks npm install
-
Add Secrets:
This project utilizes dotenv for environment variable management. Ensure you create a
.env
file in the server directory and populate it with the required environment variables. The primary required key isOPENAI_API_KEY
. -
Run the Project:
Run both server and client from the root using:
npm start
Alternatively, run the server and client individually:
cd server npm start
cd client npm start
-
Development:
With the npm start command, both the client and server codes are set to hot reload. They will automatically reflect changes made to the codebase.
Note: When you modify the code, the current GPT context will be reset.
/client
: This directory contains the React frontend application./server
: This directory contains the Node.js backend.
Check out ./server/README.md to see how one can add new functions to the GPT context