Skip to content

Commit

Permalink
readme and husky
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmoffet committed Oct 30, 2024
1 parent 2af0398 commit fe51869
Show file tree
Hide file tree
Showing 331 changed files with 71 additions and 3,369 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
echo "Scanning commit history, ~30-60s... 💅🥱⏳"
gitleaks detect --source . -v
gitleaks detect --log-opts="-n 1"
npm install
npm run format
npm run i18n:parse
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

1. **Ensure Python 3.11 is installed**:

- You can check your Python version by running:
- You can check your Python3.11.x version by running:

```bash
python3.11 --version
Expand Down Expand Up @@ -49,28 +49,31 @@

6. **Run redis**:

- Check for redis on the default `lsof -i:6379`, if it's there, make sure it's got the default creds, or kill it and run:
- Check for redis on the default `lsof -i:6379`, if it's there, make sure it's using the default creds, or kill it and run:

```bash
docker run -d --name redis -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
```

7. **Install deps, build and run**:

- Install, build and run with hot reloading:
- Make sure you've got the .env file set up, then install, build and run with hot reloading:

```bash
rm ./backend/data/webui.db && \
loadenv .env && \
rm ./backend/data/webui.db || true && \
pip install -r ./backend/requirements.txt && \
rm -rf node_modules && \
rm -rf node_modules || true && \
npm install && \
npm run build && \
./backend/start.sh
```

- You should see the pipelines server running at 9099, the static files should be compiled and the webui server should be running at http://0.0.0.0:8080.
- The first user to sign up to a new installation should get the admin role. You can also predefine user roles in the .env file. Github auth checks that email domain is in ['gsa.gov'], but you can easily modify it at `backend/apps/webui/routers/auths.py:233`. Eventually we'll need to make github for local dev only for compliance reasons.
- After the first install, you can just run `./backend/start.sh`. First app startup will take a minute even after it says `Uvicorn running on http://0.0.0.0:8080`, once you see the ascii art, all of the features should be available. You may see a 500 the first time and need to refresh. You can run a front end dev server that hot reloads via `npm run dev` but connecting it to the backend and getting auth redirects with live servers working is unresolved due to the frontend and back running on different ports. We probably need to mock auth locally.
- ollama is not required for the app to run, but it is assumed, you can ignore the 500s if its not running. If you want to use it, you can install it with `brew install ollama`. You can then run `ollama serve` to start the server. You can then add a model to ollama with `ollama run mistral`.

8. **Set up pipelines to access models via API**:

- The first user to sign up to a new installation should get the admin role. Once you're in, navigate to the Admin Panel > Settings > Connections > OpenAI API section. Set the API URL to http://localhost:9099 and the API key to 0p3n-w3bu! and hit refresh to see if it connects.
- After completing these steps, the model specified in the pipeline should be available in the drop down at the upper left when you create a new conversation.
- Once you're in, you should see the four default models available in the chat. If not, check that the pipelines server is running on 9099 and in the UI click on your user in the lower left > Admin Panel > Settings > Connections > OpenAI API section. Set the API URL to http://localhost:9099 and the API key to 0p3n-w3bu! and hit refresh to see if it connects to the pipeline server.
- After completing these steps, the models specified in the pipeline settings should be available in the drop down at the upper left when you create a new conversation.
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- gray out vision for custom models that don't have vision
- Ability to share docs/models by pasting an email of another user ("This email is belongs to a sandbox user. They will now have access to the model" / "This email does not belong to a sandbox user"). Probably want comma separation...
- Add http links to Doc upload options, seems mostly done
- stop checking for ollama models?
- Fix tagging ux, add tags should be clickable, should save when you hit save
- Check and batch-tag multiple docs
- documents tab needs a spinner when processing docs
Expand Down
1 change: 0 additions & 1 deletion build/_app/immutable/assets/10.c242e6f1.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/14.b0806465.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/2.ffa3d7c7.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/21.4dfbfe89.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/6.0c55a7ab.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/Chat.2c02f5b5.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/ConfirmDialog.c8c0830f.css

This file was deleted.

10 changes: 0 additions & 10 deletions build/_app/immutable/assets/Messages.4e7a627f.css

This file was deleted.

10 changes: 0 additions & 10 deletions build/_app/immutable/assets/Messages.bc713b91.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/Modal.beb6c5d8.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/_layout.ffa3d7c7.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/_page.0c55a7ab.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/_page.4dfbfe89.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/_page.b0806465.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/_page.c242e6f1.css

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/assets/dayjs.beb6c5d8.css

This file was deleted.

2 changes: 0 additions & 2 deletions build/_app/immutable/chunks/AddFilesPlaceholder.cd6db517.js

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions build/_app/immutable/chunks/AdvancedParams.49eb3c20.js

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/chunks/AdvancedParams.49eb3c20.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions build/_app/immutable/chunks/ArrowDownTray.dcc6ab67.js

This file was deleted.

1 change: 0 additions & 1 deletion build/_app/immutable/chunks/ArrowDownTray.dcc6ab67.js.map

This file was deleted.

Loading

0 comments on commit fe51869

Please sign in to comment.