@@ -2,13 +2,13 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. -# +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-05-14 22:35+0300\n" +"POT-Creation-Date: 2026-05-22 15:59+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -207,7 +207,7 @@ msgstr "Бизнес Группы" #: authentication/models/user.py:224 authentication/models/user_telegram.py:22 #: authentication/models/user_vk.py:12 payments/admin.py:37 #: payments/admin.py:95 payments/models/invoice.py:15 -#: payments/models/payment.py:26 payments/models/payment_plan.py:50 +#: payments/models/payment.py:26 payments/models/payment_plan.py:43 #: tools/media/models.py:108 msgid "User" msgstr "Пользователь" @@ -666,7 +666,9 @@ msgstr "" #: ml_model/exceptions.py:47 #, python-format msgid "Image exceeds the maximum allowed pixel count (%(max_pixels)d)." -msgstr "Размер изображения превышает максимально допустимое количество пикселей (%(max_pixels)d)." +msgstr "" +"Размер изображения превышает максимально допустимое количество пикселей " +"(%(max_pixels)d)." #: ml_model/exceptions.py:53 msgid "The model is not responding" @@ -754,16 +756,14 @@ msgid "Available only in paid plan" msgstr "Доступно только в платном тарифе" #: ml_model/exceptions.py:171 -msgid "The \"Use code\" option cannot be used together with an attached image." -msgstr "" -"Нельзя одновременно использовать параметр «Использовать код» вместе с " -"прикреплённым изображением." +msgid "File upload is available only in paid plan." +msgstr "Загрузка файлов доступна только в платном тарифном плане." -#: ml_model/exceptions.py:177 +#: ml_model/exceptions.py:176 msgid "Face not found in the image. Please try another image with a face." msgstr "Не найдено лицо на картинке. Попробуйте другую картинку с лицом." -#: ml_model/exceptions.py:168 +#: ml_model/exceptions.py:181 msgid "The input image may contain real person." msgstr "Загруженное изображение может содержать реального человека." @@ -1054,11 +1054,18 @@ msgstr "Инструкции Моделей" msgid "no model by this id" msgstr "Не найдено моделей по этому ID" -#: ml_model/services/chatgpt.py:154 +#: ml_model/services/chatgpt.py:149 msgid "No matching version found" msgstr "Соответствующая версия не найдена" -#: ml_model/services/chatgpt_5_4.py:270 +#: ml_model/services/chatgpt_5.py:130 ml_model/services/chatgpt_5_4.py:156 +#: ml_model/services/chatgpt_5_5.py:210 +msgid "The \"Use code\" option cannot be used together with an attached image." +msgstr "" +"Нельзя одновременно использовать параметр «Использовать код» вместе с " +"прикреплённым изображением." + +#: ml_model/services/chatgpt_5_4.py:315 ml_model/services/chatgpt_5_5.py:362 msgid "Image is ready" msgstr "Изображение готово" @@ -1089,7 +1096,7 @@ msgstr "Неизвестный бакет для загрузки" msgid "1080p output is not supported for Seedance Dreamina 2.0 Fast." msgstr "1080р разрешение не поддерживается для Seedance Dreamina 2.0 Fast." -#: ml_model/services/seedream.py:78 +#: ml_model/services/seedream.py:87 msgid "3K output is not supported for Seedream 4.5" msgstr "3К разрешение не поддерживается для Seedream 4.5" @@ -1097,7 +1104,7 @@ msgstr "3К разрешение не поддерживается для Seedre msgid "No image given for improving" msgstr "Нет изображения для улучшения" -#: ml_model/tasks.py:188 +#: ml_model/tasks.py:137 msgid "Lyrics is too long" msgstr "Текст песни слишком длинный" @@ -1115,7 +1122,7 @@ msgstr "" msgid "Missing" msgstr "Отсутствующий" -#: payments/apps.py:12 payments/models/payment.py:60 +#: payments/apps.py:11 payments/models/payment.py:60 msgid "Payments" msgstr "Платежи" @@ -1184,36 +1191,36 @@ msgstr "Индивидуальный" msgid "Is visible" msgstr "Видимый" -#: payments/models/payment_plan.py:41 payments/models/payment_plan.py:56 +#: payments/models/payment_plan.py:34 payments/models/payment_plan.py:49 #: payments/models/payment_plan_feature.py:16 msgid "Payment Plan" msgstr "Платежный План" -#: payments/models/payment_plan.py:42 +#: payments/models/payment_plan.py:35 msgid "Payment Plans" msgstr "Платежные Планы" -#: payments/models/payment_plan.py:58 +#: payments/models/payment_plan.py:51 msgid "Last payment at" msgstr "Последнее время платежа" -#: payments/models/payment_plan.py:59 +#: payments/models/payment_plan.py:52 msgid "Next payment at" msgstr "Следующее время платежа" -#: payments/models/payment_plan.py:63 payments/models/user_payment_method.py:25 +#: payments/models/payment_plan.py:56 payments/models/user_payment_method.py:25 msgid "Payment Method" msgstr "Платежный метод" -#: payments/models/payment_plan.py:69 +#: payments/models/payment_plan.py:62 msgid "Current balance" msgstr "Текущий баланс" -#: payments/models/payment_plan.py:75 +#: payments/models/payment_plan.py:68 msgid "Referral balance" msgstr "Реферальный баланс" -#: payments/models/payment_plan.py:96 payments/models/payment_plan.py:97 +#: payments/models/payment_plan.py:89 payments/models/payment_plan.py:90 msgid "User Balance" msgstr "Баланс пользователя" @@ -1353,13 +1360,13 @@ msgstr "" msgid "Unknown account type" msgstr "Неизвестный тип аккаунта" -#: payments/tests/test_plans.py:23 payments/tests/test_plans.py:191 -#: payments/tests/test_plans.py:194 +#: payments/tests/test_plans.py:23 payments/tests/test_plans.py:190 +#: payments/tests/test_plans.py:193 msgid "Chat-bots" msgstr "Чат-боты" -#: payments/tests/test_plans.py:27 payments/tests/test_plans.py:192 -#: payments/tests/test_plans.py:197 +#: payments/tests/test_plans.py:27 payments/tests/test_plans.py:191 +#: payments/tests/test_plans.py:196 msgid "Images" msgstr "Изображения" @@ -1399,7 +1406,7 @@ msgstr "Публичный API" msgid "Media" msgstr "Медиа" -#: tools/chats/apis.py:201 tools/media/apis.py:209 +#: tools/chats/apis.py:207 tools/media/apis.py:209 #: tools/public_api/views/base.py:100 msgid "" "An unexpected generation error has occurred. Please try again later or use a " @@ -1408,7 +1415,7 @@ msgstr "" "Произошла непредвиденная ошибка при генерации. Пожалуйста попробуйте позже " "или используйте другую модель" -#: tools/chats/apis.py:257 +#: tools/chats/apis.py:263 msgid "The message has already been deleted" msgstr "Сообщение уже было удалено" @@ -16,7 +16,7 @@ from langchain_core.messages import AIMessage, BaseMessage, HumanMessage, System from messages.models import Message -from ml_model.exceptions import CorruptedFileError, FileExtensionNotSupported, InvalidParameterError +from ml_model.exceptions import CorruptedFileError, FileExtensionNotSupported, InvalidParameterError, FileUploadPaidPlanRequiredError from ml_model.services import Chatgpt from ml_model.services.EmbeddingService import EmbeddingService from ml_model.services.FileService import FileProcessingService @@ -173,6 +173,8 @@ class Chatgpt_5_5(Chatgpt): info.pop('code_interpreter', None) info.pop('verbosity', None) if file: + if is_free_plan: + raise FileUploadPaidPlanRequiredError() supported_extensions = ['PDF', 'DOC', 'DOCX', 'XLSX', 'JPG', 'JPEG', 'PNG', 'WEBP'] file_service = FileProcessingService file_bytes = input_message.file.read() @@ -184,12 +186,6 @@ class Chatgpt_5_5(Chatgpt): raw_file_extension = kind.extension file_extension = file_service.get_file_extension(raw_file_extension, file_bytes) if file_extension in ('pdf', 'doc', 'docx', 'xlsx'): - if is_free_plan: - return self.save_results( - results=[AIMessage('**Анализ файла пропускается в бесплатной версии!**')], - elapsed_time=timedelta(minutes=0, seconds=0), - generated_image=None, - ) text = file_service.get_file_data(file_extension, file_bytes) text_chunks = EmbeddingService.split_text_to_chunks(text) chunks = [HumanMessage(content=chunk_text) for chunk_text in text_chunks] @@ -166,6 +166,11 @@ class PaidPlanRequiredError(Exception): return _('Available only in paid plan') +class FileUploadPaidPlanRequiredError(Exception): + def __str__(self) -> str: + return _('File upload is available only in paid plan.') + + class FaceNotFoundError(Exception): def __str__(self) -> str: return _('Face not found in the image. Please try another image with a face.') @@ -33,7 +33,8 @@ from ml_model.exceptions import ( RequestBlocked, TemplateNotFound, TemplateUnknownException, - InvalidParameterError + InvalidParameterError, + FileUploadPaidPlanRequiredError ) from ml_model.services.base import SimpleService from payments.exceptions.insufficient_balance import InsufficientBalance @@ -171,7 +172,10 @@ class MessagesAPIView(APIView): {'detail': f'{exc}'}, status=HTTP_503_SERVICE_UNAVAILABLE, ) - except PaidPlanRequiredError as exc: + except ( + PaidPlanRequiredError, + FileUploadPaidPlanRequiredError + ) as exc: return Response({'detail': f'{exc}'}, status=HTTP_402_PAYMENT_REQUIRED) except ( FileExtensionNotSupported,