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 pathlib import Path from agno.agent import Agent from agno.media import Image from agno.models.ollama import Ollama agent = Agent( model=Ollama(id="llama3.2-vision"), markdown=True, ) image_path = Path(__file__).parent.joinpath("super-agents.png") agent.print_response( "写一个关于这张图片的3句话的虚构故事", images=[Image(filepath=image_path)], )
创建虚拟环境
Terminal
python3 -m venv .venv source .venv/bin/activate
安装 Ollama
ollama pull llama3.2-vision
安装库
pip install -U ollama agno
运行代理
python cookbook/models/ollama/image_agent.py