This tool is used to extract text from images. When passed to the agent it will extract the text from the image and then use it to generate a response, report or any other output.
The URL or the PATH of the image should be passed to the Agent.
In order to use the VisionTool, the OpenAI API key should be set in the environment variable OPENAI_API_KEY.
Code
Copy
Ask AI
from crewai_tools import VisionToolvision_tool = VisionTool()@agentdef researcher(self) -> Agent: ''' This agent uses the VisionTool to extract text from images. ''' return Agent( config=self.agents_config["researcher"], allow_delegation=False, tools=[vision_tool] )