Read the text
read-textreadReads the text inside the document, free. A scan or a photo has none, so it says the document is scanned, and an AI agent step after it can read the file itself.
De un vistazo
| Propiedad | Valor |
|---|---|
| Nombre del paso | read-text |
| Recurso | ClusterStep (lumen.ai/v1alpha1) |
| Grupo de la paleta, categoría | read, files |
| Créditos | 1 crédito cada vez que tiene éxito |
| Efectos externos | no |
| La instalación debe aportar | nada |
Entradas
| Propiedad | Valor |
|---|---|
| Necesita | file |
| Produce | text |
| Trabaja sobre | item un documento cada vez |
Necesita y Produce son tipos de datos (file, text, fields, email). El editor ofrece un paso solo donde lo que necesita ya está en el camino. Consulta Documentos y datos.
Salidas
Un nodo posterior se refiere a una salida como {nodeId.field} en un texto, o nodeId.field en una condición.
| Salida | Tipo |
|---|---|
text | string |
scanned | boolean |
Ajustes
Se definen bajo config: en el nodo del flujo. Los ajustes de texto pueden contener marcadores de posición como {nodeId.field}.
| Ajuste | Tipo | Valor por defecto | Descripción |
|---|---|---|---|
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. |
El JSON Schema completo de estos ajustes: read-text.schema.json.
Úsalo en un flujo
Un nodo que ejecuta read-text va bajo spec.nodes de un Flow. Dale cualquier id y enumera en next los ids de los nodos siguientes.
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}