Back to Agno

Perplexity Cookbook

cookbook/90_models/perplexity/README.md

2.6.4743 B
Original Source

Perplexity Cookbook

Note: Fork and clone this repository if needed

1. Create and activate a virtual environment

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

2. Export your PERPLEXITY_API_KEY

shell
export PERPLEXITY_API_KEY=***

3. Install libraries

shell
uv pip install -U ddgs duckdb agno

4. Run basic Agent

  • Streaming on
shell
python cookbook/92_models/cohere/basic_stream.py
  • Streaming off
shell
python cookbook/92_models/cohere/basic.py

5. Run Agent with Tools

  • DuckDuckGo Search
shell
python cookbook/92_models/cohere/tool_use.py

6. Run Agent with Knowledge

shell
python cookbook/92_models/perplexity/knowledge.py