Update main.py

This commit is contained in:
Barbariskaa 2023-05-31 00:30:18 +03:00 committed by GitHub
parent 503faabbff
commit f2ed30072e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -411,7 +411,7 @@ class SSEHandler(web.View):
elif str(e) == " " or str(e) == "":
error_text = "Таймаут."
print(error, error_text)
elif str(e) == "received 1000 (OK); then sent 1000 (OK)":
elif str(e) == "received 1000 (OK); then sent 1000 (OK)" or str(e) == "'int' object has no attribute 'split'"::
error_text = "Слишком много токенов. Больше 14000 токенов не принимает."
print(error, error_text)
elif str(e) == "'contentOrigin'":
@ -448,4 +448,4 @@ if __name__ == '__main__':
f"Режим precise: http://{HOST}:{PORT}/precise\n"
f"Режим balanced: http://{HOST}:{PORT}/balanced\n"
f"Также есть режим подсказок от Бинга. Чтобы его включить, нужно добавить /suggestion к концу URL, после режима.")
web.run_app(app, host=HOST, port=PORT, print=None)
web.run_app(app, host=HOST, port=PORT, print=None)