This REST API / Server communicates with Open AI's text model GPT-3.5 Turbo. The application then gathers the response from the model and sends it back to the client. The native client for this application can be found here. Also here is the repository for said client, here.
Before you begin, make sure you have Node.js installed on your machine. Node.js is a JavaScript runtime that allows you to run JavaScript on your server. It's essential for this project as it uses Node.js for its server environment.
-
Install Node.js
If you don't have Node.js installed, you can download it from the official website. Follow the instructions for your specific operating system.
-
Clone the repository
First, you need to clone the repository to your local machine. You can do this with the following command:
git clone <repository-url>
Replace
<repository-url>
with the URL of your repository. -
Navigate to the project directory
Use the
cd
command to navigate to the project directory. For example:cd <project-directory>
Replace
<project-directory>
with the name of your project directory. -
Install the dependencies
Your project requires several dependencies to run. Install them with the following command:
npm install
This command installs all of the dependencies listed in your
package.json
file. -
Start the application
You can start the application in development mode with the following command:
npm run start:dev
This command starts your application with
nodemon
, which will automatically restart your application whenever you make changes to the code.If you want to start the application in production mode, use the following command:
npm start
This command starts your application with
node
.