increase timeout for bing ai
This commit is contained in:
parent
774038581f
commit
7314517b6a
2 changed files with 3 additions and 2 deletions
|
@ -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 a new issue