Change Mode
Changes the runtime mode of the Assistant, enabling or disabling specific features like prompts and streaming.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Options
- Enable Prompt - Enables or disables the prompt functionality. Default is True.
- Enable Streaming - Enables or disables the streaming functionality. Default is False.
Output
- Stream - The stream object containing connection details when streaming is enabled.
How It Works
The Change Mode node modifies the runtime behavior of the Assistant. When executed, the node:
- Sends a command to change the Assistant's mode based on the selected options
- If streaming is enabled, creates a streaming endpoint for real-time communication
- Returns stream connection details when streaming is enabled
Requirements
- A properly configured Assistant environment
- Valid permissions to change Assistant modes
Error Handling
The node will return specific errors in the following cases:
- Streaming creation timeout
- Network communication errors
- Invalid configuration options
- Permission denied errors
Usage Notes
- When Enable Streaming is set to True, the node creates an HTTP endpoint for streaming data
- The Stream output contains the address, method, and path for the streaming endpoint
- The Enable Prompt option controls whether the Assistant can receive prompts
- Streaming is useful for real-time interactions with the Assistant
- Changes to mode take effect immediately after the node executes