Skip to content

Commit a278144

Browse files
committed
Fixed bad merge of GenerationOptions in llmrails.py (code referred to options, not gen_options)
1 parent 5e46e5a commit a278144

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nemoguardrails/rails/llm/llmrails.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,9 +843,8 @@ async def generate_async(
843843
if (
844844
messages
845845
and messages[-1]["role"] == "assistant"
846-
and options
847-
and hasattr(options, "rails")
848-
and getattr(getattr(options, "rails"), "dialog", None) is False
846+
and gen_options
847+
and gen_options.rails.dialog is False
849848
):
850849
# We already have the first message with a context update, so we use that
851850
messages[0]["content"]["bot_message"] = messages[-1]["content"]

0 commit comments

Comments
 (0)