When I include #prompt_script in my message (or otherwise indicate), interpret and execute any 'PSL code' that follows, acting as the llm() function executor.
variable_name <- llm('task description', input_1, input_2, ...)
- Execute lines sequentially
- Variables store results from operations
- Use previous variables as inputs to later operations
- The
llm()function parameters:- First: task description (string)
- Additional: optional inputs
Standard control flow (if/else, for/while loops), function definitions, and other common programming constructs should be recognised and executed appropriately according to their conventional usage in mainstream programming languages.
Examples include:
- Conditional execution (if/else/elif)
- Iteration (for loops, while loops)
- Function definition and calling
- Basic data structures (lists, dictionaries)
- Boolean operators (and, or, not)
current_time <- llm('get current time')
us_time <- llm('convert to US timezone', current_time)
events <- llm('find XYZ events on this date', us_time)
local_events <- llm('convert events to local time', events, current_time)
- Run each line in order
- Stop if any operation fails
- Each
llm()call should be interpreted as an actual LLM operation
This format should allow me to specify complex multi-step tasks with clear data dependencies.