[PR #1158] [MERGED] feat: add hosted moderation #22925

Closed
opened 2026-02-21 20:20:04 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify/pull/1158
Author: @takatost
Created: 9/11/2023
Status: Merged
Merged: 9/11/2023
Merged by: @takatost

Base: mainHead: feat/add-hosted-moderation


📝 Commits (3)

  • 41017b3 feat: add hosted moderation
  • 6edb629 feat: add hosted moderation
  • 4599498 feat: optimize moderation output

📊 Changes

15 files changed (+241 additions, -70 deletions)

View changed files

📝 api/config.py (+5 -0)
📝 api/core/agent/agent_executor.py (+17 -1)
📝 api/core/callback_handler/agent_loop_gather_callback_handler.py (+22 -7)
📝 api/core/callback_handler/entity/llm_message.py (+0 -1)
📝 api/core/callback_handler/llm_callback_handler.py (+0 -9)
📝 api/core/chain/sensitive_word_avoidance_chain.py (+52 -8)
📝 api/core/completion.py (+3 -6)
📝 api/core/conversation_message_task.py (+13 -10)
api/core/helper/moderation.py (+32 -0)
📝 api/core/model_providers/model_factory.py (+2 -1)
📝 api/core/model_providers/models/llm/base.py (+10 -0)
api/core/model_providers/models/moderation/base.py (+29 -0)
📝 api/core/model_providers/models/moderation/openai_moderation.py (+18 -12)
📝 api/core/orchestrator_rule_parser.py (+35 -11)
📝 api/tests/integration_tests/models/moderation/test_openai_moderation.py (+3 -4)

📄 Description

No description provided


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify/pull/1158 **Author:** [@takatost](https://github.com/takatost) **Created:** 9/11/2023 **Status:** ✅ Merged **Merged:** 9/11/2023 **Merged by:** [@takatost](https://github.com/takatost) **Base:** `main` ← **Head:** `feat/add-hosted-moderation` --- ### 📝 Commits (3) - [`41017b3`](https://github.com/langgenius/dify/commit/41017b34c78867714b7f1ef1f532b0c0a0711fcf) feat: add hosted moderation - [`6edb629`](https://github.com/langgenius/dify/commit/6edb629ca492c8d0651c21a3280e32fde160b32d) feat: add hosted moderation - [`4599498`](https://github.com/langgenius/dify/commit/45994984bde49dddb2c93b93c95e81275c7cfa29) feat: optimize moderation output ### 📊 Changes **15 files changed** (+241 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `api/config.py` (+5 -0) 📝 `api/core/agent/agent_executor.py` (+17 -1) 📝 `api/core/callback_handler/agent_loop_gather_callback_handler.py` (+22 -7) 📝 `api/core/callback_handler/entity/llm_message.py` (+0 -1) 📝 `api/core/callback_handler/llm_callback_handler.py` (+0 -9) 📝 `api/core/chain/sensitive_word_avoidance_chain.py` (+52 -8) 📝 `api/core/completion.py` (+3 -6) 📝 `api/core/conversation_message_task.py` (+13 -10) ➕ `api/core/helper/moderation.py` (+32 -0) 📝 `api/core/model_providers/model_factory.py` (+2 -1) 📝 `api/core/model_providers/models/llm/base.py` (+10 -0) ➕ `api/core/model_providers/models/moderation/base.py` (+29 -0) 📝 `api/core/model_providers/models/moderation/openai_moderation.py` (+18 -12) 📝 `api/core/orchestrator_rule_parser.py` (+35 -11) 📝 `api/tests/integration_tests/models/moderation/test_openai_moderation.py` (+3 -4) </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-21 20:20:04 -05:00
yindo closed this issue 2026-02-21 20:20:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22925