@@ -1129,3 +1129,7 @@ msgstr "Модель заблокирована, т.к перестала обн msgid "Unable to recognize the image. (Supported formats are PNG, JPG, JPEG)" msgstr "Невозможно распознать изображение. (Поддерживаемые форматы: PNG, JPG, JPEG)" + +msgid "No matching version found" +msgstr "Соответствующая версия не найдена" + @@ -151,16 +151,9 @@ class Chatgpt(SimpleService): 'presence_penalty': info.pop('presence', 0), 'top_p': info.pop('top_p', 0.5), } - if model_name in ( - 'gpt-4', - 'gpt-4o', - 'gpt-4o-mini', - 'o1-preview', - 'o1-mini', - 'o3-mini', - 'gpt-4.5-preview', - ): - self.llm.tiktoken_model_name = 'gpt-4' + self.llm.tiktoken_model_name = 'gpt-4' + if model_name not in self.TOKENS_COST.keys(): + raise Exception(_('No matching version found')) chat_history = self.get_chat_history() conversation = RunnableWithMessageHistory( runnable=self.llm,