-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fd91cd
commit f4fe1ca
Showing
16 changed files
with
163 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,46 @@ | ||
## Autonomous Assistant | ||
# Autonomous Assistant | ||
|
||
> Fork and clone the repository if needed. | ||
1. Start pgvector | ||
### 1. Create a virtual environment | ||
|
||
```shell | ||
phi start cookbook/examples/auto/resources.py -y | ||
python3 -m venv ~/.venvs/aienv | ||
source ~/.venvs/aienv/bin/activate | ||
``` | ||
|
||
2. Install libraries | ||
### 2. Install libraries | ||
|
||
```shell | ||
pip install -U pgvector pypdf psycopg sqlalchemy phidata | ||
pip install -U pgvector pypdf "psycopg[binary]" sqlalchemy openai phidata | ||
``` | ||
|
||
3. Run Autonomous Assistant | ||
### 3. Run PgVector | ||
|
||
> Install [docker desktop](https://docs.docker.com/desktop/install/mac-install/) first. | ||
- Run using a helper script | ||
|
||
```shell | ||
./cookbook/run_pgvector.sh | ||
``` | ||
|
||
- OR run using the docker run command | ||
|
||
```shell | ||
python cookbook/examples/auto/assistant.py | ||
docker run -d \ | ||
-e POSTGRES_DB=ai \ | ||
-e POSTGRES_USER=ai \ | ||
-e POSTGRES_PASSWORD=ai \ | ||
-e PGDATA=/var/lib/postgresql/data/pgdata \ | ||
-v pgvolume:/var/lib/postgresql/data \ | ||
-p 5532:5432 \ | ||
--name pgvector \ | ||
phidata/pgvector:16 | ||
``` | ||
|
||
4. Stop pgvector | ||
### 4. Run Autonomous Assistant | ||
|
||
```shell | ||
phi stop cookbook/examples/auto/resources.py -y | ||
python cookbook/examples/autonomous/assistant.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,46 @@ | ||
## RAG Assistant | ||
# RAG Assistant | ||
|
||
> Fork and clone the repository if needed. | ||
1. Start pgvector | ||
### 1. Create a virtual environment | ||
|
||
```shell | ||
phi start cookbook/examples/rag/resources.py -y | ||
python3 -m venv ~/.venvs/aienv | ||
source ~/.venvs/aienv/bin/activate | ||
``` | ||
|
||
2. Install libraries | ||
### 2. Install libraries | ||
|
||
```shell | ||
pip install -U pgvector pypdf psycopg sqlalchemy phidata | ||
pip install -U pgvector pypdf "psycopg[binary]" sqlalchemy openai phidata | ||
``` | ||
|
||
3. Run RAG Assistant | ||
### 3. Run PgVector | ||
|
||
> Install [docker desktop](https://docs.docker.com/desktop/install/mac-install/) first. | ||
- Run using a helper script | ||
|
||
```shell | ||
python cookbook/examples/rag/assistant.py | ||
./cookbook/run_pgvector.sh | ||
``` | ||
|
||
- OR run using the docker run command | ||
|
||
```shell | ||
docker run -d \ | ||
-e POSTGRES_DB=ai \ | ||
-e POSTGRES_USER=ai \ | ||
-e POSTGRES_PASSWORD=ai \ | ||
-e PGDATA=/var/lib/postgresql/data/pgdata \ | ||
-v pgvolume:/var/lib/postgresql/data \ | ||
-p 5532:5432 \ | ||
--name pgvector \ | ||
phidata/pgvector:16 | ||
``` | ||
|
||
4. Stop pgvector | ||
### 4. Run RAG Assistant | ||
|
||
```shell | ||
phi stop cookbook/examples/rag/resources.py -y | ||
python cookbook/examples/rag/assistant.py | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
## Lancedb Assistant | ||
# Lancedb Assistant | ||
|
||
1. Create a virtual environment | ||
### 1. Create a virtual environment | ||
```shell | ||
python3 -m venv ~/.venvs/aienv | ||
source ~/.venvs/aienv/bin/activate | ||
``` | ||
|
||
2. Install libraries | ||
### 2. Install libraries | ||
```shell | ||
pip install -U lancedb pypdf pandas openai phidata | ||
``` | ||
|
||
3. Run Assistant | ||
### 3. Run Assistant | ||
```shell | ||
python cookbook/integrations/lancedb/assistant.py | ||
``` |
Oops, something went wrong.