Skip to content

Commit 21ec5ed

Browse files
committed
welcome to onyx
1 parent 54dcbfa commit 21ec5ed

File tree

813 files changed

+7020
-6823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

813 files changed

+7020
-6823
lines changed

CONTRIBUTING.md

+80-57
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,113 @@
1-
<!-- DANSWER_METADATA={"link": "https://github.com/danswer-ai/danswer/blob/main/CONTRIBUTING.md"} -->
1+
<!-- DANSWER_METADATA={"link": "https://github.com/onyx-dot-app/onyx/blob/main/CONTRIBUTING.md"} -->
22

3-
# Contributing to Danswer
4-
Hey there! We are so excited that you're interested in Danswer.
3+
# Contributing to Onyx
54

6-
As an open source project in a rapidly changing space, we welcome all contributions.
5+
Hey there! We are so excited that you're interested in Onyx.
76

7+
As an open source project in a rapidly changing space, we welcome all contributions.
88

99
## 💃 Guidelines
10+
1011
### Contribution Opportunities
11-
The [GitHub Issues](https://github.com/danswer-ai/danswer/issues) page is a great place to start for contribution ideas.
12+
13+
The [GitHub Issues](https://github.com/onyx-dot-app/onyx/issues) page is a great place to start for contribution ideas.
1214

1315
Issues that have been explicitly approved by the maintainers (aligned with the direction of the project)
1416
will be marked with the `approved by maintainers` label.
1517
Issues marked `good first issue` are an especially great place to start.
1618

1719
**Connectors** to other tools are another great place to contribute. For details on how, refer to this
18-
[README.md](https://github.com/danswer-ai/danswer/blob/main/backend/danswer/connectors/README.md).
20+
[README.md](https://github.com/onyx-dot-app/onyx/blob/main/backend/onyx/connectors/README.md).
1921

2022
If you have a new/different contribution in mind, we'd love to hear about it!
21-
Your input is vital to making sure that Danswer moves in the right direction.
23+
Your input is vital to making sure that Onyx moves in the right direction.
2224
Before starting on implementation, please raise a GitHub issue.
2325

24-
And always feel free to message us (Chris Weaver / Yuhong Sun) on
25-
[Slack](https://join.slack.com/t/danswer/shared_invite/zt-2lcmqw703-071hBuZBfNEOGUsLa5PXvQ) /
26-
[Discord](https://discord.gg/TDJ59cGV2X) directly about anything at all.
27-
26+
And always feel free to message us (Chris Weaver / Yuhong Sun) on
27+
[Slack](https://join.slack.com/t/danswer/shared_invite/zt-1w76msxmd-HJHLe3KNFIAIzk_0dSOKaQ) /
28+
[Discord](https://discord.gg/TDJ59cGV2X) directly about anything at all.
2829

2930
### Contributing Code
31+
3032
To contribute to this project, please follow the
3133
["fork and pull request"](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow.
3234
When opening a pull request, mention related issues and feel free to tag relevant maintainers.
3335

3436
Before creating a pull request please make sure that the new changes conform to the formatting and linting requirements.
3537
See the [Formatting and Linting](#formatting-and-linting) section for how to run these checks locally.
3638

37-
3839
### Getting Help 🙋
40+
3941
Our goal is to make contributing as easy as possible. If you run into any issues please don't hesitate to reach out.
4042
That way we can help future contributors and users can avoid the same issue.
4143

4244
We also have support channels and generally interesting discussions on our
43-
[Slack](https://join.slack.com/t/danswer/shared_invite/zt-2afut44lv-Rw3kSWu6_OmdAXRpCv80DQ)
44-
and
45+
[Slack](https://join.slack.com/t/danswer/shared_invite/zt-1w76msxmd-HJHLe3KNFIAIzk_0dSOKaQ)
46+
and
4547
[Discord](https://discord.gg/TDJ59cGV2X).
4648

4749
We would love to see you there!
4850

49-
5051
## Get Started 🚀
51-
Danswer being a fully functional app, relies on some external software, specifically:
52+
53+
Onyx being a fully functional app, relies on some external software, specifically:
54+
5255
- [Postgres](https://www.postgresql.org/) (Relational DB)
5356
- [Vespa](https://vespa.ai/) (Vector DB/Search Engine)
5457
- [Redis](https://redis.io/) (Cache)
5558
- [Nginx](https://nginx.org/) (Not needed for development flows generally)
5659

57-
5860
> **Note:**
59-
> This guide provides instructions to build and run Danswer locally from source with Docker containers providing the above external software. We believe this combination is easier for
60-
> development purposes. If you prefer to use pre-built container images, we provide instructions on running the full Danswer stack within Docker below.
61-
61+
> This guide provides instructions to build and run Onyx locally from source with Docker containers providing the above external software. We believe this combination is easier for
62+
> development purposes. If you prefer to use pre-built container images, we provide instructions on running the full Onyx stack within Docker below.
6263
6364
### Local Set Up
65+
6466
Be sure to use Python version 3.11. For instructions on installing Python 3.11 on macOS, refer to the [CONTRIBUTING_MACOS.md](./CONTRIBUTING_MACOS.md) readme.
6567

6668
If using a lower version, modifications will have to be made to the code.
6769
If using a higher version, sometimes some libraries will not be available (i.e. we had problems with Tensorflow in the past with higher versions of python).
6870

69-
7071
#### Backend: Python requirements
72+
7173
Currently, we use pip and recommend creating a virtual environment.
7274

7375
For convenience here's a command for it:
76+
7477
```bash
7578
python -m venv .venv
7679
source .venv/bin/activate
7780
```
7881

7982
> **Note:**
80-
> This virtual environment MUST NOT be set up WITHIN the danswer directory if you plan on using mypy within certain IDEs.
81-
> For simplicity, we recommend setting up the virtual environment outside of the danswer directory.
83+
> This virtual environment MUST NOT be set up WITHIN the onyx directory if you plan on using mypy within certain IDEs.
84+
> For simplicity, we recommend setting up the virtual environment outside of the onyx directory.
8285
8386
_For Windows, activate the virtual environment using Command Prompt:_
87+
8488
```bash
8589
.venv\Scripts\activate
8690
```
91+
8792
If using PowerShell, the command slightly differs:
93+
8894
```powershell
8995
.venv\Scripts\Activate.ps1
9096
```
9197

9298
Install the required python dependencies:
99+
93100
```bash
94-
pip install -r danswer/backend/requirements/default.txt
95-
pip install -r danswer/backend/requirements/dev.txt
96-
pip install -r danswer/backend/requirements/ee.txt
97-
pip install -r danswer/backend/requirements/model_server.txt
101+
pip install -r onyx/backend/requirements/default.txt
102+
pip install -r onyx/backend/requirements/dev.txt
103+
pip install -r onyx/backend/requirements/ee.txt
104+
pip install -r onyx/backend/requirements/model_server.txt
98105
```
99106

100107
Install Playwright for Python (headless browser required by the Web Connector)
101108

102109
In the activated Python virtualenv, install Playwright for Python by running:
110+
103111
```bash
104112
playwright install
105113
```
@@ -109,64 +117,75 @@ You may have to deactivate and reactivate your virtualenv for `playwright` to ap
109117
#### Frontend: Node dependencies
110118

111119
Install [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) for the frontend.
112-
Once the above is done, navigate to `danswer/web` run:
120+
Once the above is done, navigate to `onyx/web` run:
121+
113122
```bash
114123
npm i
115124
```
116125

117126
#### Docker containers for external software
127+
118128
You will need Docker installed to run these containers.
119129

120-
First navigate to `danswer/deployment/docker_compose`, then start up Postgres/Vespa/Redis with:
130+
First navigate to `onyx/deployment/docker_compose`, then start up Postgres/Vespa/Redis with:
131+
121132
```bash
122-
docker compose -f docker-compose.dev.yml -p danswer-stack up -d index relational_db cache
133+
docker compose -f docker-compose.dev.yml -p onyx-stack up -d index relational_db cache
123134
```
135+
124136
(index refers to Vespa, relational_db refers to Postgres, and cache refers to Redis)
125137

138+
#### Running Onyx locally
139+
140+
To start the frontend, navigate to `onyx/web` and run:
126141

127-
#### Running Danswer locally
128-
To start the frontend, navigate to `danswer/web` and run:
129142
```bash
130143
npm run dev
131144
```
132145

133146
Next, start the model server which runs the local NLP models.
134-
Navigate to `danswer/backend` and run:
147+
Navigate to `onyx/backend` and run:
148+
135149
```bash
136150
uvicorn model_server.main:app --reload --port 9000
137151
```
138152

139153
_For Windows (for compatibility with both PowerShell and Command Prompt):_
154+
140155
```bash
141156
powershell -Command "uvicorn model_server.main:app --reload --port 9000"
142157
```
143158

144-
The first time running Danswer, you will need to run the DB migrations for Postgres.
159+
The first time running Onyx, you will need to run the DB migrations for Postgres.
145160
After the first time, this is no longer required unless the DB models change.
146161

147-
Navigate to `danswer/backend` and with the venv active, run:
162+
Navigate to `onyx/backend` and with the venv active, run:
163+
148164
```bash
149165
alembic upgrade head
150166
```
151167

152168
Next, start the task queue which orchestrates the background jobs.
153169
Jobs that take more time are run async from the API server.
154170

155-
Still in `danswer/backend`, run:
171+
Still in `onyx/backend`, run:
172+
156173
```bash
157174
python ./scripts/dev_run_background_jobs.py
158175
```
159176

160-
To run the backend API server, navigate back to `danswer/backend` and run:
177+
To run the backend API server, navigate back to `onyx/backend` and run:
178+
161179
```bash
162-
AUTH_TYPE=disabled uvicorn danswer.main:app --reload --port 8080
180+
AUTH_TYPE=disabled uvicorn onyx.main:app --reload --port 8080
163181
```
164182

165183
_For Windows (for compatibility with both PowerShell and Command Prompt):_
184+
166185
```bash
167186
powershell -Command "
168187
$env:AUTH_TYPE='disabled'
169-
uvicorn danswer.main:app --reload --port 8080
188+
uvicorn onyx.main:app --reload --port 8080
170189
"
171190
```
172191

@@ -182,57 +201,61 @@ You should now have 4 servers running:
182201
- Model server
183202
- Background jobs
184203

185-
Now, visit `http://localhost:3000` in your browser. You should see the Danswer onboarding wizard where you can connect your external LLM provider to Danswer.
204+
Now, visit `http://localhost:3000` in your browser. You should see the Onyx onboarding wizard where you can connect your external LLM provider to Onyx.
186205

187-
You've successfully set up a local Danswer instance! 🏁
206+
You've successfully set up a local Onyx instance! 🏁
188207

189-
#### Running the Danswer application in a container
208+
#### Running the Onyx application in a container
190209

191-
You can run the full Danswer application stack from pre-built images including all external software dependencies.
210+
You can run the full Onyx application stack from pre-built images including all external software dependencies.
192211

193-
Navigate to `danswer/deployment/docker_compose` and run:
212+
Navigate to `onyx/deployment/docker_compose` and run:
194213

195214
```bash
196-
docker compose -f docker-compose.dev.yml -p danswer-stack up -d
215+
docker compose -f docker-compose.dev.yml -p onyx-stack up -d
197216
```
198217

199-
After Docker pulls and starts these containers, navigate to `http://localhost:3000` to use Danswer.
218+
After Docker pulls and starts these containers, navigate to `http://localhost:3000` to use Onyx.
200219

201-
If you want to make changes to Danswer and run those changes in Docker, you can also build a local version of the Danswer container images that incorporates your changes like so:
220+
If you want to make changes to Onyx and run those changes in Docker, you can also build a local version of the Onyx container images that incorporates your changes like so:
202221

203222
```bash
204-
docker compose -f docker-compose.dev.yml -p danswer-stack up -d --build
223+
docker compose -f docker-compose.dev.yml -p onyx-stack up -d --build
205224
```
206225

207226
### Formatting and Linting
227+
208228
#### Backend
229+
209230
For the backend, you'll need to setup pre-commit hooks (black / reorder-python-imports).
210231
First, install pre-commit (if you don't have it already) following the instructions
211232
[here](https://pre-commit.com/#installation).
212233

213234
With the virtual environment active, install the pre-commit library with:
235+
214236
```bash
215237
pip install pre-commit
216238
```
217239

218-
Then, from the `danswer/backend` directory, run:
240+
Then, from the `onyx/backend` directory, run:
241+
219242
```bash
220243
pre-commit install
221244
```
222245

223246
Additionally, we use `mypy` for static type checking.
224-
Danswer is fully type-annotated, and we want to keep it that way!
225-
To run the mypy checks manually, run `python -m mypy .` from the `danswer/backend` directory.
226-
247+
Onyx is fully type-annotated, and we want to keep it that way!
248+
To run the mypy checks manually, run `python -m mypy .` from the `onyx/backend` directory.
227249

228250
#### Web
229-
We use `prettier` for formatting. The desired version (2.8.8) will be installed via a `npm i` from the `danswer/web` directory.
230-
To run the formatter, use `npx prettier --write .` from the `danswer/web` directory.
231-
Please double check that prettier passes before creating a pull request.
232251

252+
We use `prettier` for formatting. The desired version (2.8.8) will be installed via a `npm i` from the `onyx/web` directory.
253+
To run the formatter, use `npx prettier --write .` from the `onyx/web` directory.
254+
Please double check that prettier passes before creating a pull request.
233255

234256
### Release Process
235-
Danswer loosely follows the SemVer versioning standard.
257+
258+
Onyx loosely follows the SemVer versioning standard.
236259
Major changes are released with a "minor" version bump. Currently we use patch release versions to indicate small feature changes.
237260
A set of Docker containers will be pushed automatically to DockerHub with every tag.
238-
You can see the containers [here](https://hub.docker.com/search?q=danswer%2F).
261+
You can see the containers [here](https://hub.docker.com/search?q=onyx%2F).

CONTRIBUTING_MACOS.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
## Some additional notes for Mac Users
2-
The base instructions to set up the development environment are located in [CONTRIBUTING.md](https://github.com/danswer-ai/danswer/blob/main/CONTRIBUTING.md).
2+
3+
The base instructions to set up the development environment are located in [CONTRIBUTING.md](https://github.com/onyx-dot-app/onyx/blob/main/CONTRIBUTING.md).
34

45
### Setting up Python
6+
57
Ensure [Homebrew](https://brew.sh/) is already set up.
68

79
Then install python 3.11.
10+
811
```bash
912
brew install [email protected]
1013
```
1114

1215
Add python 3.11 to your path: add the following line to ~/.zshrc
16+
1317
```
1418
export PATH="$(brew --prefix)/opt/[email protected]/libexec/bin:$PATH"
1519
```
1620

1721
> **Note:**
1822
> You will need to open a new terminal for the path change above to take effect.
1923
20-
2124
### Setting up Docker
22-
On macOS, you will need to install [Docker Desktop](https://www.docker.com/products/docker-desktop/) and
23-
ensure it is running before continuing with the docker commands.
2425

26+
On macOS, you will need to install [Docker Desktop](https://www.docker.com/products/docker-desktop/) and
27+
ensure it is running before continuing with the docker commands.
2528

2629
### Formatting and Linting
30+
2731
MacOS will likely require you to remove some quarantine attributes on some of the hooks for them to execute properly.
2832
After installing pre-commit, run the following command:
33+
2934
```bash
3035
sudo xattr -r -d com.apple.quarantine ~/.cache/pre-commit
31-
```
36+
```

LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Copyright (c) 2023-present DanswerAI, Inc.
1+
Copyright (c) 2023-present OnyxAI, Inc.
22

33
Portions of this software are licensed as follows:
44

55
* All content that resides under "ee" directories of this repository, if that directory exists, is licensed under the license defined in "backend/ee/LICENSE". Specifically all content under "backend/ee" and "web/src/app/ee" is licensed under the license defined in "backend/ee/LICENSE".
6-
* All third party components incorporated into the Danswer Software are licensed under the original license provided by the owner of the applicable component.
6+
* All third party components incorporated into the Onyx Software are licensed under the original license provided by the owner of the applicable component.
77
* Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below.
88

99
Permission is hereby granted, free of charge, to any person obtaining a copy

0 commit comments

Comments
 (0)