mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
* docs(cli): document device-code login and config reset guidance; renumber sections * docs(cli): fix duplicate numbering (renumber Login/API Keys/Configuration sections) * docs: Fix webhook documentation to include meta dict in all webhook payloads - Add note explaining that meta objects from kickoff requests are included in all webhook payloads - Update webhook examples to show proper payload structure including meta field - Fix webhook examples to match actual API implementation - Apply changes to English, Korean, and Portuguese documentation Resolves the documentation gap where meta dict passing to webhooks was not documented despite being implemented in the API. * WIP: CrewAI docs theme, changelog, GEO, localization * docs(cli): fix merge markers; ensure mode: "wide"; convert ASCII tables to Markdown (en/pt-BR/ko) * docs: add group icons across locales; split Automation/Integrations; update tools overviews and links
51 lines
1.3 KiB
Plaintext
51 lines
1.3 KiB
Plaintext
---
|
|
title: Vision Tool
|
|
description: The `VisionTool` is designed to extract text from images.
|
|
icon: eye
|
|
mode: "wide"
|
|
---
|
|
|
|
# `VisionTool`
|
|
|
|
## Description
|
|
|
|
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.
|
|
|
|
## Installation
|
|
|
|
Install the crewai_tools package
|
|
|
|
```shell
|
|
pip install 'crewai[tools]'
|
|
```
|
|
|
|
## Usage
|
|
|
|
In order to use the VisionTool, the OpenAI API key should be set in the environment variable `OPENAI_API_KEY`.
|
|
|
|
```python Code
|
|
from crewai_tools import VisionTool
|
|
|
|
vision_tool = VisionTool()
|
|
|
|
@agent
|
|
def 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]
|
|
)
|
|
```
|
|
|
|
## Arguments
|
|
|
|
The VisionTool requires the following arguments:
|
|
|
|
| Argument | Type | Description |
|
|
| :----------------- | :------- | :------------------------------------------------------------------------------- |
|
|
| **image_path_url** | `string` | **Mandatory**. The path to the image file from which text needs to be extracted. |
|