Skip to content

Commit 12b9675

Browse files
committed
Keeping the $last_bot_message as well.
1 parent 75249cc commit 12b9675

File tree

1 file changed

+5
-0
lines changed
  • nemoguardrails/colang/v2_x/library

1 file changed

+5
-0
lines changed

nemoguardrails/colang/v2_x/library/core.co

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,19 @@ flow bot refuse to respond
163163
flow tracking bot talking state
164164
"""tracking bot talking state in global variable $bot_talking_state."""
165165
global $bot_talking_state
166+
167+
# TODO: keeping both for backwards compatibility reason. To clean up.
166168
global $last_bot_script
169+
global $last_bot_message
170+
167171
if $bot_talking_state == None
168172
$bot_talking_state = False
169173
await bot started saying something
170174
$bot_talking_state = True
171175
await bot said something as $bot_said_flow
172176
$bot_talking_state = False
173177
$last_bot_script = $bot_said_flow.text
178+
$last_bot_message = $bot_said_flow.text
174179

175180
@loop("state_tracking")
176181
flow tracking user talking state

0 commit comments

Comments
 (0)