From 5a0e1d511ce670b14af49ef6858d74be550808b1 Mon Sep 17 00:00:00 2001 From: Ashpreet Bedi Date: Sun, 21 Apr 2024 20:14:46 +0100 Subject: [PATCH] v2.3.80 --- cookbook/llms/groq/research/README.md | 42 +++-------- cookbook/llms/groq/research/requirements.in | 8 +-- cookbook/llms/groq/research/requirements.txt | 73 ++++++-------------- 3 files changed, 31 insertions(+), 92 deletions(-) diff --git a/cookbook/llms/groq/research/README.md b/cookbook/llms/groq/research/README.md index 40356b7b6..7a82d55cf 100644 --- a/cookbook/llms/groq/research/README.md +++ b/cookbook/llms/groq/research/README.md @@ -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. diff --git a/cookbook/llms/groq/research/requirements.in b/cookbook/llms/groq/research/requirements.in index fea5401d6..04248e0cf 100644 --- a/cookbook/llms/groq/research/requirements.in +++ b/cookbook/llms/groq/research/requirements.in @@ -1,10 +1,4 @@ groq -openai -pgvector phidata -psycopg[binary] -pypdf -sqlalchemy streamlit -bs4 -duckduckgo-search +tavily-python diff --git a/cookbook/llms/groq/research/requirements.txt b/cookbook/llms/groq/research/requirements.txt index 14efe46c7..84fc6b1e9 100644 --- a/cookbook/llms/groq/research/requirements.txt +++ b/cookbook/llms/groq/research/requirements.txt @@ -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 @@ -12,42 +12,29 @@ 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 @@ -55,7 +42,7 @@ gitpython==3.1.43 # 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 @@ -63,7 +50,6 @@ httpcore==1.0.5 httpx==0.27.0 # via # groq - # openai # phidata idna==3.7 # via @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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