Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore(wren-ui): update wren-ui readme #534

Merged
merged 4 commits into from
Oct 1, 2024
Merged

Chore(wren-ui): update wren-ui readme #534

merged 4 commits into from
Oct 1, 2024

Conversation

onlyjackfrost
Copy link
Contributor

Provide local setup instruction and FAQ

We currently do not support multiple projects in Wren AI. You can only have one project at a time.
But there is a workaround for this. Since Wren Engine is stateless and we store your semantic model in the database(Sqlite or Postgres),
you can switch between projects by switching the database and make sure you deploying after server started.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(NIT) Suggestion:
Add a tip to describe a brief description - the key point is to use the SQLITE_FILE variable to change the DB

> Tip: Define the `SQLITE_FILE` variable to specify the path to the database you intend to use.

export SQLITE_FILE={your_sqlite_file_path}
```

Step 4. Run migrations:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update Step 4. Run the development server: to Step 5. Run the development server:

Comment on lines 16 to 17
Step 3(Optional). Switching database
Wren-ui use sqlite as our default database. To use Postgres as the database of wren-ui, you need to set the two environment variable below.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Step 3(Optional). Switching database
Wren-ui use sqlite as our default database. To use Postgres as the database of wren-ui, you need to set the two environment variable below.
Step 3(Optional). Switching database
Wren-ui uses SQLite as our default database. To use Postgres as the database of wren-ui, you need to set the two environment variables below.

@@ -32,6 +25,27 @@ SET PG_URL=postgres://user:password@localhost:5432/dbname
export DB_TYPE=pg
export PG_URL=postgres://user:password@localhost:5432/dbname
```
- PG_URL is the connection string of your postgres database.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- PG_URL is the connection string of your postgres database.
- `PG_URL` is the connection string of your postgres database.

@@ -32,6 +25,27 @@ SET PG_URL=postgres://user:password@localhost:5432/dbname
export DB_TYPE=pg
export PG_URL=postgres://user:password@localhost:5432/dbname
```
- PG_URL is the connection string of your postgres database.

To set back to sqlite, you can remove the two environment variables above.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we use SQLite better than sqlite

Step 1. Prepare you .env file
In the WrenAI/docker folder, you can find the .env.example file. You can copy this file to .env.local file.

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(NIT) Suggestion: add bash for all ``` if suitable.

Suggested change
```
```bash

refer to [Start wren-ui from source code](#Start-wren-ui-from-source-code) section to start wren-ui from source code.

Step 5. (Optional) Develop other modules along with wren-ui
As mentioned above, you can use docker-compose to start other modules. The same applies when developing other modules.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an extra blank line if you want it to wrap.
So are other places.

Step 5. (Optional) Develop other modules along with wren-ui
As mentioned above, you can use docker-compose to start other modules. The same applies when developing other modules.
From the perspective of wren-ui, if you want to develop other modules at the same time, you can stop the container then spin up the module from the source code.
Refer to the README.md or CONTRIBUTION.md file the module for starting the module from the source code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For README.md and CONTRIBUTION.md, do we have a link to provide?

wren-ui/README.md Show resolved Hide resolved
@wwwy3y3 wwwy3y3 merged commit f8f9ec6 into main Oct 1, 2024
7 checks passed
@wwwy3y3 wwwy3y3 deleted the chore/ui-readme branch October 1, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants