rasa-pro 3.10.7.dev1__py3-none-any.whl → 3.10.7.dev2__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 rasa-pro might be problematic. Click here for more details.
- rasa/model_manager/config.py +6 -1
- rasa/model_manager/model_api.py +13 -5
- rasa/model_service.py +1 -0
- rasa/version.py +1 -1
- {rasa_pro-3.10.7.dev1.dist-info → rasa_pro-3.10.7.dev2.dist-info}/METADATA +1 -1
- {rasa_pro-3.10.7.dev1.dist-info → rasa_pro-3.10.7.dev2.dist-info}/RECORD +9 -9
- {rasa_pro-3.10.7.dev1.dist-info → rasa_pro-3.10.7.dev2.dist-info}/NOTICE +0 -0
- {rasa_pro-3.10.7.dev1.dist-info → rasa_pro-3.10.7.dev2.dist-info}/WHEEL +0 -0
- {rasa_pro-3.10.7.dev1.dist-info → rasa_pro-3.10.7.dev2.dist-info}/entry_points.txt +0 -0
rasa/model_manager/config.py
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import sys
|
|
2
|
+
import os
|
|
2
3
|
|
|
3
|
-
SERVER_BASE_WORKING_DIRECTORY =
|
|
4
|
+
SERVER_BASE_WORKING_DIRECTORY = os.environ.get(
|
|
5
|
+
"RASA_MODEL_SERVER_BASE_DIRECTORY", "working-data"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
SERVER_BASE_URL = os.environ.get("RASA_MODEL_SERVER_BASE_URL", None)
|
|
4
9
|
|
|
5
10
|
# The path to the python executable that is running this script
|
|
6
11
|
# we will use the same python to run training / bots
|
rasa/model_manager/model_api.py
CHANGED
|
@@ -9,6 +9,7 @@ from sanic.request import Request
|
|
|
9
9
|
import structlog
|
|
10
10
|
from socketio import AsyncServer
|
|
11
11
|
|
|
12
|
+
from rasa.model_manager.config import SERVER_BASE_URL
|
|
12
13
|
from rasa.model_manager.runner_service import (
|
|
13
14
|
BotSession,
|
|
14
15
|
run_bot,
|
|
@@ -81,6 +82,14 @@ async def update_status_of_all_bots() -> None:
|
|
|
81
82
|
await update_bot_status(bot)
|
|
82
83
|
|
|
83
84
|
|
|
85
|
+
def base_server_url(request: Request) -> str:
|
|
86
|
+
"""Return the base URL of the server."""
|
|
87
|
+
if SERVER_BASE_URL:
|
|
88
|
+
return SERVER_BASE_URL
|
|
89
|
+
else:
|
|
90
|
+
return f"{request.scheme}://{request.host}"
|
|
91
|
+
|
|
92
|
+
|
|
84
93
|
def get_log_url(request: Request, action_id: str) -> response.HTTPResponse:
|
|
85
94
|
"""Return a URL for downloading the log file for training / deployment."""
|
|
86
95
|
if not os.path.exists(logs_path(action_id)):
|
|
@@ -88,7 +97,7 @@ def get_log_url(request: Request, action_id: str) -> response.HTTPResponse:
|
|
|
88
97
|
|
|
89
98
|
return json(
|
|
90
99
|
{
|
|
91
|
-
"url": f"{request
|
|
100
|
+
"url": f"{base_server_url(request)}/logs/{action_id}.txt",
|
|
92
101
|
"expires_in_seconds": 60 * 60 * 24,
|
|
93
102
|
}
|
|
94
103
|
)
|
|
@@ -113,14 +122,13 @@ def get_training_model_url(request: Request, training_id: str) -> response.HTTPR
|
|
|
113
122
|
|
|
114
123
|
return json(
|
|
115
124
|
{
|
|
116
|
-
"url": f"{request
|
|
125
|
+
"url": f"{base_server_url(request)}/models/{model}",
|
|
117
126
|
"expires_in_seconds": 60 * 60 * 24,
|
|
118
127
|
}
|
|
119
128
|
)
|
|
120
129
|
|
|
121
130
|
|
|
122
|
-
|
|
123
|
-
async def continuously_update_process_status(running_app: Sanic) -> None:
|
|
131
|
+
async def continuously_update_process_status() -> None:
|
|
124
132
|
"""Regularly Update the status of all training and bot processes."""
|
|
125
133
|
structlogger.debug("model_api.update_process_status.started")
|
|
126
134
|
|
|
@@ -285,7 +293,7 @@ async def start_bot(request: Request) -> response.HTTPResponse:
|
|
|
285
293
|
status=404,
|
|
286
294
|
)
|
|
287
295
|
|
|
288
|
-
base_url_path =
|
|
296
|
+
base_url_path = base_server_url(request)
|
|
289
297
|
try:
|
|
290
298
|
bot_session = run_bot(deployment_id, training_base_path, base_url_path)
|
|
291
299
|
running_bots[deployment_id] = bot_session
|
rasa/model_service.py
CHANGED
|
@@ -36,6 +36,7 @@ def main() -> None:
|
|
|
36
36
|
structlogger.debug("model_training.starting_server", port=MODEL_SERVICE_PORT)
|
|
37
37
|
structlogger.debug("model_running.starting_server", port=MODEL_SERVICE_PORT)
|
|
38
38
|
|
|
39
|
+
model_api.app.add_task(model_api.continuously_update_process_status)
|
|
39
40
|
model_api.app.run(host="0.0.0.0", port=MODEL_SERVICE_PORT, legacy=True)
|
|
40
41
|
|
|
41
42
|
|
rasa/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rasa-pro
|
|
3
|
-
Version: 3.10.7.
|
|
3
|
+
Version: 3.10.7.dev2
|
|
4
4
|
Summary: State-of-the-art open-core Conversational AI framework for Enterprises that natively leverages generative AI for effortless assistant development.
|
|
5
5
|
Home-page: https://rasa.com
|
|
6
6
|
Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework
|
|
@@ -483,13 +483,13 @@ rasa/markers/upload.py,sha256=Ot1s_O-CEIB9c4CKUlfOldiJo92pdqxFUHOPCU7E_NU,2518
|
|
|
483
483
|
rasa/markers/validate.py,sha256=YypXKRS87xxrMMEz9HpAQzYJUwg0OPbczMXBRNjlJq4,709
|
|
484
484
|
rasa/model.py,sha256=GH1-N6Po3gL3nwfa9eGoN2bMRNMrn4f3mi17-osW3T0,3491
|
|
485
485
|
rasa/model_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
486
|
-
rasa/model_manager/config.py,sha256=
|
|
487
|
-
rasa/model_manager/model_api.py,sha256=
|
|
486
|
+
rasa/model_manager/config.py,sha256=LCzRoV78bLX_FREW7hfQLsQepupoTs1m-CnK3u_D01s,349
|
|
487
|
+
rasa/model_manager/model_api.py,sha256=Eoq6TBjYaqB-9arLIH1Uz_pb7ZagQ8qYDkUAx6DDARE,13926
|
|
488
488
|
rasa/model_manager/runner_service.py,sha256=aMupR7t0EEy2yOGT5cR_6kluApnwOiiGkjyIVYxdsMk,5553
|
|
489
489
|
rasa/model_manager/socket_bridge.py,sha256=f-dhsV8xYaENXVZT5OOzkMdpSPPPxFEzsQqNJAuktxQ,1390
|
|
490
490
|
rasa/model_manager/trainer_service.py,sha256=7LP_EsLQt-P2oqO1AgqbgIcTC515eCW58BamDkDjJjw,7856
|
|
491
491
|
rasa/model_manager/utils.py,sha256=-DJUcgRiyQZsszlOYlww-OGaAof8CIopbsOxZmeZ9NY,819
|
|
492
|
-
rasa/model_service.py,sha256=
|
|
492
|
+
rasa/model_service.py,sha256=ZULb8jJHPQYIWtMVv5cCYExJdBnAFs4Wv89p1bVGzqo,1212
|
|
493
493
|
rasa/model_testing.py,sha256=h0QUpJu6p_TDse3aHjCfYwI6OGH47b3Iuo5Ot0HQADM,14959
|
|
494
494
|
rasa/model_training.py,sha256=sFdrizWu8JZZDGrMjI6_0OaY9dK-msOShWpgOOCGZzg,20601
|
|
495
495
|
rasa/nlu/__init__.py,sha256=D0IYuTK_ZQ_F_9xsy0bXxVCAtU62Fzvp8S7J9tmfI_c,123
|
|
@@ -727,9 +727,9 @@ rasa/utils/train_utils.py,sha256=f1NWpp5y6al0dzoQyyio4hc4Nf73DRoRSHDzEK6-C4E,212
|
|
|
727
727
|
rasa/utils/url_tools.py,sha256=JQcHL2aLqLHu82k7_d9imUoETCm2bmlHaDpOJ-dKqBc,1218
|
|
728
728
|
rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
|
|
729
729
|
rasa/validator.py,sha256=HM0ZIWjo3JRt2FMIfgNI_s932OABOSXkflm-rFTNkvY,62608
|
|
730
|
-
rasa/version.py,sha256=
|
|
731
|
-
rasa_pro-3.10.7.
|
|
732
|
-
rasa_pro-3.10.7.
|
|
733
|
-
rasa_pro-3.10.7.
|
|
734
|
-
rasa_pro-3.10.7.
|
|
735
|
-
rasa_pro-3.10.7.
|
|
730
|
+
rasa/version.py,sha256=_xRWomNdCH1OVLVcaYC_a-LVDeKGrYo4iDznhzakf3k,122
|
|
731
|
+
rasa_pro-3.10.7.dev2.dist-info/METADATA,sha256=exaKQ2A81Kk0kydkgvN3ipZyApPtmatZ96AU2LhlpIo,28217
|
|
732
|
+
rasa_pro-3.10.7.dev2.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
|
|
733
|
+
rasa_pro-3.10.7.dev2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
734
|
+
rasa_pro-3.10.7.dev2.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
|
|
735
|
+
rasa_pro-3.10.7.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|