fix: Resolve issue with wrong error for OpenAI
This commit is contained in:
parent
a210bd5905
commit
2998802c00
1 changed files with 1 additions and 4 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue