There was an error while loading. Please reload this page.
1 parent 2ebd6fa commit c8e9bdeCopy full SHA for c8e9bde
nemoguardrails/actions/v2_x/generation.py
@@ -159,7 +159,8 @@ async def _collect_user_intent_and_examples(
159
# We add these in reverse order so the most relevant is towards the end.
160
for result in reversed(results):
161
examples += f"user action: user said \"{result.text}\"\nuser intent: {result.meta['intent']}\n\n"
162
- potential_user_intents.append(result.meta["intent"])
+ if result.meta["intent"] not in potential_user_intents:
163
+ potential_user_intents.append(result.meta["intent"])
164
165
# We add all currently active user intents (heads on match statements)
166
heads = find_all_active_event_matchers(state)
0 commit comments