Skip to content

Latest commit

 

History

History

groq

Groq AI

Note: Fork and clone this repository if needed

1. Create a virtual environment

python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate

2. Install libraries

pip install -U groq phidata

3. Export GROQ API Key

export GROQ_API_KEY=***

4. Run Assistants

  • basic
python cookbook/llms/groq/basic.py
  • web search
python cookbook/llms/groq/assistant.py
  • structured output
python cookbook/llms/groq/structured_output.py

5. Financial analyst

Install libraries

pip install -U yfinance

Run using:

python cookbook/llms/groq/finance.py

Ask questions like:

  • What's the NVDA stock price
  • Summarize fundamentals for TSLA

6. Data analyst

Install libraries

pip install -U duckdb

Run using:

python cookbook/llms/groq/data_analyst.py

Ask questions like:

  • What is the average rating of movies?
  • Who is the most popular actor?
  • Show me a histogram of movie ratings