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.
reasoning=True
from agno.agent import Agent from agno.models.openai import OpenAIChat reasoning_agent = Agent( model=OpenAIChat(id="gpt-4o"), reasoning_model=OpenAIChat( id="gpt-4o", max_tokens=1200 ), # 应默认为手动 COT,因为它不是原生推理模型 markdown=True, ) reasoning_agent.print_response( "Give me steps to write a python script for fibonacci series", stream=True, show_full_reasoning=True, ) # 它使用 Agent 的默认模型 reasoning_agent = Agent( model=OpenAIChat(id="gpt-4o", max_tokens=1200), reasoning=True, markdown=True, ) reasoning_agent.print_response( "Give me steps to write a python script for fibonacci series", 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/default_chain_of_thought.py