-
Notifications
You must be signed in to change notification settings - Fork 583
feat: Update Trend Micro Vision One AI Guard official endpoint #1546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: Update Trend Micro Vision One AI Guard official endpoint #1546
Conversation
Greptile OverviewGreptile SummaryUpdates the Trend Micro Vision One AI Guard integration from the beta endpoint to the official v3.0 API endpoint (
Critical Issues:
|
| Filename | Score | Overview |
|---|---|---|
| nemoguardrails/library/trend_micro/actions.py | 1/5 | Critical bug: Uses undefined GuardrailRequest class instead of existing Guard class, causing NameError at runtime. Also updates request field from guard to prompt and adds new headers. |
| docs/user-guides/community/trend-micro.md | 2/5 | Documentation updates for new endpoint and config options, but contains invalid YAML syntax (Optional: detailed_response: true) that would cause parsing errors. |
| nemoguardrails/rails/llm/config.py | 5/5 | Adds application_name and detailed_response config fields to TrendMicroRailConfig and updates default URL to v3.0 endpoint. |
| tests/test_trend_ai_guard.py | 4/5 | Updates test configs with new endpoint URL and adds required application_name field. Tests will fail due to the NameError in actions.py. |
Sequence Diagram
sequenceDiagram
participant Client
participant NeMoGuardrails
participant TrendMicroAPI as Trend Micro AI Guard API
Client->>NeMoGuardrails: Send message
NeMoGuardrails->>NeMoGuardrails: Load TrendMicroRailConfig
NeMoGuardrails->>NeMoGuardrails: Get API key from env var
NeMoGuardrails->>NeMoGuardrails: Build request headers<br/>(Authorization, TMV1-Application-Name, Prefer)
NeMoGuardrails->>TrendMicroAPI: POST /v3.0/aiSecurity/applyGuardrails<br/>{prompt: text}
TrendMicroAPI-->>NeMoGuardrails: {action: "Block"|"Allow", reason: "..."}
alt action == "Block"
NeMoGuardrails-->>Client: "I'm sorry, I can't respond to that."
else action == "Allow"
NeMoGuardrails-->>Client: Continue with response
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (3)
-
nemoguardrails/library/trend_micro/actions.py, line 115 (link)syntax:
GuardrailRequestis undefined - will causeNameErrorat runtime. TheGuardclass should either be renamed toGuardrailRequestor this line should useGuard. -
docs/user-guides/community/trend-micro.md, line 26 (link)syntax: Invalid YAML syntax -
Optional:prefix makes this a nested key, not a comment. Should bedetailed_response: truewith an optional comment marker. -
docs/user-guides/community/trend-micro.md, line 47 (link)syntax: Same invalid YAML syntax issue as above.
6 files reviewed, 3 comments
00dd878 to
e943d4c
Compare
Resolved now. |
Description
Previous PR with beta API integration for reference: #1355
Related Issue(s)
Checklist