Skip to content

Commit c6b791d

Browse files
authored
fix: number variable cause type error in openai moderation (langgenius#5222)
1 parent 8bcc5a3 commit c6b791d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/core/moderation/openai_moderation/openai_moderation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def moderation_for_outputs(self, text: str) -> ModerationOutputsResult:
4141
return ModerationOutputsResult(flagged=flagged, action=ModerationAction.DIRECT_OUTPUT, preset_response=preset_response)
4242

4343
def _is_violated(self, inputs: dict):
44-
text = '\n'.join(inputs.values())
44+
text = '\n'.join(str(inputs.values()))
4545
model_manager = ModelManager()
4646
model_instance = model_manager.get_model_instance(
4747
tenant_id=self.tenant_id,

0 commit comments

Comments
 (0)