0

DeepInfra Cookbook

Example · مثال

Content

DeepInfra Cookbook

Note: Fork and clone this repository if needed
Note: DeepInfra does not appear to include models that support structured outputs.

1. Create and activate a virtual environment

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

2. Export your DEEPINFRA_API_KEY

export DEEPINFRA_API_KEY=***

3. Install libraries

uv pip install -U openai ddgs agno

4. Run basic Agent

python cookbook/90_models/deepinfra/basic.py

5. Run Agent with Tools

  • DuckDuckGo Search
python cookbook/90_models/deepinfra/tool_use.py

6. Run Agent that returns JSON output defined by the response model

python cookbook/90_models/deepinfra/json_output.py

Source and license

Source
Agno
Original
agno-agi/agno/cookbook/90_models/deepinfra
License
Apache-2.0