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.models.openai import OpenAIChat task = ( "分析导致 1919 年签署《凡尔赛条约》的关键因素。 " "讨论该条约对德国的政治、经济和社会影响,以及它如何促成了第二次世界大战的爆发。 " "提供包含多种历史观点的细致评估。" ) reasoning_agent = Agent( model=OpenAIChat(id="gpt-4o"), reasoning=True, markdown=True, ) reasoning_agent.print_response(task, stream=True, show_full_reasoning=True)
创建虚拟环境
Terminal
python3 -m venv .venv source .venv/bin/activate
设置您的 API 密钥
export OPENAI_API_KEY=xxx
安装库
pip install -U openai agno
运行示例
python cookbook/reasoning/agents/analyse_treaty_of_versailles.py