rasa-pro 3.13.1a14__py3-none-any.whl → 3.13.1a16__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/builder/config.py +11 -1
- rasa/builder/exceptions.py +6 -0
- rasa/builder/inkeep-rag-response-schema.json +64 -0
- rasa/builder/inkeep_document_retrieval.py +212 -0
- rasa/builder/llm_service.py +22 -32
- rasa/builder/main.py +95 -9
- rasa/builder/models.py +61 -10
- rasa/builder/project_generator.py +7 -6
- rasa/builder/scrape_rasa_docs.py +4 -4
- rasa/builder/service.py +626 -436
- rasa/builder/training_service.py +3 -3
- rasa/cli/inspect.py +7 -0
- rasa/cli/project_templates/telco/actions/actions_billing.py +6 -5
- rasa/cli/project_templates/telco/actions/actions_get_data_from_db.py +3 -2
- rasa/cli/shell.py +6 -1
- rasa/cli/train.py +4 -0
- rasa/core/tracker_stores/dynamo_tracker_store.py +30 -2
- rasa/model_manager/model_api.py +1 -2
- rasa/shared/core/trackers.py +17 -0
- rasa/shared/importers/utils.py +77 -1
- rasa/studio/upload.py +11 -45
- rasa/utils/json_utils.py +6 -1
- rasa/utils/openapi.py +144 -0
- rasa/utils/plotting.py +1 -1
- rasa/version.py +1 -1
- {rasa_pro-3.13.1a14.dist-info → rasa_pro-3.13.1a16.dist-info}/METADATA +10 -9
- {rasa_pro-3.13.1a14.dist-info → rasa_pro-3.13.1a16.dist-info}/RECORD +30 -27
- {rasa_pro-3.13.1a14.dist-info → rasa_pro-3.13.1a16.dist-info}/NOTICE +0 -0
- {rasa_pro-3.13.1a14.dist-info → rasa_pro-3.13.1a16.dist-info}/WHEEL +0 -0
- {rasa_pro-3.13.1a14.dist-info → rasa_pro-3.13.1a16.dist-info}/entry_points.txt +0 -0
|
@@ -12,6 +12,7 @@ import structlog
|
|
|
12
12
|
from rasa.builder import config
|
|
13
13
|
from rasa.builder.exceptions import ProjectGenerationError, ValidationError
|
|
14
14
|
from rasa.builder.llm_service import get_skill_generation_messages, llm_service
|
|
15
|
+
from rasa.builder.models import BotFiles
|
|
15
16
|
from rasa.builder.validation_service import validate_project
|
|
16
17
|
from rasa.cli.scaffold import ProjectTemplateName, create_initial_project
|
|
17
18
|
from rasa.shared.core.flows import yaml_flows_io
|
|
@@ -25,7 +26,7 @@ structlogger = structlog.get_logger()
|
|
|
25
26
|
class ProjectGenerator:
|
|
26
27
|
"""Service for generating Rasa projects from skill descriptions."""
|
|
27
28
|
|
|
28
|
-
def __init__(self, project_folder: str):
|
|
29
|
+
def __init__(self, project_folder: str) -> None:
|
|
29
30
|
"""Initialize the project generator with a folder for file persistence.
|
|
30
31
|
|
|
31
32
|
Args:
|
|
@@ -34,7 +35,7 @@ class ProjectGenerator:
|
|
|
34
35
|
self.project_folder = Path(project_folder)
|
|
35
36
|
self.project_folder.mkdir(parents=True, exist_ok=True)
|
|
36
37
|
|
|
37
|
-
def init_from_template(self, template: ProjectTemplateName):
|
|
38
|
+
def init_from_template(self, template: ProjectTemplateName) -> None:
|
|
38
39
|
"""Create the initial project files."""
|
|
39
40
|
self.cleanup()
|
|
40
41
|
create_initial_project(self.project_folder.as_posix(), template)
|
|
@@ -150,7 +151,7 @@ class ProjectGenerator:
|
|
|
150
151
|
|
|
151
152
|
return await _generate_with_retry(initial_messages, max_retries)
|
|
152
153
|
|
|
153
|
-
async def _validate_generated_project(self):
|
|
154
|
+
async def _validate_generated_project(self) -> None:
|
|
154
155
|
"""Validate the generated project using the validation service."""
|
|
155
156
|
importer = self._create_importer()
|
|
156
157
|
validation_error = await validate_project(importer)
|
|
@@ -178,9 +179,9 @@ class ProjectGenerator:
|
|
|
178
179
|
except Exception as e:
|
|
179
180
|
raise ValidationError(f"Failed to create importer: {e}")
|
|
180
181
|
|
|
181
|
-
def get_bot_files(self) ->
|
|
182
|
+
def get_bot_files(self) -> BotFiles:
|
|
182
183
|
"""Get the current bot files by reading from disk."""
|
|
183
|
-
bot_files = {}
|
|
184
|
+
bot_files: BotFiles = {}
|
|
184
185
|
|
|
185
186
|
for file in self.project_folder.glob("**/*"):
|
|
186
187
|
# Skip directories
|
|
@@ -255,7 +256,7 @@ class ProjectGenerator:
|
|
|
255
256
|
shutil.rmtree(flows_folder)
|
|
256
257
|
flows_folder.mkdir(parents=True, exist_ok=True)
|
|
257
258
|
|
|
258
|
-
def update_bot_files(self, files: Dict[str, str]) -> None:
|
|
259
|
+
def update_bot_files(self, files: Dict[str, Optional[str]]) -> None:
|
|
259
260
|
"""Update bot files with new content by writing to disk."""
|
|
260
261
|
for filename, content in files.items():
|
|
261
262
|
file_path = Path(subpath(self.project_folder, filename))
|
rasa/builder/scrape_rasa_docs.py
CHANGED
|
@@ -17,18 +17,18 @@ to_visit = [DOCS_ROOT]
|
|
|
17
17
|
os.makedirs(OUTPUT_DIR, exist_ok=True)
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def is_valid_doc_url(url):
|
|
20
|
+
def is_valid_doc_url(url: str) -> bool:
|
|
21
21
|
return url.startswith(DOCS_ROOT) and not any(
|
|
22
22
|
[url.endswith(".pdf"), "#" in url, "mailto:" in url]
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
def slugify_url(url):
|
|
26
|
+
def slugify_url(url: str) -> str:
|
|
27
27
|
path = urlparse(url).path.strip("/").replace("/", "_")
|
|
28
28
|
return path if path else "index"
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
def clean_text(html):
|
|
31
|
+
def clean_text(html: str) -> str:
|
|
32
32
|
soup = BeautifulSoup(html, "html.parser")
|
|
33
33
|
|
|
34
34
|
# Remove navs, footers, and code tabs (customize if needed)
|
|
@@ -47,7 +47,7 @@ def clean_text(html):
|
|
|
47
47
|
return text
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
def save_as_markdown(text) -> str:
|
|
50
|
+
def save_as_markdown(text: str, url: str) -> str:
|
|
51
51
|
slug = slugify_url(url)
|
|
52
52
|
file_name = f"{slug}.md"
|
|
53
53
|
md_path = Path(OUTPUT_DIR) / file_name
|