Code
cookbook/models/ollama/image_agent.py
Usage
Install Ollama
Follow the installation guide and run:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
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(
"Write a 3 sentence fiction story about the image",
images=[Image(filepath=image_path)],
)
Create a virtual environment
Terminal and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Install Ollama
ollama pull llama3.2-vision
Was this page helpful?