mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
Refresh cookies on error in OpenaiChat
This commit is contained in:
parent
23814d3c8c
commit
571aa2f0c3
1 changed files with 1 additions and 2 deletions
|
|
@ -426,8 +426,7 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin):
|
|||
headers=headers
|
||||
) as response:
|
||||
cls._update_request_args(auth_result, session)
|
||||
if response.status == 403:
|
||||
cls.request_config.proof_token = None
|
||||
if response.status in (401, 403):
|
||||
raise MissingAuthError("Access token is not valid")
|
||||
await raise_for_status(response)
|
||||
buffer = u""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue