# לקרוא את הטקסט

> קורא את הטקסט שבתוך המסמך, בחינם. בסריקה או בתמונה אין טקסט, ולכן הוא מסמן שהמסמך סרוק, ושלב סוכן AI אחריו יכול לקרוא את הקובץ בעצמו.

Source: https://docs.go-lumen.ai/he/reference/steps/read-text

## במבט אחד

| מאפיין | ערך |
| --- | --- |
| **שם השלב** | `read-text` |
| **משאב** | ClusterStep (`lumen.ai/v1alpha1`) |
| **קבוצה וקטגוריה** | read, files |
| **קרדיטים** | **1** קרדיט בכל פעם שהוא מצליח |
| **השפעה חיצונית** | לא |
| **ההתקנה צריכה לספק** | כלום |

## קלט

| מאפיין | ערך |
| --- | --- |
| **צריך** | `file` |
| **מפיק** | `text` |
| **עובד על** | item: מסמך אחד בכל פעם |

״צריך״ ו״מפיק״ הם סוגי נתונים (file, text, fields, email). העורך מציע שלב רק במקום שבו מה שהוא צריך כבר נמצא במסלול. ראו [מסמכים ונתונים](https://docs.go-lumen.ai/he/concepts/how-flows-run.md#documents-and-data).

## פלט

צומת מאוחר יותר מפנה לפלט כ-`{nodeId.field}` בטקסט, או כ-`nodeId.field` בתנאי.

| פלט | סוג |
| --- | --- |
| `text` | string |
| `scanned` | boolean |

## הגדרות

מגדירים תחת `config:` בצומת של התהליך. הגדרות טקסט יכולות להכיל מצייני מקום כמו `{nodeId.field}`.

| הגדרה | סוג | ברירת מחדל | תיאור |
| --- | --- | --- | --- |
| `fallback` | string | `"none"` | Fallback is what happens to a scan or a photo, which has no text inside: none (the default) passes it on with no text and scanned true, for an AI agent step to read the file itself; ocr reads it with OCR, not available yet. (one of none, ocr) |
| `pages` | boolean |  | Pages marks where each page of a PDF starts, a line \[\[page N\]\] before it, in reading order, so what reads the text after can say which page a passage is on (Lighthouse citations). Off keeps the text as it always was. |

ה-JSON Schema המלא של ההגדרות: [read-text.schema.json](https://docs.go-lumen.ai/schemas/steps/read-text.schema.json).

## שימוש בתהליך

צומת שמריץ את `read-text` נכנס תחת `spec.nodes` של [Flow](https://docs.go-lumen.ai/he/concepts/how-flows-run.md#the-flow-as-yaml). תנו לו כל מזהה, ורשמו ב-next את מזהי הצמתים הבאים.

```yaml title="flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: read-text-example
  namespace: tenant-acme
spec:
  displayName: "Read the text"
  triggers:
    - id: start
      ref: {name: manual-run}
      next: [read-text]
  nodes:
    - id: read-text
      stepRef: {name: read-text}
```
