Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
from agno.agent import Agent from agno.media import File from agno.models.openai.responses import OpenAIResponses agent = Agent( model=OpenAIResponses(id="gpt-4o-mini"), tools=[{"type": "file_search"}, {"type": "web_search_preview"}], markdown=True, ) agent.print_response( "总结附件文件的内容,并搜索网络以获取更多信息。", files=[File(url="https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf")], ) print("引用:") print(agent.run_response.citations)
创建虚拟环境
Terminal
python3 -m venv .venv source .venv/bin/activate
设置你的 API 密钥
export OPENAI_API_KEY=xxx
安装库
pip install -U openai agno
运行代理
python cookbook/models/openai/responses/pdf_input_url.py