mirror of
https://github.com/hibobmaster/matrix_chatgpt_bot.git
synced 2024-10-01 05:35:36 -04:00
increase timeout for bing ai
This commit is contained in:
parent
774038581f
commit
7314517b6a
@ -32,7 +32,8 @@ If not set:<br>
|
||||
"password": "YOUR_PASSWORD",
|
||||
"device_id": "YOUR_DEVICE_ID",
|
||||
"room_id": "YOUR_ROOM_ID",
|
||||
"api_key": "YOUR_API_KEY"
|
||||
"api_key": "YOUR_API_KEY",
|
||||
"access_token": "xxxxxxxx"
|
||||
}
|
||||
```
|
||||
4. Start the bot:
|
||||
|
2
bot.py
2
bot.py
@ -132,7 +132,7 @@ class Bot:
|
||||
prompt = b.group(1)
|
||||
try:
|
||||
# timeout 30s
|
||||
text = await asyncio.wait_for(self.bingbot.ask_bing(prompt), timeout=30)
|
||||
text = await asyncio.wait_for(self.bingbot.ask_bing(prompt), timeout=120)
|
||||
except TimeoutError:
|
||||
logger.error("timeoutException", exc_info=True)
|
||||
text = "Timeout error"
|
||||
|
Loading…
Reference in New Issue
Block a user