States
State Meta
Additional properties assigned to states. Can be used to enable specific AI functionality and more.
There are some additional settings that can be assigned to states to enable functionality.
These settings are typically used to enable AI and more.
They are set in the state part of the stub definition.
The settings are set in the state_meta
object of each action definition.
Basic Usage
Properties
ai_enabled
Whether this state is AI enabled. States that are AI enabled have additional functionality when they are entered or left.
Default: false
ai_details
An object containing the specific properties for AI behavior regarding the state_meta
.
ai_details.inject_description_as_message
Determines if the state description should be injected into the default assistant chat of a stub when the state is entered. This allows you to automatically change the instructions to the assistant to be state dependent without having to run an action to inject a new system message.
Default: true
(only if ai_enabled
is true
)
ai_details.clear_all_system_messages_except_first
This will clear all system messages, except for the system message in position 0 of the chat messages. The "first" system message will still be cleared if it is in eg. position 3 in the chat messages.
Default: true
ai_details.chat_name
Sometimes there can be multiple assistant chats on the same stub, this parameter can be used to choose which chat the changes specified in the ai_details
apply to.
Default: null
ai_details.inject_custom_messages
This can be used to inject additional messages into the assistant chat, in addition to the state description system message. If specified, this will be injected even if the state does not have a description to inject, or if if inject_description_as_message
is false
.
Example:
Default: null