gpt3: fix timeout bug
This commit is contained in:
parent
2f868d2389
commit
f4ece3b5e0
|
@ -37,9 +37,10 @@ class Gpt3Plugin(Plugin):
|
|||
frequency_penalty=0.5,
|
||||
presence_penalty=0,
|
||||
timeout=30,
|
||||
response_timeout=30,
|
||||
request_timeout=30,
|
||||
)
|
||||
except openai.error.OpenAIError:
|
||||
except openai.error.OpenAIError as exc:
|
||||
self.bot.log_e(f"OpenAI error: {exc}")
|
||||
return None
|
||||
return completion.choices[0].text
|
||||
|
||||
|
|
Loading…
Reference in a new issue