Skip to content

Report the error with ollama, I would like to know how to use ollama correctly, let VisionAgent generate the code #443

@11avery11

Description

@11avery11

I've modified config.py,this is the error:ValueError: Request failed with status code 404
this is my test code:
from vision_agent.models import AgentMessage
import vision_agent as va
import matplotlib.pyplot as plt

from vision_agent.agent import OllamaVisionAgentCoder

agent = OllamaVisionAgentCoder()

Add your prompt (content) and image file (media)

code_context = agent.generate_code(
[
{
"role" : "user",
"content" : "count how many people in the image",
"media" : ["people.jpg"]
}
]
)

Write the output to a file

with open("generated_code.py", "w") as f:
f.write(code_context.code + "\n" + code_context.test)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions