fix: Resolve issue with wrong error for OpenAI

This commit is contained in:
Igor Ilic 2025-10-17 11:58:14 +02:00
parent a210bd5905
commit 2998802c00

View file

@ -156,10 +156,7 @@ class OpenAIAdapter(LLMInterface):
InstructorRetryException, InstructorRetryException,
) as e: ) as e:
if not (self.fallback_model and self.fallback_api_key): if not (self.fallback_model and self.fallback_api_key):
raise ContentPolicyFilterError( raise e
f"The provided input contains content that is not aligned with our content policy: {text_input}"
) from e
try: try:
return await self.aclient.chat.completions.create( return await self.aclient.chat.completions.create(
model=self.fallback_model, model=self.fallback_model,