fix: api error
This commit is contained in:
parent
a92847a33a
commit
3ab6a403b9
@ -55,6 +55,10 @@ class BaseOpenAIProvider(BavarderProvider):
|
|||||||
self.win.banner.props.button_label = ""
|
self.win.banner.props.button_label = ""
|
||||||
self.win.banner.set_revealed(True)
|
self.win.banner.set_revealed(True)
|
||||||
return ""
|
return ""
|
||||||
|
except openai.error.APIError:
|
||||||
|
self.win.banner.props.title = "API Error"
|
||||||
|
self.win.banner.props.button_label = ""
|
||||||
|
self.win.banner.set_revealed(True)
|
||||||
except socket.gaierror:
|
except socket.gaierror:
|
||||||
self.no_connection()
|
self.no_connection()
|
||||||
return ""
|
return ""
|
||||||
|
Loading…
Reference in New Issue
Block a user