Files
crewAI/docs/v1.15.2/ar/tools/ai-ml/visiontool.mdx
Lorenze Jay 289686ab49
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
[docs-freeze] docs: snapshot and changelog for v1.15.2 (#6479)
2026-07-07 19:05:05 -07:00

51 lines
1.5 KiB
Plaintext

---
title: أداة الرؤية
description: أداة `VisionTool` مصممة لاستخراج النص من الصور.
icon: eye
mode: "wide"
---
# `VisionTool`
## الوصف
تُستخدم هذه الأداة لاستخراج النص من الصور. عند تمريرها إلى الوكيل، ستستخرج النص من الصورة ثم تستخدمه لتوليد استجابة أو تقرير أو أي مخرج آخر.
يجب تمرير عنوان URL أو مسار الصورة إلى الوكيل.
## التثبيت
ثبّت حزمة crewai_tools
```shell
pip install 'crewai[tools]'
```
## الاستخدام
لاستخدام VisionTool، يجب تعيين مفتاح API الخاص بـ OpenAI في متغير البيئة `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]
)
```
## المعاملات
تتطلب VisionTool المعاملات التالية:
| المعامل | النوع | الوصف |
| :----------------- | :------- | :------------------------------------------------------------------------------- |
| **image_path_url** | `string` | **إلزامي**. مسار ملف الصورة المراد استخراج النص منها. |