Skip to main content

OCRTool

Description

Extract text from images (local path or URL). Uses a vision‑capable LLM via CrewAI’s LLM interface.

Installation

No extra install beyond crewai-tools. Ensure your selected LLM supports vision.

Parameters

Run Parameters

  • image_path_url (str, required): Local image path or HTTP(S) URL.

Examples

Direct usage

Code

With an agent

Code

Notes

  • Ensure the selected LLM supports image inputs.
  • For large images, consider downscaling to reduce token usage.
  • You can pass a specific LLM instance to the tool (e.g., LLM(model="gpt-4o")) if needed, matching the README guidance.

Example

Code