rasa-pro 3.13.11__py3-none-any.whl → 3.13.12__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.

@@ -35,8 +35,6 @@ class DirectCustomActionExecutor(CustomActionExecutor):
35
35
  self.action_name = action_name
36
36
  self.action_endpoint = action_endpoint
37
37
  self.action_executor = self._create_action_executor()
38
- self.register_actions_from_a_module()
39
- self.action_executor.reload()
40
38
 
41
39
  @staticmethod
42
40
  @lru_cache(maxsize=1)
@@ -88,12 +86,21 @@ class DirectCustomActionExecutor(CustomActionExecutor):
88
86
 
89
87
  Returns:
90
88
  The response from the execution of the custom action.
89
+
90
+ Raises:
91
+ RasaException: If the actions module specified does not exist.
91
92
  """
92
93
  structlogger.debug(
93
94
  "action.direct_custom_action_executor.run",
94
95
  action_name=self.action_name,
95
96
  )
96
97
 
98
+ # Register actions module if not already registered.
99
+ # This is done here instead of __init__ to allow proper
100
+ # exception handling and avoid hanging conversations.
101
+ self.register_actions_from_a_module()
102
+ self.action_executor.reload()
103
+
97
104
  tracker_state = tracker.current_state(EventVerbosity.ALL)
98
105
  action_call = {
99
106
  "next_action": self.action_name,
rasa/utils/licensing.py CHANGED
@@ -20,7 +20,8 @@ from rasa.shared.utils.cli import print_error_and_exit
20
20
  if typing.TYPE_CHECKING:
21
21
  from rasa.core.tracker_stores.tracker_store import TrackerStore
22
22
 
23
- LICENSE_ENV_VAR = "RASA_PRO_LICENSE"
23
+ LICENSE_ENV_VAR = "RASA_LICENSE"
24
+ LICENSE_ENV_VAR_LEGACY = "RASA_PRO_LICENSE"
24
25
  ALGORITHM = "RS256"
25
26
  # deepcode ignore HardcodedKey: This is a public key - not a security issue.
26
27
  PUBLIC_KEY = """-----BEGIN PUBLIC KEY-----
@@ -265,12 +266,22 @@ class License:
265
266
 
266
267
  def retrieve_license_from_env() -> Text:
267
268
  """Return the license found in the env var."""
269
+ # Check environment variables first
270
+ license_value = os.environ.get(LICENSE_ENV_VAR) or os.environ.get(
271
+ LICENSE_ENV_VAR_LEGACY
272
+ )
273
+ if license_value:
274
+ return license_value
275
+
276
+ # Fall back to .env file
268
277
  stored_env_values = dotenv_values(".env")
269
- license_from_env = os.environ.get(LICENSE_ENV_VAR)
270
- license = license_from_env or stored_env_values.get(LICENSE_ENV_VAR)
271
- if not license:
272
- raise LicenseNotFoundException()
273
- return license
278
+ license_value = stored_env_values.get(LICENSE_ENV_VAR) or stored_env_values.get(
279
+ LICENSE_ENV_VAR_LEGACY
280
+ )
281
+ if license_value:
282
+ return license_value
283
+
284
+ raise LicenseNotFoundException()
274
285
 
275
286
 
276
287
  def is_license_expiring_soon(license: License) -> bool:
@@ -297,15 +308,15 @@ def validate_license_from_env(product_area: Text = PRODUCT_AREA) -> None:
297
308
  except LicenseNotFoundException:
298
309
  structlogger.error("license.not_found.error")
299
310
  raise SystemExit(
300
- f"A Rasa Pro license is required. "
301
- f"Please set the environmental variable "
311
+ f"A Rasa license is required. "
312
+ f"Please set the environment variable "
302
313
  f"`{LICENSE_ENV_VAR}` to a valid license string. "
303
314
  )
304
315
  except LicenseValidationException as e:
305
316
  structlogger.error("license.validation.error", error=e)
306
317
  raise SystemExit(
307
- f"Failed to validate Rasa Pro license "
308
- f"which was read from environmental variable `{LICENSE_ENV_VAR}`. "
318
+ f"Failed to validate Rasa license "
319
+ f"which was read from environment variable `{LICENSE_ENV_VAR}`. "
309
320
  f"Please ensure `{LICENSE_ENV_VAR}` is set to a valid license string. "
310
321
  )
311
322
 
rasa/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  # this file will automatically be changed,
2
2
  # do not add anything but the version number here!
3
- __version__ = "3.13.11"
3
+ __version__ = "3.13.12"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: rasa-pro
3
- Version: 3.13.11
3
+ Version: 3.13.12
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
  Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework
6
6
  Author: Rasa Technologies GmbH
