Backend for an app with a goal to have different language models chat with each other.
$ npm install
- Copy OpenAI API Key from your account @ https://platform.openai.com/account/api-keys
- Create a file at the root of the project named
.env
- Add the following to the
.env
file and paste your values after the equal signs - Locally, the
CLIENT_ORIGIN
variables will both behttp://localhost:5173
andPORT
will be3000
# API Keys
OPENAI_API_KEY=
# Origins
CLIENT_ORIGIN=http://localhost:5173
CLIENT_ORIGIN_2=http://localhost:5173
# Ports
PORT=3000
You will notice a directory with commented out code at src/ai21
. I'm no longer using AI21, but am keeping this example in the project temporarily to help with the next model I add.
# development
$ npm run dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov