Skip to content

Commit

Permalink
v2.3.80
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Apr 21, 2024
1 parent 7905296 commit 5a0e1d5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 92 deletions.
42 changes: 8 additions & 34 deletions cookbook/llms/groq/research/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,27 @@ python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate
```

### 2. Export your Groq & OpenAI API Key

> Need to use OpenAI for embeddings as Groq doesn't support embeddings yet.
### 2. Export your Groq & Tavily API Key

```shell
export GROQ_API_KEY=***
export OPENAI_API_KEY=sk-***
export TAVILY_API_KEY=sk-***
```

### 3. Install libraries

```shell
pip install -r cookbook/llms/groq/rag/requirements.txt
```

### 4. 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
docker run -d \
-e POSTGRES_DB=ai \
-e POSTGRES_USER=ai \[app.py](..%2Fapp.py)
-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
pip install -r cookbook/llms/groq/research/requirements.txt
```

### 5. Run RAG App
### 4. Run Streamlit App

```shell
streamlit run cookbook/llms/groq/rag/app.py
streamlit run cookbook/llms/groq/research/app.py
```

- Open [localhost:8501](http://localhost:8501) to view your RAG app.
- Open [localhost:8501](http://localhost:8501) to view your Groq Researcher.

### 6. Message on [discord](https://discord.gg/4MtYHHrgA8) if you have any questions
### 5. Message on [discord](https://discord.gg/4MtYHHrgA8) if you have any questions

### 7. Star ⭐️ the project if you like it.
### 6. Star ⭐️ the project if you like it.
8 changes: 1 addition & 7 deletions cookbook/llms/groq/research/requirements.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
groq
openai
pgvector
phidata
psycopg[binary]
pypdf
sqlalchemy
streamlit
bs4
duckduckgo-search
tavily-python
73 changes: 22 additions & 51 deletions cookbook/llms/groq/research/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile cookbook/llms/groq/rag/requirements.in
# pip-compile cookbook/llms/groq/research/requirements.in
#
altair==5.3.0
# via streamlit
Expand All @@ -12,58 +12,44 @@ anyio==4.3.0
# via
# groq
# httpx
# openai
attrs==23.2.0
# via
# jsonschema
# referencing
beautifulsoup4==4.12.3
# via bs4
blinker==1.7.0
# via streamlit
bs4==0.0.2
# via -r cookbook/llms/groq/rag/requirements.in
cachetools==5.3.3
# via streamlit
certifi==2024.2.2
# via
# curl-cffi
# httpcore
# httpx
# requests
cffi==1.16.0
# via curl-cffi
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via
# duckduckgo-search
# streamlit
# typer
curl-cffi==0.6.2
# via duckduckgo-search
distro==1.9.0
# via
# groq
# openai
duckduckgo-search==5.3.0
# via -r cookbook/llms/groq/rag/requirements.in
# via groq
exceptiongroup==1.2.1
# via anyio
gitdb==4.0.11
# via gitpython
gitpython==3.1.43
# via
# phidata
# streamlit
groq==0.5.0
# via -r cookbook/llms/groq/rag/requirements.in
# via -r cookbook/llms/groq/research/requirements.in
h11==0.14.0
# via httpcore
httpcore==1.0.5
# via httpx
httpx==0.27.0
# via
# groq
# openai
# phidata
idna==3.7
# via
Expand All @@ -88,14 +74,9 @@ numpy==1.26.4
# via
# altair
# pandas
# pgvector
# pyarrow
# pydeck
# streamlit
openai==1.23.1
# via -r cookbook/llms/groq/rag/requirements.in
orjson==3.10.1
# via duckduckgo-search
packaging==24.0
# via
# altair
Expand All @@ -104,26 +85,17 @@ pandas==2.2.2
# via
# altair
# streamlit
pgvector==0.2.5
# via -r cookbook/llms/groq/rag/requirements.in
phidata==2.3.79
# via -r cookbook/llms/groq/rag/requirements.in
phidata==2.3.80
# via -r cookbook/llms/groq/research/requirements.in
pillow==10.3.0
# via streamlit
protobuf==4.25.3
# via streamlit
psycopg[binary]==3.1.18
# via -r cookbook/llms/groq/rag/requirements.in
psycopg-binary==3.1.18
# via psycopg
pyarrow==15.0.2
pyarrow==16.0.0
# via streamlit
pycparser==2.22
# via cffi
pydantic==2.7.0
# via
# groq
# openai
# phidata
# pydantic-settings
pydantic-core==2.18.1
Expand All @@ -134,8 +106,6 @@ pydeck==0.8.1b0
# via streamlit
pygments==2.17.2
# via rich
pypdf==4.2.0
# via -r cookbook/llms/groq/rag/requirements.in
python-dateutil==2.9.0.post0
# via pandas
python-dotenv==1.0.1
Expand All @@ -150,8 +120,13 @@ referencing==0.34.0
# via
# jsonschema
# jsonschema-specifications
regex==2024.4.16
# via tiktoken
requests==2.31.0
# via streamlit
# via
# streamlit
# tavily-python
# tiktoken
rich==13.7.1
# via
# phidata
Expand All @@ -172,15 +147,14 @@ sniffio==1.3.1
# anyio
# groq
# httpx
# openai
soupsieve==2.5
# via beautifulsoup4
sqlalchemy==2.0.29
# via -r cookbook/llms/groq/rag/requirements.in
streamlit==1.33.0
# via -r cookbook/llms/groq/rag/requirements.in
# via -r cookbook/llms/groq/research/requirements.in
tavily-python==0.3.3
# via -r cookbook/llms/groq/research/requirements.in
tenacity==8.2.3
# via streamlit
tiktoken==0.6.0
# via tavily-python
toml==0.10.2
# via streamlit
tomli==2.0.1
Expand All @@ -189,19 +163,16 @@ toolz==0.12.1
# via altair
tornado==6.4
# via streamlit
tqdm==4.66.2
# via openai
typer==0.12.3
# via phidata
typing-extensions==4.11.0
# via
# altair
# anyio
# groq
# openai
# phidata
# psycopg
# pydantic
# pydantic-core
# sqlalchemy
# streamlit
# typer
tzdata==2024.1
Expand Down

0 comments on commit 5a0e1d5

Please sign in to comment.