Skip to content

Commit

Permalink
update: openai.APIError
Browse files Browse the repository at this point in the history
  • Loading branch information
devcxl committed Apr 4, 2024
1 parent 420802e commit b11a27a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handler/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ def handler_text(content: str, history: [], prompt: str = config.default_prompt)
return f'函数执行失败'
except RateLimitError:
return '请求过于频繁,请稍后再试。'
except (openai.InternalServerError, openai.NotFoundError, openai.UnprocessableEntityError):
except openai.APIError:
return 'OpenAI接口维护中,暂时无法处理消息。请耐心等待稍后再试。'

0 comments on commit b11a27a

Please sign in to comment.