Input Text File icon

Input Text File

2 VersionenInput

Text file streamer. The worker enumerates files under the {{param:text}} directory slot, reads each one into memory, and emits the bytes as a single {{type:String}} message per file; {{param:repeat}} loops the directory and {{param:fps}} paces the loop.

How it fits

{{param:text}} (text files) -> {{component:input_text_file}} -> {{type:String}}
                          |
                          +-- enumerate files under {{param:text}} in sorted order
                          +-- read each file fully into memory as raw bytes
                          +-- emit one {{type:String}} per file
                          +-- loop the playlist under {{param:repeat}} at {{param:fps}} Hz

Pick this for plain text or any text-shaped corpus (markdown, json, html, srt, vtt, csv, tsv, jsonl, xml, yaml, toml, log, config, sql, script, protobuf, certificate). For PDFs prefer {{component:input_pdf}}; for structured CSV ingest prefer {{component:input_csv_file}}.

Typical backends

  • Prompt corpus replay: {{component:input_text_file}} -> {{component:generate_text_ollama}} -> {{component:send_http}}.
  • Document chunking: {{component:input_text_file}} -> {{component:chunk_text_rag}} -> {{component:extract_text_embedding_bge}} -> {{component:build_vector_index_faiss}}.
  • Email blast from templates: {{component:input_text_file}} -> {{component:output_smtp_email}}.

Caveats

  • Files are loaded FULLY into memory before emission; pointing the slot at multi-GB logs causes the worker's RSS to grow proportionally.
  • {{param:text}} is treated as a DIRECTORY; nested subdirectories are NOT walked.
  • Bytes are exposed verbatim as {{type:String}}. Non-UTF-8 content passes through unchanged and may break downstream consumers that assume UTF-8.
  • The file_schema accepts any of the text-shaped extensions (text|markdown|html|srt|vtt|csv|tsv|json|jsonl|xml|yaml|toml|log|config|sql|script|protobuf|certificate); the worker does NOT validate format — it just reads raw bytes.
  • File-watching is NOT implemented; mid-loop file changes are picked up only on the next pass (or when {{param:text}} is updated).
  • {{param:fps}} ONLY paces emissions in {{param:repeat}} true mode; in {{param:repeat}} false mode the worker emits each file as fast as the consumer pulls and then idles.
  • {{param:text}}, {{param:repeat}}, and {{param:fps}} are hot-swappable; a {{param:text}} path change interrupts the current playlist and restarts from the new directory.

Versionen

  • 4611cd87defaultlinux/amd64

    Automated release