@@ -90,7 +90,7 @@ rasa/core/actions/action_trigger_flow.py,sha256=IydYAGafTtoY6XSgCX124xJQhzudUg8J
90
90
  rasa/core/actions/action_trigger_search.py,sha256=QfYqnaGRCqRYJ4msYsLAbnVYW5ija_tqhCcKIN8aEfw,1064
91
91
  rasa/core/actions/constants.py,sha256=gfgdWmj-OJ5xTcTAS1OcXQ3dgcTiHO98NC-SGyKlTjs,161
92
92
  rasa/core/actions/custom_action_executor.py,sha256=qafASBdM3-hByDqbkNxgXfx5yMSsJh_nB3B7x9ye0TY,6176
93
- rasa/core/actions/direct_custom_actions_executor.py,sha256=IzxRnPF92zs3WX-p9DoFq51Vf0QwfE6prB_AlyEEllc,3746
93
+ rasa/core/actions/direct_custom_actions_executor.py,sha256=zGHI3cXVRfyzaaGSH7VePXHQxsDAvF0iAZSEcOuM-_M,4026
94
94
  rasa/core/actions/e2e_stub_custom_action_executor.py,sha256=D-kECC1QjVLv4owNxstW2xJPPsXTGfGepvquMeWB_ec,2282
95
95
  rasa/core/actions/forms.py,sha256=MPGxp3vg-EgFcU5UQYqWM2tycSFIuoF6vWvNSSWPhSA,26967
96
96
  rasa/core/actions/grpc_custom_action_executor.py,sha256=EDxdSIDA4H4Mu-QZk-pPGV2N41ZsbY8W9laV6l1WlDQ,9103
@@ -818,7 +818,7 @@ rasa/utils/converter.py,sha256=H4LHpoAK7MXMmvNZG_uSn0gbccCJvHtsA2-6Zya4u6M,1656
818
818
  rasa/utils/endpoints.py,sha256=jX9xSI_3KJ-NpzymyfaO-Zj-ISaWbA4ql2Kx3NulBvE,10905
819
819
  rasa/utils/io.py,sha256=LIAdQQqUPA-V_mdpgeQzPDzA4rmsdZLyVKc8j_0Z70Y,7161
820
820
  rasa/utils/json_utils.py,sha256=SKtJzzsIRCAgNEQiBvWDDm9euMRBgJ-TyvCi2tXHH1w,1689
821
- rasa/utils/licensing.py,sha256=_YGELCUjBF9rzVwlKoP1YfnqskszHUqyd-_qVpXr5Kw,20508
821
+ rasa/utils/licensing.py,sha256=SP_jm0S1hpwPGh9bQaJviBL0Eu4xuwToObWTZRLaouQ,20768
822
822
  rasa/utils/log_utils.py,sha256=QR0R5Ezs9xOaESluelqdikViIypXSWVxCPJmJM4Ir3E,5440
823
823
  rasa/utils/mapper.py,sha256=CZiD3fu7-W-OJgoB1R8JaOg-Hq13TK20D-zGVNgbF18,7726
824
824
  rasa/utils/ml_utils.py,sha256=y4Czr9GdRBj-a2npXU8ED2qC9bzw5olRyqQEmu5BB8k,4185
@@ -846,9 +846,9 @@ rasa/utils/train_utils.py,sha256=ClJx-6x3-h3Vt6mskacgkcCUJTMXjFPe3zAcy_DfmaU,212
846
846
  rasa/utils/url_tools.py,sha256=dZ1HGkVdWTJB7zYEdwoDIrEuyX9HE5WsxKKFVsXBLE0,1218
847
847
  rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
848
848
  rasa/validator.py,sha256=fhRlHQvuBkiup0FnNYmwRmqQwC3QpdCJt0TuvW4jMaI,83125
849
- rasa/version.py,sha256=Jzj7EnZb3wsuxW8HdqrnCnuZtLvC2rhZaQzbe_WVA-Y,118
850
- rasa_pro-3.13.11.dist-info/METADATA,sha256=Fott0Gi1RETKy7isFGu91-sV_THQlBxv3un2fd3Bxyg,10551
851
- rasa_pro-3.13.11.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
852
- rasa_pro-3.13.11.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
853
- rasa_pro-3.13.11.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
854
- rasa_pro-3.13.11.dist-info/RECORD,,
849
+ rasa/version.py,sha256=3UnszRya9YXfsq3ggIAqyg0PEBNe3n1XPY7rrfVCXzE,118
850
+ rasa_pro-3.13.12.dist-info/METADATA,sha256=FwZnszYQiFEoggVI8pPRc-xF3IIivOUAOKYGgZ3h5jY,10551
851
+ rasa_pro-3.13.12.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
852
+ rasa_pro-3.13.12.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
853
+ rasa_pro-3.13.12.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
854
+ rasa_pro-3.13.12.dist-info/RECORD,,