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, RunResponse # noqa from agno.models.ollama import Ollama from agno.tools.yfinance import YFinanceTools from ollama import Client as OllamaClient agent = Agent( model=Ollama(id="llama3.2", client=OllamaClient()), tools=[YFinanceTools(stock_price=True)], markdown=True, ) # 在终端打印响应 agent.print_response("写一个两句的恐怖故事")
创建虚拟环境
Terminal
python3 -m venv .venv source .venv/bin/activate
安装 Ollama
ollama pull llama3.2
安装库
pip install -U ollama yfinance agno
运行 Agent
python cookbook/models/ollama/set_client.py