rasa-pro 3.11.3a1.dev7__py3-none-any.whl → 3.11.4__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/core/actions/action.py +7 -16
- rasa/core/actions/direct_custom_actions_executor.py +0 -1
- rasa/core/channels/__init__.py +0 -2
- rasa/core/channels/inspector/dist/assets/{arc-861ddd57.js → arc-632a63ec.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-d0fbc5ce-921f02db.js → c4Diagram-d0fbc5ce-081e0df4.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-936ed81e-b436c4f8.js → classDiagram-936ed81e-3df0afc2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-v2-c3cb15f1-511a23cb.js → classDiagram-v2-c3cb15f1-8c5ed31e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{createText-62fc7601-ef476ecd.js → createText-62fc7601-89c73b31.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{edges-f2ad444c-f1878e0a.js → edges-f2ad444c-4fc48c3e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-9d236eb7-fac75185.js → erDiagram-9d236eb7-907e0440.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDb-1972c806-201c5bbc.js → flowDb-1972c806-9ec53a3c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDiagram-7ea5b25a-f904ae41.js → flowDiagram-7ea5b25a-41da787a.js} +1 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-8bea338b.js +1 -0
- rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-abe16c3d-1813da66.js → flowchart-elk-definition-abe16c3d-ce370633.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-9b5ea136-872af172.js → ganttDiagram-9b5ea136-90a36523.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-99d0ae7c-34a0af5a.js → gitGraphDiagram-99d0ae7c-41e1aa3f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-2c4b9a3b-42ba3e3d.js → index-2c4b9a3b-e6f2af62.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-37817b51.js → index-e793d777.js} +3 -3
- rasa/core/channels/inspector/dist/assets/{infoDiagram-736b4530-6b731386.js → infoDiagram-736b4530-8ceba4db.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-df861f2b-e8579ac6.js → journeyDiagram-df861f2b-960d3809.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-89e6403a.js → layout-498807d8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{line-dc73d3fc.js → line-eeccc4e2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-f5b1d2bc.js → linear-8a078617.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-beec6740-82cb74fa.js → mindmap-definition-beec6740-396d17dd.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{pieDiagram-dbbf0591-bdf5f29b.js → pieDiagram-dbbf0591-dc9b5e1b.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-4d7f4fd6-c7a0cbe4.js → quadrantDiagram-4d7f4fd6-a08cba6d.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-6fc4c22a-7ec5410f.js → requirementDiagram-6fc4c22a-87242b9e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-8f13d901-caee5554.js → sankeyDiagram-8f13d901-53f6f391.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-b655622a-2935f8db.js → sequenceDiagram-b655622a-715c9c20.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-59f0c015-8f5d9693.js → stateDiagram-59f0c015-2e8fb31f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-2b26beab-d565d1de.js → stateDiagram-v2-2b26beab-7e2d2aa0.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-080da4f6-75ad421d.js → styles-080da4f6-4420cea6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-3dcbcfbf-7e764226.js → styles-3dcbcfbf-28676cf4.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-9c745c82-7a4e0e61.js → styles-9c745c82-cef936a6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{svgDrawCommon-4835440b-4019d1bf.js → svgDrawCommon-4835440b-151251e9.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{timeline-definition-5b62e21b-01ea12df.js → timeline-definition-5b62e21b-0d39bdb2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-2b33534f-89407137.js → xychartDiagram-2b33534f-a03fa445.js} +1 -1
- rasa/core/channels/inspector/dist/index.html +3 -1
- rasa/core/channels/inspector/index.html +2 -0
- rasa/core/channels/inspector/src/App.tsx +1 -4
- rasa/core/channels/socketio.py +23 -2
- rasa/core/nlg/contextual_response_rephraser.py +9 -62
- rasa/core/policies/enterprise_search_policy.py +12 -77
- rasa/core/policies/flows/flow_executor.py +2 -26
- rasa/core/processor.py +8 -11
- rasa/dialogue_understanding/generator/command_generator.py +5 -120
- rasa/dialogue_understanding/generator/llm_based_command_generator.py +5 -5
- rasa/dialogue_understanding/generator/llm_command_generator.py +1 -2
- rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +4 -50
- rasa/dialogue_understanding/generator/nlu_command_adapter.py +0 -3
- rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +3 -16
- rasa/dialogue_understanding/patterns/continue_interrupted.py +9 -0
- rasa/dialogue_understanding/stack/utils.py +1 -0
- rasa/e2e_test/e2e_test_case.py +1 -2
- rasa/e2e_test/utils/e2e_yaml_utils.py +1 -1
- rasa/e2e_test/utils/io.py +1 -1
- rasa/e2e_test/utils/validation.py +2 -100
- rasa/engine/recipes/default_recipe.py +49 -63
- rasa/engine/recipes/graph_recipe.py +7 -8
- rasa/hooks.py +9 -14
- rasa/model_manager/socket_bridge.py +2 -7
- rasa/model_manager/warm_rasa_process.py +4 -9
- rasa/model_training.py +1 -2
- rasa/nlu/classifiers/fallback_classifier.py +0 -3
- rasa/plugin.py +0 -11
- rasa/server.py +37 -1
- rasa/shared/constants.py +6 -26
- rasa/shared/core/events.py +8 -8
- rasa/shared/core/flows/flow.py +4 -4
- rasa/shared/core/flows/flow_step.py +15 -10
- rasa/shared/core/flows/flow_step_links.py +20 -12
- rasa/shared/core/flows/flow_step_sequence.py +5 -3
- rasa/shared/core/flows/steps/action.py +3 -2
- rasa/shared/core/flows/steps/call.py +3 -3
- rasa/shared/core/flows/steps/collect.py +6 -3
- rasa/shared/core/flows/steps/continuation.py +3 -1
- rasa/shared/core/flows/steps/end.py +3 -1
- rasa/shared/core/flows/steps/internal.py +2 -1
- rasa/shared/core/flows/steps/link.py +5 -3
- rasa/shared/core/flows/steps/no_operation.py +5 -3
- rasa/shared/core/flows/steps/set_slots.py +3 -2
- rasa/shared/core/flows/steps/start.py +3 -1
- rasa/shared/nlu/constants.py +0 -7
- rasa/shared/providers/llm/llm_response.py +1 -42
- rasa/shared/utils/llm.py +1 -1
- rasa/shared/utils/schemas/events.py +1 -1
- rasa/shared/utils/yaml.py +5 -6
- rasa/studio/upload.py +5 -19
- rasa/telemetry.py +33 -40
- rasa/tracing/instrumentation/attribute_extractors.py +9 -12
- rasa/validator.py +41 -32
- rasa/version.py +1 -1
- {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.4.dist-info}/METADATA +7 -7
- {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.4.dist-info}/RECORD +97 -104
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-b080d6f2.js +0 -1
- rasa/core/channels/studio_chat.py +0 -192
- rasa/dialogue_understanding/constants.py +0 -1
- rasa/dialogue_understanding/utils.py +0 -21
- rasa/dialogue_understanding_test/__init__.py +0 -0
- rasa/dialogue_understanding_test/constants.py +0 -15
- rasa/dialogue_understanding_test/du_test_case.py +0 -118
- rasa/dialogue_understanding_test/du_test_result.py +0 -11
- {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.4.dist-info}/NOTICE +0 -0
- {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.4.dist-info}/WHEEL +0 -0
- {rasa_pro-3.11.3a1.dev7.dist-info → rasa_pro-3.11.4.dist-info}/entry_points.txt +0 -0
rasa/telemetry.py
CHANGED
|
@@ -32,41 +32,34 @@ from rasa.constants import (
|
|
|
32
32
|
CONFIG_TELEMETRY_ENABLED,
|
|
33
33
|
CONFIG_TELEMETRY_ID,
|
|
34
34
|
)
|
|
35
|
-
from rasa.engine.storage.local_model_storage import LocalModelStorage
|
|
36
35
|
from rasa.shared.constants import (
|
|
37
|
-
CONFIG_LANGUAGE_KEY,
|
|
38
|
-
CONFIG_PIPELINE_KEY,
|
|
39
|
-
CONFIG_POLICIES_KEY,
|
|
40
|
-
CONFIG_PREDICT_SCHEMA,
|
|
41
|
-
CONFIG_RECIPE_KEY,
|
|
42
|
-
CONFIG_TRAIN_SCHEMA,
|
|
43
|
-
DOCS_URL_TELEMETRY,
|
|
44
|
-
LLM_API_HEALTH_CHECK_DEFAULT_VALUE,
|
|
45
|
-
LLM_API_HEALTH_CHECK_ENV_VAR,
|
|
46
|
-
MODEL_GROUP_CONFIG_KEY,
|
|
47
36
|
PROMPT_CONFIG_KEY,
|
|
48
37
|
PROMPT_TEMPLATE_CONFIG_KEY,
|
|
49
|
-
|
|
38
|
+
LLM_API_HEALTH_CHECK_ENV_VAR,
|
|
39
|
+
LLM_API_HEALTH_CHECK_DEFAULT_VALUE,
|
|
40
|
+
MODEL_GROUP_CONFIG_KEY,
|
|
50
41
|
)
|
|
42
|
+
from rasa.engine.storage.local_model_storage import LocalModelStorage
|
|
43
|
+
from rasa.shared.constants import DOCS_URL_TELEMETRY, UTTER_ASK_PREFIX
|
|
51
44
|
from rasa.shared.core.flows import Flow
|
|
52
45
|
from rasa.shared.core.flows.steps import (
|
|
53
|
-
CallFlowStep,
|
|
54
46
|
CollectInformationFlowStep,
|
|
55
|
-
LinkFlowStep,
|
|
56
47
|
SetSlotsFlowStep,
|
|
48
|
+
LinkFlowStep,
|
|
49
|
+
CallFlowStep,
|
|
57
50
|
)
|
|
58
51
|
from rasa.shared.exceptions import RasaException
|
|
59
52
|
from rasa.utils import common as rasa_utils
|
|
60
53
|
|
|
61
54
|
if typing.TYPE_CHECKING:
|
|
62
|
-
from rasa.core.agent import Agent
|
|
63
55
|
from rasa.core.brokers.broker import EventBroker
|
|
64
|
-
from rasa.core.channels.channel import InputChannel
|
|
65
56
|
from rasa.core.tracker_store import TrackerStore
|
|
66
|
-
from rasa.core.
|
|
67
|
-
from rasa.
|
|
68
|
-
from rasa.shared.importers.importer import TrainingDataImporter
|
|
57
|
+
from rasa.core.channels.channel import InputChannel
|
|
58
|
+
from rasa.core.agent import Agent
|
|
69
59
|
from rasa.shared.nlu.training_data.training_data import TrainingData
|
|
60
|
+
from rasa.shared.importers.importer import TrainingDataImporter
|
|
61
|
+
from rasa.core.utils import AvailableEndpoints
|
|
62
|
+
from rasa.e2e_test.e2e_test_case import TestCase, Fixture, Metadata
|
|
70
63
|
|
|
71
64
|
logger = logging.getLogger(__name__)
|
|
72
65
|
|
|
@@ -359,7 +352,6 @@ def _fetch_write_key(tool: Text, environment_variable: Text) -> Optional[Text]:
|
|
|
359
352
|
write key, if a key was present.
|
|
360
353
|
"""
|
|
361
354
|
import importlib_resources
|
|
362
|
-
|
|
363
355
|
from rasa import __name__ as name
|
|
364
356
|
|
|
365
357
|
if os.environ.get(environment_variable):
|
|
@@ -610,7 +602,7 @@ def _default_context_fields() -> Dict[Text, Any]:
|
|
|
610
602
|
Return:
|
|
611
603
|
A new context containing information about the runtime environment.
|
|
612
604
|
"""
|
|
613
|
-
from rasa.utils.licensing import
|
|
605
|
+
from rasa.utils.licensing import property_of_active_license, get_license_hash
|
|
614
606
|
|
|
615
607
|
global TELEMETRY_CONTEXT
|
|
616
608
|
|
|
@@ -970,13 +962,13 @@ def track_model_training(
|
|
|
970
962
|
training_id = uuid.uuid4().hex
|
|
971
963
|
|
|
972
964
|
tracking_data = {
|
|
973
|
-
"language": config.get(
|
|
965
|
+
"language": config.get("language"),
|
|
974
966
|
"training_id": training_id,
|
|
975
967
|
"type": model_type,
|
|
976
|
-
"pipeline": config.get(
|
|
977
|
-
"policies": config.get(
|
|
978
|
-
"train_schema": config.get(
|
|
979
|
-
"predict_schema": config.get(
|
|
968
|
+
"pipeline": config.get("pipeline"),
|
|
969
|
+
"policies": config.get("policies"),
|
|
970
|
+
"train_schema": config.get("train_schema"),
|
|
971
|
+
"predict_schema": config.get("predict_schema"),
|
|
980
972
|
"model_groups": rasa.core.utils.AvailableEndpoints.get_instance().model_groups,
|
|
981
973
|
"api_health_check_enabled": (
|
|
982
974
|
os.getenv(
|
|
@@ -1003,7 +995,7 @@ def track_model_training(
|
|
|
1003
995
|
"num_synonyms": len(nlu_data.entity_synonyms),
|
|
1004
996
|
"num_regexes": len(nlu_data.regex_features),
|
|
1005
997
|
"is_finetuning": is_finetuning,
|
|
1006
|
-
"recipe": config.get(
|
|
998
|
+
"recipe": config.get("recipe"),
|
|
1007
999
|
}
|
|
1008
1000
|
|
|
1009
1001
|
flow_statistics = _collect_flow_statistics(flows.underlying_flows)
|
|
@@ -1104,28 +1096,28 @@ def _get_llm_command_generator_config(config: Dict[str, Any]) -> Optional[Dict]:
|
|
|
1104
1096
|
Includes the model name, whether a custom prompt is used, whether flow
|
|
1105
1097
|
retrieval is enabled, and flow retrieval embedding model.
|
|
1106
1098
|
"""
|
|
1099
|
+
from rasa.shared.constants import (
|
|
1100
|
+
EMBEDDINGS_CONFIG_KEY,
|
|
1101
|
+
MODEL_CONFIG_KEY,
|
|
1102
|
+
MODEL_NAME_CONFIG_KEY,
|
|
1103
|
+
)
|
|
1107
1104
|
from rasa.dialogue_understanding.generator import (
|
|
1108
1105
|
LLMCommandGenerator,
|
|
1109
|
-
MultiStepLLMCommandGenerator,
|
|
1110
1106
|
SingleStepLLMCommandGenerator,
|
|
1107
|
+
MultiStepLLMCommandGenerator,
|
|
1108
|
+
)
|
|
1109
|
+
from rasa.dialogue_understanding.generator.multi_step.multi_step_llm_command_generator import ( # noqa: E501
|
|
1110
|
+
HANDLE_FLOWS_KEY,
|
|
1111
|
+
FILL_SLOTS_KEY,
|
|
1111
1112
|
)
|
|
1112
1113
|
from rasa.dialogue_understanding.generator.constants import (
|
|
1114
|
+
LLM_CONFIG_KEY,
|
|
1113
1115
|
DEFAULT_LLM_CONFIG,
|
|
1114
1116
|
FLOW_RETRIEVAL_KEY,
|
|
1115
|
-
LLM_CONFIG_KEY,
|
|
1116
1117
|
)
|
|
1117
1118
|
from rasa.dialogue_understanding.generator.flow_retrieval import (
|
|
1118
1119
|
DEFAULT_EMBEDDINGS_CONFIG,
|
|
1119
1120
|
)
|
|
1120
|
-
from rasa.dialogue_understanding.generator.multi_step.multi_step_llm_command_generator import ( # noqa: E501
|
|
1121
|
-
FILL_SLOTS_KEY,
|
|
1122
|
-
HANDLE_FLOWS_KEY,
|
|
1123
|
-
)
|
|
1124
|
-
from rasa.shared.constants import (
|
|
1125
|
-
EMBEDDINGS_CONFIG_KEY,
|
|
1126
|
-
MODEL_CONFIG_KEY,
|
|
1127
|
-
MODEL_NAME_CONFIG_KEY,
|
|
1128
|
-
)
|
|
1129
1121
|
|
|
1130
1122
|
def find_command_generator_component(pipeline: List) -> Optional[Dict]:
|
|
1131
1123
|
"""Finds the LLMCommandGenerator component in the pipeline."""
|
|
@@ -1212,7 +1204,7 @@ def _get_llm_command_generator_config(config: Dict[str, Any]) -> Optional[Dict]:
|
|
|
1212
1204
|
FLOW_RETRIEVAL_EMBEDDING_MODEL_GROUP_ID: None,
|
|
1213
1205
|
}
|
|
1214
1206
|
|
|
1215
|
-
pipeline = config.get(
|
|
1207
|
+
pipeline = config.get("pipeline", [])
|
|
1216
1208
|
if not isinstance(pipeline, list):
|
|
1217
1209
|
return command_generator_config
|
|
1218
1210
|
|
|
@@ -1394,7 +1386,8 @@ def track_inspect_started(model_type: Text) -> None:
|
|
|
1394
1386
|
"""Track when a user starts a bot using rasa inspect.
|
|
1395
1387
|
|
|
1396
1388
|
Args:
|
|
1397
|
-
|
|
1389
|
+
channel: Channel name `socketio` (used for chat assistants)
|
|
1390
|
+
or `browser_audio` (used for voice).
|
|
1398
1391
|
"""
|
|
1399
1392
|
_track(TELEMETRY_INSPECT_STARTED_EVENT, {"type": model_type})
|
|
1400
1393
|
|
|
@@ -5,6 +5,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Optional, Text, Tuple, Union
|
|
|
5
5
|
|
|
6
6
|
import tiktoken
|
|
7
7
|
from numpy import ndarray
|
|
8
|
+
from rasa.dialogue_understanding.generator.constants import FLOW_RETRIEVAL_KEY
|
|
8
9
|
from rasa_sdk.grpc_py import action_webhook_pb2
|
|
9
10
|
|
|
10
11
|
from rasa.core.actions.action import DirectCustomActionExecutor
|
|
@@ -18,27 +19,24 @@ from rasa.core.nlg.contextual_response_rephraser import ContextualResponseRephra
|
|
|
18
19
|
from rasa.core.processor import MessageProcessor
|
|
19
20
|
from rasa.core.tracker_store import TrackerStore
|
|
20
21
|
from rasa.dialogue_understanding.commands import Command
|
|
21
|
-
from rasa.dialogue_understanding.generator import LLMBasedCommandGenerator
|
|
22
|
-
from rasa.dialogue_understanding.generator.constants import FLOW_RETRIEVAL_KEY
|
|
23
22
|
from rasa.dialogue_understanding.stack.dialogue_stack import DialogueStack
|
|
23
|
+
from rasa.dialogue_understanding.generator import LLMBasedCommandGenerator
|
|
24
24
|
from rasa.engine.graph import ExecutionContext, GraphModelConfiguration, GraphNode
|
|
25
25
|
from rasa.engine.training.graph_trainer import GraphTrainer
|
|
26
26
|
from rasa.shared.constants import (
|
|
27
|
-
CONFIG_RECIPE_KEY,
|
|
28
|
-
DEPLOYMENT_CONFIG_KEY,
|
|
29
27
|
EMBEDDINGS_CONFIG_KEY,
|
|
30
|
-
LLM_CONFIG_KEY,
|
|
31
28
|
MODEL_CONFIG_KEY,
|
|
32
|
-
MODEL_GROUP_ID_CONFIG_KEY,
|
|
33
29
|
PROVIDER_CONFIG_KEY,
|
|
34
30
|
TIMEOUT_CONFIG_KEY,
|
|
31
|
+
DEPLOYMENT_CONFIG_KEY,
|
|
32
|
+
MODEL_GROUP_ID_CONFIG_KEY,
|
|
33
|
+
LLM_CONFIG_KEY,
|
|
35
34
|
)
|
|
36
35
|
from rasa.shared.core.constants import REQUESTED_SLOT
|
|
37
36
|
from rasa.shared.core.domain import Domain
|
|
38
37
|
from rasa.shared.core.events import DialogueStackUpdated, Event
|
|
39
38
|
from rasa.shared.core.flows import Flow, FlowsList, FlowStep
|
|
40
39
|
from rasa.shared.core.trackers import DialogueStateTracker
|
|
41
|
-
from rasa.shared.core.training_data.structures import StoryGraph
|
|
42
40
|
from rasa.shared.importers.importer import TrainingDataImporter
|
|
43
41
|
from rasa.shared.nlu.constants import INTENT_NAME_KEY, SET_SLOT_COMMAND
|
|
44
42
|
from rasa.shared.utils.llm import (
|
|
@@ -48,6 +46,7 @@ from rasa.tracing.constants import (
|
|
|
48
46
|
PROMPT_TOKEN_LENGTH_ATTRIBUTE_NAME,
|
|
49
47
|
REQUEST_BODY_SIZE_IN_BYTES_ATTRIBUTE_NAME,
|
|
50
48
|
)
|
|
49
|
+
from rasa.shared.core.training_data.structures import StoryGraph
|
|
51
50
|
|
|
52
51
|
if TYPE_CHECKING:
|
|
53
52
|
from langchain.llms.base import BaseLLM
|
|
@@ -256,7 +255,7 @@ def extract_attrs_for_graph_trainer(
|
|
|
256
255
|
return {
|
|
257
256
|
"training_type": model_configuration.training_type.model_type,
|
|
258
257
|
"language": model_configuration.language,
|
|
259
|
-
"recipe_name": importer.get_config().get(
|
|
258
|
+
"recipe_name": importer.get_config().get("recipe"),
|
|
260
259
|
"output_filename": output_filename.name,
|
|
261
260
|
"is_finetuning": is_finetuning,
|
|
262
261
|
}
|
|
@@ -578,7 +577,6 @@ def extract_attrs_for_run_step(
|
|
|
578
577
|
tracker: DialogueStateTracker,
|
|
579
578
|
available_actions: List[str],
|
|
580
579
|
flows: FlowsList,
|
|
581
|
-
previous_step_id: Text,
|
|
582
580
|
) -> Dict[str, Any]:
|
|
583
581
|
current_context = extract_current_context_attribute(stack)
|
|
584
582
|
|
|
@@ -587,7 +585,6 @@ def extract_attrs_for_run_step(
|
|
|
587
585
|
"step_description": step.description if step.description else "None",
|
|
588
586
|
"current_flow_id": flow.id,
|
|
589
587
|
"current_context": json.dumps(current_context),
|
|
590
|
-
"previous_step_id": previous_step_id,
|
|
591
588
|
}
|
|
592
589
|
|
|
593
590
|
|
|
@@ -647,8 +644,8 @@ def extract_attrs_for_intentless_policy_generate_llm_answer(
|
|
|
647
644
|
self: "IntentlessPolicy", llm: "BaseLLM", prompt: str
|
|
648
645
|
) -> Dict[str, Any]:
|
|
649
646
|
from rasa.core.policies.intentless_policy import (
|
|
650
|
-
DEFAULT_EMBEDDINGS_CONFIG,
|
|
651
647
|
DEFAULT_LLM_CONFIG,
|
|
648
|
+
DEFAULT_EMBEDDINGS_CONFIG,
|
|
652
649
|
)
|
|
653
650
|
|
|
654
651
|
attributes = extract_llm_config(
|
|
@@ -664,8 +661,8 @@ def extract_attrs_for_enterprise_search_generate_llm_answer(
|
|
|
664
661
|
self: "EnterpriseSearchPolicy", llm: "BaseLLM", prompt: str
|
|
665
662
|
) -> Dict[str, Any]:
|
|
666
663
|
from rasa.core.policies.enterprise_search_policy import (
|
|
667
|
-
DEFAULT_EMBEDDINGS_CONFIG,
|
|
668
664
|
DEFAULT_LLM_CONFIG,
|
|
665
|
+
DEFAULT_EMBEDDINGS_CONFIG,
|
|
669
666
|
)
|
|
670
667
|
|
|
671
668
|
attributes = extract_llm_config(
|
rasa/validator.py
CHANGED
|
@@ -3,60 +3,54 @@ import re
|
|
|
3
3
|
import string
|
|
4
4
|
import sys
|
|
5
5
|
from collections import defaultdict
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Set, Text, Optional, Dict, Any, List, Tuple
|
|
7
7
|
|
|
8
8
|
import structlog
|
|
9
9
|
from jinja2 import Template
|
|
10
10
|
from pypred import Predicate
|
|
11
|
-
from pypred.ast import
|
|
11
|
+
from pypred.ast import Literal, CompareOperator, NegateOperator
|
|
12
12
|
|
|
13
13
|
import rasa.core.training.story_conflict
|
|
14
|
-
import rasa.shared.nlu.constants
|
|
15
|
-
import rasa.shared.utils.cli
|
|
16
|
-
import rasa.shared.utils.io
|
|
17
14
|
from rasa.core.channels import UserMessage
|
|
18
15
|
from rasa.dialogue_understanding.stack.frames import PatternFlowStackFrame
|
|
16
|
+
from rasa.shared.core.command_payload_reader import (
|
|
17
|
+
CommandPayloadReader,
|
|
18
|
+
MAX_NUMBER_OF_SLOTS,
|
|
19
|
+
)
|
|
20
|
+
from rasa.shared.core.flows.flow_step_links import IfFlowStepLink
|
|
21
|
+
from rasa.shared.core.flows.steps.set_slots import SetSlotsFlowStep
|
|
22
|
+
from rasa.shared.core.flows.steps.collect import CollectInformationFlowStep
|
|
23
|
+
from rasa.shared.core.flows.steps.action import ActionFlowStep
|
|
24
|
+
from rasa.shared.core.flows.steps.link import LinkFlowStep
|
|
25
|
+
from rasa.shared.core.flows import FlowsList
|
|
26
|
+
from rasa.shared.core.flows.utils import (
|
|
27
|
+
warn_deprecated_collect_step_config,
|
|
28
|
+
get_duplicate_slot_persistence_config_error_message,
|
|
29
|
+
get_invalid_slot_persistence_config_error_message,
|
|
30
|
+
)
|
|
31
|
+
import rasa.shared.nlu.constants
|
|
19
32
|
from rasa.shared.constants import (
|
|
20
33
|
ASSISTANT_ID_DEFAULT_VALUE,
|
|
21
34
|
ASSISTANT_ID_KEY,
|
|
22
35
|
CONFIG_MANDATORY_KEYS,
|
|
23
|
-
CONFIG_PIPELINE_KEY,
|
|
24
|
-
DOCS_URL_ACTIONS,
|
|
25
36
|
DOCS_URL_DOMAIN,
|
|
26
37
|
DOCS_URL_DOMAINS,
|
|
27
38
|
DOCS_URL_FORMS,
|
|
28
39
|
DOCS_URL_RESPONSES,
|
|
29
|
-
REQUIRED_SLOTS_KEY,
|
|
30
40
|
UTTER_PREFIX,
|
|
41
|
+
DOCS_URL_ACTIONS,
|
|
42
|
+
REQUIRED_SLOTS_KEY,
|
|
31
43
|
)
|
|
32
44
|
from rasa.shared.core import constants
|
|
33
|
-
from rasa.shared.core.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
)
|
|
37
|
-
from rasa.shared.core.constants import (
|
|
38
|
-
ACTIVE_LOOP,
|
|
39
|
-
MAPPING_CONDITIONS,
|
|
40
|
-
MAPPING_TYPE,
|
|
41
|
-
SlotMappingType,
|
|
42
|
-
)
|
|
45
|
+
from rasa.shared.core.constants import MAPPING_CONDITIONS, ACTIVE_LOOP
|
|
46
|
+
from rasa.shared.core.events import ActionExecuted, ActiveLoop
|
|
47
|
+
from rasa.shared.core.events import UserUttered
|
|
43
48
|
from rasa.shared.core.domain import (
|
|
44
|
-
RESPONSE_KEYS_TO_INTERPOLATE,
|
|
45
49
|
Domain,
|
|
46
|
-
|
|
47
|
-
from rasa.shared.core.events import ActionExecuted, ActiveLoop, UserUttered
|
|
48
|
-
from rasa.shared.core.flows import FlowsList
|
|
49
|
-
from rasa.shared.core.flows.flow_step_links import IfFlowStepLink
|
|
50
|
-
from rasa.shared.core.flows.steps.action import ActionFlowStep
|
|
51
|
-
from rasa.shared.core.flows.steps.collect import CollectInformationFlowStep
|
|
52
|
-
from rasa.shared.core.flows.steps.link import LinkFlowStep
|
|
53
|
-
from rasa.shared.core.flows.steps.set_slots import SetSlotsFlowStep
|
|
54
|
-
from rasa.shared.core.flows.utils import (
|
|
55
|
-
get_duplicate_slot_persistence_config_error_message,
|
|
56
|
-
get_invalid_slot_persistence_config_error_message,
|
|
57
|
-
warn_deprecated_collect_step_config,
|
|
50
|
+
RESPONSE_KEYS_TO_INTERPOLATE,
|
|
58
51
|
)
|
|
59
52
|
from rasa.shared.core.generator import TrainingDataGenerator
|
|
53
|
+
from rasa.shared.core.constants import SlotMappingType, MAPPING_TYPE
|
|
60
54
|
from rasa.shared.core.slots import BooleanSlot, CategoricalSlot, ListSlot, Slot
|
|
61
55
|
from rasa.shared.core.training_data.story_reader.yaml_story_reader import (
|
|
62
56
|
YAMLStoryReader,
|
|
@@ -68,6 +62,9 @@ from rasa.shared.nlu.constants import COMMANDS
|
|
|
68
62
|
from rasa.shared.nlu.training_data.message import Message
|
|
69
63
|
from rasa.shared.nlu.training_data.training_data import TrainingData
|
|
70
64
|
|
|
65
|
+
import rasa.shared.utils.cli
|
|
66
|
+
import rasa.shared.utils.io
|
|
67
|
+
|
|
71
68
|
logger = logging.getLogger(__name__)
|
|
72
69
|
structlogger = structlog.get_logger()
|
|
73
70
|
|
|
@@ -313,6 +310,18 @@ class Validator:
|
|
|
313
310
|
everything_is_alright = True
|
|
314
311
|
|
|
315
312
|
for response_text, response_variations in self.domain.responses.items():
|
|
313
|
+
if not response_variations:
|
|
314
|
+
structlogger.error(
|
|
315
|
+
"validator.empty_response",
|
|
316
|
+
response=response_text,
|
|
317
|
+
event_info=(
|
|
318
|
+
f"The response '{response_text}' in the domain file "
|
|
319
|
+
f"does not have any variations. Please add at least one "
|
|
320
|
+
f"variation to the response."
|
|
321
|
+
),
|
|
322
|
+
)
|
|
323
|
+
everything_is_alright = False
|
|
324
|
+
|
|
316
325
|
for response in response_variations:
|
|
317
326
|
if any(
|
|
318
327
|
self.check_for_placeholder(response.get(key))
|
|
@@ -1505,7 +1514,7 @@ class Validator:
|
|
|
1505
1514
|
contains_nlu_command_adapter = any(
|
|
1506
1515
|
[
|
|
1507
1516
|
component.get("name") == "NLUCommandAdapter"
|
|
1508
|
-
for component in self.config.get(
|
|
1517
|
+
for component in self.config.get("pipeline", [])
|
|
1509
1518
|
]
|
|
1510
1519
|
)
|
|
1511
1520
|
|
rasa/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rasa-pro
|
|
3
|
-
Version: 3.11.
|
|
3
|
+
Version: 3.11.4
|
|
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
|
|
@@ -40,7 +40,7 @@ Requires-Dist: colorclass (>=2.2,<2.3)
|
|
|
40
40
|
Requires-Dist: coloredlogs (>=15,<16)
|
|
41
41
|
Requires-Dist: colorhash (>=2.0,<2.1.0)
|
|
42
42
|
Requires-Dist: confluent-kafka (>=2.3.0,<3.0.0)
|
|
43
|
-
Requires-Dist: cryptography (>=
|
|
43
|
+
Requires-Dist: cryptography (>=43.0.1)
|
|
44
44
|
Requires-Dist: cvg-python-sdk (>=0.5.1,<0.6.0)
|
|
45
45
|
Requires-Dist: dask (>=2024.7.0,<2024.8.0)
|
|
46
46
|
Requires-Dist: demoji (>=1.1.0,<2.0.0)
|
|
@@ -59,7 +59,7 @@ Requires-Dist: importlib-resources (==6.1.3)
|
|
|
59
59
|
Requires-Dist: jieba (>=0.42.1,<0.43) ; extra == "jieba" or extra == "full"
|
|
60
60
|
Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
|
|
61
61
|
Requires-Dist: jsonpatch (>=1.33,<2.0)
|
|
62
|
-
Requires-Dist: jsonpickle (>=3.0,<3.
|
|
62
|
+
Requires-Dist: jsonpickle (>=3.3.0,<3.4)
|
|
63
63
|
Requires-Dist: jsonschema (>=4.22)
|
|
64
64
|
Requires-Dist: keras (==2.14.0)
|
|
65
65
|
Requires-Dist: langchain (>=0.2.0,<0.3.0)
|
|
@@ -90,7 +90,7 @@ Requires-Dist: pycountry (>=22.3.5,<23.0.0)
|
|
|
90
90
|
Requires-Dist: pydantic (>=2.0,<3.0)
|
|
91
91
|
Requires-Dist: pydot (>=1.4,<1.5)
|
|
92
92
|
Requires-Dist: pykwalify (>=1.8,<1.9)
|
|
93
|
-
Requires-Dist: pymilvus (
|
|
93
|
+
Requires-Dist: pymilvus (>=2.4.0,<2.4.2)
|
|
94
94
|
Requires-Dist: pymongo (>=4.10.1,<4.11.0)
|
|
95
95
|
Requires-Dist: pypred (>=0.4.0,<0.5.0)
|
|
96
96
|
Requires-Dist: python-dateutil (>=2.8.2,<2.9.0)
|
|
@@ -105,10 +105,10 @@ Requires-Dist: questionary (>=1.10.0,<2.1.0)
|
|
|
105
105
|
Requires-Dist: randomname (>=0.2.1,<0.3.0)
|
|
106
106
|
Requires-Dist: rasa-sdk (==3.11.0)
|
|
107
107
|
Requires-Dist: redis (>=4.6.0,<6.0)
|
|
108
|
-
Requires-Dist: regex (>=
|
|
109
|
-
Requires-Dist: requests (>=2.
|
|
108
|
+
Requires-Dist: regex (>=2022.10.31,<2022.11)
|
|
109
|
+
Requires-Dist: requests (>=2.31.0,<2.32.0)
|
|
110
110
|
Requires-Dist: rich (>=13.4.2,<14.0.0)
|
|
111
|
-
Requires-Dist: rocketchat_API (>=1.
|
|
111
|
+
Requires-Dist: rocketchat_API (>=1.30.0,<1.31.0)
|
|
112
112
|
Requires-Dist: ruamel.yaml (>=0.17.21,<0.17.22)
|
|
113
113
|
Requires-Dist: safetensors (>=0.4.5,<0.5.0)
|
|
114
114
|
Requires-Dist: sanic (>=22.12,<22.13)
|