- OPERATORS
- MODIFIERS
File In
v1.0.1updatedThe File In operator loads conversation data from DAT, JSON, CSV, TSV, and TXT files into its output DAT. It provides multiple modes for locating the right file — direct path, latest from a folder, date-based subfolder lookup, or agent name matching — making it useful for restoring saved conversations or importing external data into a LOPs network.
Input/Output
Section titled “Input/Output”Inputs
Section titled “Inputs”None. File paths are configured via parameters.
Outputs
Section titled “Outputs”- Output 1 (DAT): A table containing the loaded conversation data, ready to wire into downstream operators.
Usage Examples
Section titled “Usage Examples”Loading the Most Recent Conversation Log
Section titled “Loading the Most Recent Conversation Log”- Set Load Folder to the directory where your conversation logs are saved (e.g., the same folder used by a File Out operator).
- Set Load File Mode to Latest from Folder.
- Pulse Load Now. The operator finds the newest file across the folder and all subfolders, then loads its contents into the output DAT.
Loading a Specific Day’s Log
Section titled “Loading a Specific Day’s Log”- Set Load Folder to the base directory containing date-named subfolders (e.g., a folder with
2025-12-01/,2025-12-02/, etc.). - Set Load File Mode to By Date.
- To load today’s log, toggle Today on. To load from a past date, turn Today off and enter the date in
YYYY-MM-DDformat into Load Date. - Pulse Load Now. The operator loads the latest file found inside the matching date subfolder.
Loading a Specific File
Section titled “Loading a Specific File”- Set Load File Mode to Specific File.
- Use the Specific File parameter to browse to or paste the path of the file you want to load.
- Pulse Load Now.
Restoring an Agent’s Last Session
Section titled “Restoring an Agent’s Last Session”- Set Load Folder to the directory where agent conversations are saved.
- Set Load File Mode to By Agent.
- Enter the agent’s name in the Agent Name field. The search is case-insensitive.
- Pulse Load Now. The operator searches all subfolders for
.datfiles containing the agent name, and loads the most recent match.
Auto-Loading on Project Start
Section titled “Auto-Loading on Project Start”Toggle Auto Load on Startup on to automatically load the configured file whenever the TouchDesigner project opens. This is useful for restoring agent memory or seeding a conversation on launch.
Technical Notes
Section titled “Technical Notes”- The operator parses files based on their extension. Ensure file contents match the expected format for the extension.
- JSON files should contain a list of dictionaries, where each dictionary represents a row and its keys become column headers.
- TXT files are parsed as tab-separated values.
- DAT and CSV/TSV files are loaded natively through TouchDesigner’s built-in file handling.
- The Last Load Time and Output Display read-only parameters show the timestamp of the last successful load and its status or any error messages.
Troubleshooting
Section titled “Troubleshooting”- “No file found to load”: Verify that Load Folder points to a valid directory and that it contains files matching the selected mode. For By Date mode, ensure a subfolder exists with the exact date string. For By Agent mode, ensure
.datfiles containing the agent name exist in the folder tree. - “Unsupported file type”: The operator only supports
.dat,.json,.csv,.tsv, and.txtextensions. Rename or convert your file if needed. - “Invalid JSON format”: The JSON file must be a list of dictionaries (e.g.,
[{"role": "user", "content": "hello"}]). A single dictionary or other structure will not parse correctly.
Parameters
Section titled “Parameters”File Input
Section titled “File Input” Load Now (Loadpulse)
op('file_in').par.Loadpulse Pulse - Default:
False
Specific File (Specificfile)
op('file_in').par.Specificfile File - Default:
"" (Empty String)
Load Folder (Loadfolder)
op('file_in').par.Loadfolder Folder - Default:
"" (Empty String)
Today (Today)
op('file_in').par.Today Toggle - Default:
False
Load Date (YYYY-MM-DD) (Loaddate)
op('file_in').par.Loaddate Str - Default:
"" (Empty String)
Agent Name (Agentname)
op('file_in').par.Agentname Str - Default:
"" (Empty String)
Last Load Time (Lastload)
op('file_in').par.Lastload Str - Default:
"" (Empty String)
Output Display (Outputdisplay)
op('file_in').par.Outputdisplay Str - Default:
"" (Empty String)
Auto Load on Startup (Autoload)
op('file_in').par.Autoload Toggle - Default:
False
Changelog
Section titled “Changelog”v1.0.12026-04-15
- Fix: distributed TOX was a Chat operator clone instead of file_in (wrong operator saved during previous dist build)
- Re-exported correct master COMP as TOX (34KB Chat clone -> 9.7KB correct file_in)
- Add compose.json for agent composition support
v1.0.02024-11-06
Initial release