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.litellm import LiteLLM from agno.tools.yfinance import YFinanceTools openai_agent = Agent( model=LiteLLM( id="gpt-4o", name="LiteLLM", ), markdown=True, tools=[YFinanceTools()], ) # 提出一个可能触发工具使用的问题 openai_agent.print_response("How is TSLA stock doing right now?")
创建虚拟环境
Terminal
python3 -m venv .venv source .venv/bin/activate
设置你的 API 密钥
export LITELLM_API_KEY=xxx
安装库
pip install -U litellm openai agno
运行代理
python cookbook/models/litellm/tool_use.py