smart-bot-factory 0.2.10__py3-none-any.whl → 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of smart-bot-factory might be problematic. Click here for more details.
- smart_bot_factory/cli.py +35 -64
- smart_bot_factory/core/bot_utils.py +69 -21
- smart_bot_factory/core/decorators.py +377 -143
- smart_bot_factory/core/router.py +7 -4
- smart_bot_factory/creation/bot_builder.py +47 -14
- smart_bot_factory/handlers/handlers.py +5 -4
- smart_bot_factory/router/__init__.py +2 -3
- smart_bot_factory-0.3.1.dist-info/METADATA +905 -0
- {smart_bot_factory-0.2.10.dist-info → smart_bot_factory-0.3.1.dist-info}/RECORD +12 -13
- smart_bot_factory/core/telegram_router.py +0 -58
- smart_bot_factory-0.2.10.dist-info/METADATA +0 -789
- {smart_bot_factory-0.2.10.dist-info → smart_bot_factory-0.3.1.dist-info}/WHEEL +0 -0
- {smart_bot_factory-0.2.10.dist-info → smart_bot_factory-0.3.1.dist-info}/entry_points.txt +0 -0
- {smart_bot_factory-0.2.10.dist-info → smart_bot_factory-0.3.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
smart_bot_factory/__init__.py,sha256=W5k9awLVi0R_N3fSul7VNkKRdSfExZjNb_M2yNzepg8,102
|
|
2
|
-
smart_bot_factory/cli.py,sha256=
|
|
2
|
+
smart_bot_factory/cli.py,sha256=ws0tYUYDFXCq1e1PyE4Z5P3GQkDjx7xM4gvyywLJKKE,33225
|
|
3
3
|
smart_bot_factory/config.py,sha256=kB3G2hGMrrCSOAvlrddf8x43bgfgEaQqOCKOeELAzfM,11640
|
|
4
4
|
smart_bot_factory/setup_checker.py,sha256=fqRzyptyMzcb2I0boUaj0rWLdarqaN6ViX6suwTEeWc,20123
|
|
5
5
|
smart_bot_factory/utm_link_generator.py,sha256=jw7c84Y_ZvLpV4jaBWw0GK3-lCUKIIa8sZ8YNxoWIlc,4166
|
|
@@ -24,23 +24,22 @@ smart_bot_factory/configs/growthmed-october-24/tests/realistic_scenarios.yaml,sh
|
|
|
24
24
|
smart_bot_factory/configs/growthmed-october-24/tests/scenario_examples.yaml,sha256=bzDulOU4a2LyWlcHzlQU8GYhOky2WTfyizGfjX4ioMY,2436
|
|
25
25
|
smart_bot_factory/configs/growthmed-october-24/welcome_file/welcome_file_msg.txt,sha256=Db21Mm0r8SBWFdX9EeIF2FZtLQ2cvuwVlSRJd2KEYCg,922
|
|
26
26
|
smart_bot_factory/configs/growthmed-october-24/welcome_file/Чек лист по 152ФЗ и 323ФЗ для медицины.pdf,sha256=BiAiQHNnQXJPMsks9AeL6s0beEjRFkRMJLMlAn4WorA,5284954
|
|
27
|
-
smart_bot_factory/core/bot_utils.py,sha256=
|
|
27
|
+
smart_bot_factory/core/bot_utils.py,sha256=cWCasEG_4BTTp35d3P3BIOjpn9NXOCd1b6cKhNNpNb0,44670
|
|
28
28
|
smart_bot_factory/core/conversation_manager.py,sha256=eoHL7MCEz68DRvTVwRwZgf2PWwGv4T6J9D-I-thETi8,28289
|
|
29
|
-
smart_bot_factory/core/decorators.py,sha256=
|
|
29
|
+
smart_bot_factory/core/decorators.py,sha256=maxoj2rdEGZmqgK6jybaTOcTXx_b32t5fWkNeJ2JdOs,83324
|
|
30
30
|
smart_bot_factory/core/message_sender.py,sha256=J4b6n8nXVjqf-qzL6URRSvc-FVnQfShwujVSM6qv26w,32232
|
|
31
|
-
smart_bot_factory/core/router.py,sha256=
|
|
31
|
+
smart_bot_factory/core/router.py,sha256=03fbysaj0LR96p4-8iiml8dTmEHCkR-AaTposSv8q8o,11898
|
|
32
32
|
smart_bot_factory/core/router_manager.py,sha256=dUwesog-oHk1U2EDdS8p0e4MTSkwtx5_qXn6nrJ9l9I,9700
|
|
33
33
|
smart_bot_factory/core/states.py,sha256=AOc19_yAsDW_8md-2oiowjBhuW3bwcsmMxszCXWZZTQ,355
|
|
34
|
-
smart_bot_factory/core/telegram_router.py,sha256=LcPLOd87Y4Y4YN6TBXVAtmpSp8gAK2otgMI4YS5f5tk,2091
|
|
35
34
|
smart_bot_factory/creation/__init__.py,sha256=IgDk8GDS3pg7Pw_Et41J33ZmeZIU5dRwQdTmYKXfJfE,128
|
|
36
|
-
smart_bot_factory/creation/bot_builder.py,sha256=
|
|
35
|
+
smart_bot_factory/creation/bot_builder.py,sha256=KQmMmiL9OuGZAR3rYxMNk-2opMUR5NPRy9Sf9iVNCoU,39463
|
|
37
36
|
smart_bot_factory/creation/bot_testing.py,sha256=JDWXyJfZmbgo-DLdAPk8Sd9FiehtHHa4sLD17lBrTOc,55669
|
|
38
37
|
smart_bot_factory/event/__init__.py,sha256=hPL449RULIOB-OXv1ZbGNiHctAYaOMUqhSWGPrDHYBM,212
|
|
39
|
-
smart_bot_factory/handlers/handlers.py,sha256=
|
|
38
|
+
smart_bot_factory/handlers/handlers.py,sha256=HbD26bt-VpqXQ5nwRXeU3n0A4tGNTHmR-VyuFur5D6k,41709
|
|
40
39
|
smart_bot_factory/integrations/openai_client.py,sha256=aMcDrKO0GEx3ZSVEOGDeDtFCDWSXs6biUfgrbRK8yTU,23180
|
|
41
40
|
smart_bot_factory/integrations/supabase_client.py,sha256=AfALLZdDYeMWHLJw6POTGiBd-sH3i03oT6tT7m9C28I,44644
|
|
42
41
|
smart_bot_factory/message/__init__.py,sha256=-ehDZweUc3uKgmLLxFVsD-KWrDtnHpHms7pCrDelWo0,1950
|
|
43
|
-
smart_bot_factory/router/__init__.py,sha256=
|
|
42
|
+
smart_bot_factory/router/__init__.py,sha256=5gEbpG3eylOyow5NmidzGUy0K-AZq7RhYLVu9OaUT6c,270
|
|
44
43
|
smart_bot_factory/supabase/__init__.py,sha256=XmZP6yM9ffERM5ddAWyJnrNzEhCYtMu3AcjVCi1rOf8,179
|
|
45
44
|
smart_bot_factory/supabase/client.py,sha256=lWIzfOgoSvU7xPhYLoJtM5GnbWdoWsvHcRFC22sFBMU,25637
|
|
46
45
|
smart_bot_factory/table/database_structure.sql,sha256=26gFtMC2jdQGQF7Zb_F4Br56rMd4hUDTk9FkNZYneLo,2789
|
|
@@ -49,8 +48,8 @@ smart_bot_factory/utils/__init__.py,sha256=UhsJXEHfrIK8h1AHsroHSwAriijk-LvnqLyvg
|
|
|
49
48
|
smart_bot_factory/utils/debug_routing.py,sha256=BOoDhKBg7UXe5uHQxRk3TSfPfLPOFqt0N7lAo6kjCOo,4719
|
|
50
49
|
smart_bot_factory/utils/prompt_loader.py,sha256=JSn7CsWnToSbHYtURdeuZn7ectyDqQGrPGHN2ixIGkw,19930
|
|
51
50
|
smart_bot_factory/utils/user_prompt_loader.py,sha256=dk6P0X_3UcNqxjRtuIvb0LcPrp03zIIsstZwdmeCPaE,2519
|
|
52
|
-
smart_bot_factory-0.
|
|
53
|
-
smart_bot_factory-0.
|
|
54
|
-
smart_bot_factory-0.
|
|
55
|
-
smart_bot_factory-0.
|
|
56
|
-
smart_bot_factory-0.
|
|
51
|
+
smart_bot_factory-0.3.1.dist-info/METADATA,sha256=yL4hSPAe4vYlsSJ5YLTs9ic6I7_Ic13Rn9bFWfo8JJc,31533
|
|
52
|
+
smart_bot_factory-0.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
53
|
+
smart_bot_factory-0.3.1.dist-info/entry_points.txt,sha256=ybKEAI0WSb7WoRiey7QE-HHfn88UGV7nxLDxXq7b7SU,50
|
|
54
|
+
smart_bot_factory-0.3.1.dist-info/licenses/LICENSE,sha256=OrK3cwdUTzNzIhJvSPtJaVMoYIyC_sSx5EFE_FDMvGs,1092
|
|
55
|
+
smart_bot_factory-0.3.1.dist-info/RECORD,,
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
TelegramRouter - обертка над aiogram Router для обработки Telegram сообщений
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from typing import Any
|
|
6
|
-
import logging
|
|
7
|
-
from aiogram import Router as AiogramRouter
|
|
8
|
-
|
|
9
|
-
logger = logging.getLogger(__name__)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class TelegramRouter:
|
|
13
|
-
"""
|
|
14
|
-
Обертка над aiogram Router для единообразного API библиотеки
|
|
15
|
-
Позволяет регистрировать обработчики команд, сообщений и callback'ов
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
def __init__(self, name: str = None):
|
|
19
|
-
"""
|
|
20
|
-
Инициализация Telegram роутера
|
|
21
|
-
|
|
22
|
-
Args:
|
|
23
|
-
name: Имя роутера для логирования
|
|
24
|
-
"""
|
|
25
|
-
self.name = name or f"TelegramRouter_{id(self)}"
|
|
26
|
-
self._router = AiogramRouter(name=self.name)
|
|
27
|
-
|
|
28
|
-
logger.info(f"📱 Создан TelegramRouter: {self.name}")
|
|
29
|
-
|
|
30
|
-
@property
|
|
31
|
-
def router(self) -> AiogramRouter:
|
|
32
|
-
"""
|
|
33
|
-
Возвращает внутренний aiogram Router
|
|
34
|
-
|
|
35
|
-
Используйте этот роутер для прямой работы с aiogram API:
|
|
36
|
-
|
|
37
|
-
Example:
|
|
38
|
-
telegram_router = TelegramRouter("my_router")
|
|
39
|
-
|
|
40
|
-
# Регистрация команды
|
|
41
|
-
@telegram_router.router.message(Command("start"))
|
|
42
|
-
async def start_handler(message: Message):
|
|
43
|
-
await message.answer("Hello!")
|
|
44
|
-
|
|
45
|
-
# Регистрация callback
|
|
46
|
-
@telegram_router.router.callback_query(F.data.startswith("buy_"))
|
|
47
|
-
async def buy_handler(callback: CallbackQuery):
|
|
48
|
-
await callback.answer("Покупка...")
|
|
49
|
-
"""
|
|
50
|
-
return self._router
|
|
51
|
-
|
|
52
|
-
def get_aiogram_router(self) -> AiogramRouter:
|
|
53
|
-
"""Получает внутренний aiogram Router (алиас для .router)"""
|
|
54
|
-
return self._router
|
|
55
|
-
|
|
56
|
-
def __repr__(self):
|
|
57
|
-
return f"TelegramRouter(name='{self.name}')"
|
|
58
|
-
|