Tool DAT Operator
Overview
Section titled “Overview”The Tool DAT operator provides a versatile interface for manipulating both Table and Text DATs within TouchDesigner. It enables users to perform a variety of operations such as appending, inserting, deleting, updating, and finding/replacing content. By linking this operator in the Agent LOP’s Tools parameter page, it can be called by the agent to perform operations on DATs based on user instructions. This allows for dynamic modification and management of data within TouchDesigner projects, enhancing automation and interactivity.
Requirements
Section titled “Requirements”- None (standard TouchDesigner installation).
- Must be linked in an Agent LOP’s Tools parameter page to be used by an agent.
Input/Output
Section titled “Input/Output”Inputs
Section titled “Inputs”None
Outputs
Section titled “Outputs”- Target DAT (Table/Text): The DAT specified by the
Target DAT
parameter, which is modified by the operations. - Operation Log (Table DAT): Logs operations performed. Columns:
Timestamp
,Operation
,Target
,Status
,Details
.
Parameters
Section titled “Parameters”Settings Page
Section titled “Settings Page” Tool Name (Toolname)
op('tool_dat').par.Toolname
String - Default:
tool_dat1
Target DAT (Datselect)
op('tool_dat').par.Datselect
DAT - Default:
None
Create If Missing (Createifmissing)
op('tool_dat').par.Createifmissing
Toggle - Default:
On
Clear Before Call (Clearbeforecall)
op('tool_dat').par.Clearbeforecall
Toggle - Default:
On
Clear (Clear)
op('tool_dat').par.Clear
Pulse - Default:
None
Inject Context (Injectcontext)
op('tool_dat').par.Injectcontext
Toggle - Default:
On
DAT Caption (Caption)
op('tool_dat').par.Caption
String - Default:
You can use the dat_tool to modify or add to this table DAT.
Enable Operations (Enableoperations)
op('tool_dat').par.Enableoperations
Toggle - Default:
On
Enable Append (Enableappend)
op('tool_dat').par.Enableappend
Toggle - Default:
On
Enable Insert (Enableinsert)
op('tool_dat').par.Enableinsert
Toggle - Default:
On
Enable Delete (Enabledelete)
op('tool_dat').par.Enabledelete
Toggle - Default:
On
Enable Update (Enableupdate)
op('tool_dat').par.Enableupdate
Toggle - Default:
On
Enable Find/Replace (Enablefindreplace)
op('tool_dat').par.Enablefindreplace
Toggle - Default:
On
Enable Replace All (Enablereplace)
op('tool_dat').par.Enablereplace
Toggle - Default:
On
Make Operations Required (Makerequired)
op('tool_dat').par.Makerequired
Toggle - Default:
Off
Max Rows (Maxrows)
op('tool_dat').par.Maxrows
Integer - Default:
1000
Max Columns (Maxcolumns)
op('tool_dat').par.Maxcolumns
Integer - Default:
20
Max Characters (Maxchars)
op('tool_dat').par.Maxchars
Integer - Default:
10000
Enable Logging (Enablelogging)
op('tool_dat').par.Enablelogging
Toggle - Default:
On
About Page
Section titled “About Page” Bypass (Bypass)
op('tool_dat').par.Bypass
Toggle - Default:
Off
Show Built In Pars (Showbuiltin)
op('tool_dat').par.Showbuiltin
Toggle - Default:
Off
Version (Version)
op('tool_dat').par.Version
String - Default:
1.0.0
Last Updated (Lastupdated)
op('tool_dat').par.Lastupdated
String - Default:
2024-11-06
Creator (Creator)
op('tool_dat').par.Creator
String - Default:
dotsimulate
Website (Website)
op('tool_dat').par.Website
String - Default:
https://dotsimulate.com
ChatTD Operator (Chattd)
op('tool_dat').par.Chattd
OP - Default:
/dot_lops/ChatTD
Performance Considerations
Section titled “Performance Considerations”- Logging adds overhead; disable if not needed.
- Very large DATs will consume more memory and may slow down find/replace operations.
- Context injection adds data to the Agent prompt, potentially increasing token usage.
Usage Examples
Section titled “Usage Examples”Linking to an Agent LOP
Section titled “Linking to an Agent LOP”1. Create a Tool DAT operator.2. Open the Agent LOP parameters.3. Go to the 'Tools' page.4. Drag the Tool DAT operator onto an empty Tool parameter (e.g., Tool 1).5. Ensure the corresponding 'Enable Tool' toggle is On.
Agent Instruction Examples
Section titled “Agent Instruction Examples”# Assuming the Tool DAT is linked and configured
# Appending to a Table DAT (target is a Table DAT)"Use the dat_tool named 'tool_dat1' to append a row to the table DAT '/project1/my_table' with the values 'Apple', 'Red', 'Fruit'."
# Updating a Text DAT (target is a Text DAT)"Use tool_dat1 to update line 3 of the text DAT '/project1/my_text' to 'This is the updated third line'."
# Finding and Replacing in a Table DAT"Using tool_dat1, find all occurrences of 'Orange' in the table '/project1/fruit_table' and replace them with 'Grapefruit'."
# Replacing entire Text DAT content"Use tool_dat1 to replace the entire content of '/project1/config_text' with the following:[Network]Server=192.168.1.100Port=9000"
Common Use Cases
Section titled “Common Use Cases”- Allowing an Agent LOP to dynamically modify data tables.
- Automating data entry or transformation based on conversation.
- Managing configuration files or settings via chat instructions.
- Populating UI elements connected to the target DAT.
- Creating interactive data manipulation tools driven by natural language.