Skip to content

Commit ffae4a2

Browse files
committed
Update models.py
1 parent 848b950 commit ffae4a2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

modules/models/models.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,17 @@ def _decode_chat_response(self, response):
245245
yield chunk["choices"][0]["delta"]["content"]
246246
except Exception as e:
247247
continue
248-
if error_msg:
249-
if "Not authenticated" in error_msg:
250-
yield '<span style="color: red;">Провайдер API ответил ошибкой:</span> Ключ ChimeraAPI не обнаружен. Убедитесь что ввели его.'
251-
elif "Invalid API key" in error_msg:
252-
yield '<span style="color: red;">Провайдер API ответил ошибкой:</span> Неверный ключ ChimeraAPI. Возможно вы ввели его неправильно либо он деактивирован. Вы можете сгенерировать его заново в Discord: https://discord.gg/chimeragpt'
253-
elif "Reverse engineered site does not respond" in error_msg:
254-
yield '<span style="color: red;">The API provider responded with an error: At the moment, all provider sites are unavailable. Try again later.'
255-
elif "one_api_error" in error_msg:
256-
yield '<span style="color: red;">The API provider responded with an error:</span> API key not found. Make sure you have entered it. If you don\'t have it, get it at https://neuroapi.host '
257-
else:
258-
yield '<span style="color: red;">Error:</span> ' + error_msg
248+
#if error_msg:
249+
# if "Not authenticated" in error_msg:
250+
# yield '<span style="color: red;">Провайдер API ответил ошибкой:</span> Ключ ChimeraAPI не обнаружен. Убедитесь что ввели его.'
251+
# elif "Invalid API key" in error_msg:
252+
# yield '<span style="color: red;">Провайдер API ответил ошибкой:</span> Неверный ключ ChimeraAPI. Возможно вы ввели его неправильно либо он деактивирован. Вы можете сгенерировать его заново в Discord: https://discord.gg/chimeragpt'
253+
# elif "Reverse engineered site does not respond" in error_msg:
254+
# yield '<span style="color: red;">The API provider responded with an error: At the moment, all provider sites are unavailable. Try again later.'
255+
# elif "one_api_error" in error_msg:
256+
# yield '<span style="color: red;">The API provider responded with an error:</span> API key not found. Make sure you have entered it. If you don\'t have it, get it at https://neuroapi.host '
257+
# else:
258+
# yield '<span style="color: red;">Error:</span> ' + error_msg
259259

260260
def set_key(self, new_access_key):
261261
ret = super().set_key(new_access_key)

0 commit comments

Comments
 (0)