Files
Open-Assistant/backend
Yannic Kilcher 2f19c67d99 Merge pull request #11 from LAION-AI/duplicate-key-fi
removed duplicate api_key entry
2022-12-15 17:21:42 +01:00
..
2022-12-13 16:19:29 +01:00
2022-12-14 20:32:23 +01:00
2022-12-13 12:02:49 +01:00
2022-12-13 16:19:29 +01:00
2022-12-14 00:17:52 +01:00
2022-12-14 20:32:23 +01:00

Open-Chat-GPT REST Backend

REST Server Configuration

Please either use environment variables or create a .env file in the backend root directory (in which this readme file is located) to specify the DATABASE_URI.

Example contents of a .env file for the backend:

DATABASE_URI="postgresql://<username>:<password>@<host>/<database_name>"
BACKEND_CORS_ORIGINS=["http://localhost", "http://localhost:4200", "http://localhost:3000", "http://localhost:8080", "https://localhost", "https://localhost:4200", "https://localhost:3000", "https://localhost:8080", "http://dev.ocgpt.laion.ai", "https://stag.ocgpt.laion.ai", "https://ocgpt.laion.ai"]

Running the REST Server locally for development

First, install the requirements in requirements.txt. Then, run two terminals (note the working directory for each):

  • Terminal 1, to go backend/scripts and run docker-compose up. This will start postgres.
  • Terminal 2, to go backend and run scripts/run-local.sh. This will start the REST server.