Updated documentation

This commit is contained in:
Andreas
2023-12-18 20:22:15 +07:00
parent a1be489704
commit e9192770b5
5 changed files with 57 additions and 45 deletions

View File

@@ -67,18 +67,11 @@ To install the application, run:
```bash
yarn install
```
Then create an `.env` with:
```
FIEF_URL=https://auth.reflector-ui.dev/reflector-local
FIEF_CLIENT_ID=s03<omitted>
FIEF_CLIENT_SECRET=<omitted>
EDGE_CONFIG=<omitted> (optional)
cp .env_template .env
cp config-template.ts config.ts
```
Then copy config-template.ts to a new file called config.ts, this is where you will configure the features or your local project.
Then, fill in the environment variables in `.env` and the configuration in `config.ts` as needed. If you are unsure on how to proceed, ask in Zulip.
### Run the Application
@@ -88,7 +81,7 @@ To run the application in development mode, run:
yarn dev
```
Then open [http://localhost:3000](http://localhost:3000) to view it in the browser.
Then (after completing server setup and starting it) open [http://localhost:3000](http://localhost:3000) to view it in the browser.
### OpenAPI Code Generation
@@ -106,59 +99,60 @@ Start with `cd server`.
### Installation
Download [Python 3.11 from the official website](https://www.python.org/downloads/) and ensure you have version 3.11 by running `python --version`.
Run:
```bash
poetry install
python --version # It should say 3.11
pip install poetry
poetry install --no-root
cp .env_template .env
```
Then create an `.env` with:
```
TRANSCRIPT_BACKEND=modal
TRANSCRIPT_URL=https://monadical-sas--reflector-transcriber-web.modal.run
TRANSCRIPT_MODAL_API_KEY=<omitted>
LLM_BACKEND=modal
LLM_URL=https://monadical-sas--reflector-llm-web.modal.run
LLM_MODAL_API_KEY=<omitted>
TRANSLATE_URL=https://monadical-sas--reflector-translator-web.modal.run
ZEPHYR_LLM_URL=https://monadical-sas--reflector-llm-zephyr-web.modal.run
DIARIZATION_URL=https://monadical-sas--reflector-diarizer-web.modal.run
AUTH_BACKEND=fief
AUTH_FIEF_URL=https://auth.reflector.media/reflector-local
AUTH_FIEF_CLIENT_ID=KQzRsNgoY<omitted>
AUTH_FIEF_CLIENT_SECRET=<omitted>
TRANSLATE_URL=https://monadical-sas--reflector-translator-web.modal.run
ZEPHYR_LLM_URL=https://monadical-sas--reflector-llm-zephyr-web.modal.run
```
Then fill `.env` with the omitted values (ask in Zulip). At the moment of this writing, the only value omitted is `AUTH_FIEF_CLIENT_SECRET`.
### Start the API/Backend
Start the API server:
Start the server:
```bash
poetry run python3 -m reflector.app
poetry run python -m reflector.app
```
Start the background worker:
```bash
celery -A reflector.worker.app worker --loglevel=info
poetry run celery -A reflector.worker.app worker --loglevel=info
```
Redis (mac specific command):
### Redis (Mac)
```bash
yarn add redis
redis-server
```
### Redis (Windows)
Install:
- [Git for Windows](https://gitforwindows.org/)
- [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install)
- Install your preferred Linux distribution via the Microsoft Store (e.g., Ubuntu).
Open your Linux distribution and update the package list:
```bash
sudo apt update
sudo apt install redis-server
redis-server
```
### Crontab (optional)
For crontab (only healthcheck for now), start the celery beat (you don't need it on your local dev environment):
```bash
celery -A reflector.worker.app beat
poetry run celery -A reflector.worker.app beat
```
#### Using docker