Skip to content

Commit 25c61bc

Browse files
committed
refactor: update action and flow for passthrough mode
fix typo
1 parent 7493924 commit 25c61bc

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

nemoguardrails/actions/v2_x/generation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,8 @@ async def generate_user_intent_and_bot_action(
397397
"bot_action": bot_action,
398398
}
399399

400-
@action(name="GenerateBotMessageAction", is_system_action=True, execute_async=True)
401-
async def generate_bot_message_action(
400+
@action(name="PassthroughLLMAction", is_system_action=True, execute_async=True)
401+
async def passthrough_llm_action(
402402
self,
403403
user_message: str,
404404
state: State,

nemoguardrails/colang/v2_x/library/llm.co

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ flow bot say something like $text
1313
await bot say $variation
1414

1515

16-
flow bot responses to user prompt
17-
""" in passthrough mode we just make a call to llm"""
16+
flow bot response to user prompt
17+
"""Just make a call to LLM in passthrough mode"""
1818

1919
activate polling llm request response
2020
await _user_said_something_unexpected as $user_said
@@ -24,10 +24,9 @@ flow bot responses to user prompt
2424

2525
$user_message = $event.final_transcript
2626

27-
if $system.config.passthrough
28-
log "passthrough mode is activated"
29-
$bot_message = await GenerateBotMessageAction(user_message=$user_message)
30-
bot say $bot_message
27+
log 'start generating bot response in passthrough mode...'
28+
$bot_message = await PassthroughLLMAction(user_message=$user_message)
29+
bot say $bot_message
3130

3231
# -----------------------------------
3332
# LLM Utilities
@@ -58,7 +57,7 @@ flow llm continuation
5857
if $system.config.passthrough
5958
activate automating intent detection
6059
activate generating user intent for unhandled user utterance
61-
activate bot responses to user prompt
60+
activate bot response to user prompt
6261
else
6362
activate automating intent detection
6463
activate generating user intent for unhandled user utterance

0 commit comments

Comments
 (0)