Skip to content

Commit

Permalink
fix input arg in flows
Browse files Browse the repository at this point in the history
  • Loading branch information
noamlevy81 committed Jan 20, 2025
1 parent 436d7b6 commit 25474a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nemoguardrails/library/activefence/flows.co
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Adult Content General
Privacy Violation PII
"""

define flow activefence moderation on input
flow activefence moderation on input
"""Guardrail based on the maximum risk score."""
$result = await CallActivefenceApiAction(text=$input_text)
$result = await CallActivefenceApiAction(text=$user_message)

if $result.max_risk_score > 0.7
if $system.config.enable_rails_exceptions
Expand All @@ -26,7 +26,7 @@ define flow activefence moderation on input

flow activefence moderation on output
"""Guardrail based on the maximum risk score."""
$result = await CallActivefenceApiAction(text=$input_text)
$result = await CallActivefenceApiAction(text=$bot_message)

if $result.max_risk_score > 0.7
if $system.config.enable_rails_exceptions
Expand All @@ -37,7 +37,7 @@ flow activefence moderation on output

flow activefence moderation on input detailed
"""Guardrail based on individual risk scores."""
$result = await CallActivefenceApiAction(text=$input_text)
$result = await CallActivefenceApiAction(text=$user_message)

if $result.violations.get("abusive_or_harmful.harassment_or_bullying", 0) > 0.8
if $system.config.enable_rails_exceptions
Expand Down

0 comments on commit 25474a8

Please sign in to comment.