Skip to content

Commit c8fd3f6

Browse files
fixup: Address CoPilot comments
1 parent 6155e38 commit c8fd3f6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

nemoguardrails/library/trend_micro/actions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,8 @@ async def trend_ai_guard(text: Optional[str] = None):
6868
log.debug("Trend Micro AI Guard Result: %s", guard_result)
6969
except Exception as e:
7070
log.error("Error calling Trend Micro AI Guard API: %s", e)
71-
return GuardResult(action="allow", reason=str(e))
71+
return GuardResult(
72+
action="allow",
73+
reason="An error occurred while calling the Trend Micro AI Guard API.",
74+
)
7275
return guard_result

tests/test_trend_ai_guard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_trend_ai_guard_error(
6969
is_reusable=True, status_code=status_code, json={"result": {}}
7070
)
7171

72-
chat = TestChat(output_rail_config, llm_completions=[" Hello!"]) ## ??
72+
chat = TestChat(output_rail_config, llm_completions=[" Hello!"])
7373

7474
chat >> "Hi!"
7575
chat << "Hello!"

0 commit comments

Comments
 (0)