Преглед на файлове

fix: number variable cause type error in openai moderation (#5222)

tags/0.6.11
rerorero преди 1 година
родител
ревизия
c6b791d070
No account linked to committer's email address
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1
    1
      api/core/moderation/openai_moderation/openai_moderation.py

+ 1
- 1
api/core/moderation/openai_moderation/openai_moderation.py Целия файл

@@ -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…
Отказ
Запис