mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-03 18:54:11 +08:00
fix: number variable cause type error in openai moderation (#5222)
This commit is contained in:
parent
8bcc5a36bb
commit
c6b791d070
@ -41,7 +41,7 @@ class OpenAIModeration(Moderation):
|
||||
return ModerationOutputsResult(flagged=flagged, action=ModerationAction.DIRECT_OUTPUT, preset_response=preset_response)
|
||||
|
||||
def _is_violated(self, inputs: dict):
|
||||
text = '\n'.join(inputs.values())
|
||||
text = '\n'.join(str(inputs.values()))
|
||||
model_manager = ModelManager()
|
||||
model_instance = model_manager.get_model_instance(
|
||||
tenant_id=self.tenant_id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user