File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
nemoguardrails/actions/v2_x Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -413,19 +413,19 @@ async def passthrough_llm_action(
413413 raw_prompt = raw_llm_request .get ()
414414
415415 if raw_prompt is None :
416- prompt = event ["text " ]
416+ prompt = event ["final_transcript " ]
417417 else :
418418 if isinstance (raw_prompt , str ):
419419 # If we're in completion mode, we use directly the last $user_message
420420 # as it may have been altered by the input rails.
421- prompt = event ["text " ]
421+ prompt = event ["final_transcript " ]
422422 elif isinstance (raw_prompt , list ):
423423 prompt = raw_prompt .copy ()
424424
425425 # In this case, if the last message is from the user, we replace the text
426426 # just in case the input rails may have altered it.
427427 if prompt [- 1 ]["role" ] == "user" :
428- raw_prompt [- 1 ]["content" ] = event ["text " ]
428+ raw_prompt [- 1 ]["content" ] = event ["final_transcript " ]
429429 else :
430430 raise ValueError (f"Unsupported type for raw prompt: { type (raw_prompt )} " )
431431
You can’t perform that action at this time.
0 commit comments