rasa.core.training.interactive
RestartConversation Objects
Exception used to break out the flow and restart the conversation.
ForkTracker Objects
Exception used to break out the flow and fork at a previous step.
The tracker will be reset to the selected point in the past and the conversation will continue from there.
UndoLastStep Objects
Exception used to break out the flow and undo the last step.
The last step is either the most recent user message or the most recent action run by the bot.
Abort Objects
Exception used to abort the interactive learning and exit.
send_message
Send a user message to a conversation.
request_prediction
Request the next action prediction from core.
retrieve_domain
Retrieve the domain from core.
retrieve_status
Retrieve the status from core.
retrieve_tracker
Retrieve a tracker from core.
send_action
Log an action to a conversation.
send_event
Log an event to a conversation.
format_bot_output
Format a bot response to be displayed in the history table.
latest_user_message
Return most recent user message.
is_listening_for_message
Check if the conversation is in need for a user message.
intent_names_from_domain
Get a list of the possible intents names from the domain specification.
This is its own function as intents are non-trivial to unpack and this warrants testing.
record_messages
Read messages from the command line and print bot responses.
start_visualization
Add routes to serve the conversation visualization files.
run_interactive_learning
Start the interactive learning with the model of the agent.
calc_true_wrapping_width
Calculates a wrapping width that also works for CJK characters.
Chinese, Japanese and Korean characters are often broader than ascii characters: abcdefgh (8 chars) 我è¦åŽ»åŒ—京 (5 chars, roughly same visible width)
We need to account for that otherwise the wrapping doesn't work appropriately for long strings and the table overflows and creates errors.
params: text: text sequence that should be wrapped into multiple lines monospace_wrapping_width: the maximum width per line in number of standard ascii characters returns: The maximum line width for the given string that takes into account the strings visible width, so that it won't lead to table overflow.