Demo Qwen 2.5 32B
Query a recipe knowledge base with the current Qwen3.6 replacement on Groq.
Groq retired the source's Qwen-2.5-32b model in April 2025. Replace it with qwen/qwen3.6-27b. See Groq deprecations.
"""Run `uv pip install ddgs sqlalchemy pgvector pypdf openai groq` to install dependencies."""
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.models.groq import Groq
from agno.vectordb.pgvector import PgVector
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
knowledge = Knowledge(
vector_db=PgVector(table_name="recipes", db_url=db_url),
)
# Add content to the knowledge
knowledge.insert(url="https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf")
agent = Agent(model=Groq(id="Qwen-2.5-32b"), knowledge=knowledge)
agent.print_response("How to make Thai curry?", markdown=True)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
passRun the Example
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activateInstall dependencies
uv pip install -U agno "psycopg[binary]" beautifulsoup4 groq openai pgvector pypdf sqlalchemyExport your API keys
export GROQ_API_KEY="your_groq_api_key_here"
export OPENAI_API_KEY="your_openai_api_key_here"Run PgVector
docker run -d \
-e POSTGRES_DB=ai \
-e POSTGRES_USER=ai \
-e POSTGRES_PASSWORD=ai \
-e PGDATA=/var/lib/postgresql \
-v pgvolume:/var/lib/postgresql \
-p 5532:5432 \
--name pgvector \
agnohq/pgvector:18Replace Qwen 2.5 32B
Replace Qwen-2.5-32b with qwen/qwen3.6-27b in the saved file.
Run the example
Save the code above as demo_qwen_2_5_32B.py, then run:
python demo_qwen_2_5_32B.pyFull source: cookbook/90_models/groq/reasoning/demo_qwen_2_5_32B.py