Commit d836c67
committed
feat(backend/WebApp): implement content safety and filter handling
Added content safety analysis and prompt injection detection features to the agent streaming service. Introduced handling for content filter
exceptions and integrated SSE events for real-time feedback on content filter violations. Updated the agent controller and streaming service
to manage content filter responses and maintain conversation continuity.
Modified files (12):
- TaskAgent.Application/Interfaces/IAgentStreamingService.cs: Added method for content filter exception retrieval
- TaskAgent.Application/Interfaces/IContentSafetyService.cs: Removed interface for content safety service
- TaskAgent.Infrastructure/Services/AgentStreamingService.cs: Implemented content filter handling and exception management
- TaskAgent.WebApi/Controllers/AgentController.cs: Updated to handle content filter events and responses
- TaskAgent.WebApi/Services/SseStreamingService.cs: Added content filter event sending logic
- TaskAgent.WebApi/Constants/AgentConstants.cs: Defined constants for content filter events and messages
- TaskAgent.Application/DTOs/ContentSafetyResult.cs: Removed DTO for content safety results
- TaskAgent.Application/DTOs/PromptInjectionResult.cs: Removed DTO for prompt injection results
- TaskAgent.Infrastructure/Constants/ContentSafetyConstants.cs: Removed constants related to content safety
- TaskAgent.Infrastructure/Models/ContentSafetyConfig.cs: Removed model for content safety configuration
- TaskAgent.Infrastructure/Models/PromptShieldResponse.cs: Removed model for prompt shield response
- TaskAgent.Infrastructure/Services/ContentSafetyService.cs: Removed content safety service implementation1 parent a329b4a commit d836c67
13 files changed
Lines changed: 345 additions & 395 deletions
File tree
- src/backend/services/TaskAgent/src
- TaskAgent.Application
- DTOs
- Interfaces
- TaskAgent.Infrastructure
- Constants
- Models
- Services
- TaskAgent.WebApi
- Constants
- Controllers
- Services
Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 0 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | | - | |
59 | | - | |
60 | 56 | | |
61 | 57 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | 58 | | |
Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 0 additions & 22 deletions
This file was deleted.
0 commit comments