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

@@ -183,7 +183,7 @@ class LLMBasedCommandGenerator(GraphComponent, CommandGenerator, ABC):
183
183
  except Exception as e:
184
184
  structlogger.error(
185
185
  "llm_based_command_generator.train.failed",
186
- event_info=("Flow retrieval store isinaccessible."),
186
+ event_info="Flow retrieval store is inaccessible.",
187
187
  error=e,
188
188
  )
189
189
  raise
@@ -19,6 +19,7 @@ from rasa.engine.storage.storage import ModelStorage
19
19
  from rasa.shared.constants import ROUTE_TO_CALM_SLOT
20
20
  from rasa.shared.core.domain import Domain
21
21
  from rasa.shared.core.flows.flows_list import FlowsList
22
+ from rasa.shared.core.flows.steps import CollectInformationFlowStep
22
23
  from rasa.shared.core.slot_mappings import (
23
24
  SlotFillingManager,
24
25
  extract_slot_value,
@@ -217,7 +218,24 @@ def _issue_set_slot_commands(
217
218
  commands: List[Command] = []
218
219
  domain = domain if domain else Domain.empty()
219
220
  slot_filling_manager = SlotFillingManager(domain, tracker, message)
220
- available_slot_names = flows.available_slot_names()
221
+
222
+ # only use slots that don't have ask_before_filling set to True
223
+ available_slot_names = flows.available_slot_names(ask_before_filling=False)
224
+
225
+ # check if the current step is a CollectInformationFlowStep
226
+ # in case it has ask_before_filling set to True, we need to add the
227
+ # slot to the available_slot_names
228
+ if tracker.active_flow:
229
+ flow = flows.flow_by_id(tracker.active_flow)
230
+ step_id = tracker.current_step_id
231
+ if flow is not None:
232
+ current_step = flow.step_by_id(step_id)
233
+ if (
234
+ current_step
235
+ and isinstance(current_step, CollectInformationFlowStep)
236
+ and current_step.ask_before_filling
237
+ ):
238
+ available_slot_names.add(current_step.collect)
221
239
 
222
240
  for _, slot in tracker.slots.items():
223
241
  # if a slot is not collected in available flows,
@@ -221,12 +221,16 @@ class FlowsList:
221
221
  [f for f in self.underlying_flows if not f.is_startable_only_via_link()]
222
222
  )
223
223
 
224
- def available_slot_names(self) -> Set[str]:
224
+ def available_slot_names(
225
+ self, ask_before_filling: Optional[bool] = None
226
+ ) -> Set[str]:
225
227
  """Get all slot names collected by flows."""
226
228
  return {
227
229
  step.collect
228
230
  for flow in self.underlying_flows
229
231
  for step in flow.get_collect_steps()
232
+ if ask_before_filling is None
233
+ or step.ask_before_filling == ask_before_filling
230
234
  }
231
235
 
232
236
  def available_custom_actions(self) -> Set[str]:
@@ -5,6 +5,8 @@ import litellm
5
5
  import logging
6
6
  import structlog
7
7
  from litellm import aembedding, embedding, validate_environment
8
+
9
+ from rasa.shared.constants import API_BASE_CONFIG_KEY
8
10
  from rasa.shared.exceptions import (
9
11
  ProviderClientAPIException,
10
12
  ProviderClientValidationError,
@@ -85,7 +87,10 @@ class _BaseLiteLLMEmbeddingClient:
85
87
 
86
88
  def _validate_environment_variables(self) -> None:
87
89
  """Validate that the required environment variables are set."""
88
- validation_info = validate_environment(self._litellm_model_name)
90
+ validation_info = validate_environment(
91
+ self._litellm_model_name,
92
+ api_base=self._litellm_extra_parameters.get(API_BASE_CONFIG_KEY),
93
+ )
89
94
  if missing_environment_variables := validation_info.get(
90
95
  _VALIDATE_ENVIRONMENT_MISSING_KEYS_KEY
91
96
  ):
@@ -9,6 +9,7 @@ from litellm import (
9
9
  validate_environment,
10
10
  )
11
11
 
12
+ from rasa.shared.constants import API_BASE_CONFIG_KEY
12
13
  from rasa.shared.exceptions import (
13
14
  ProviderClientAPIException,
14
15
  ProviderClientValidationError,
@@ -102,7 +103,10 @@ class _BaseLiteLLMClient:
102
103
 
103
104
  def _validate_environment_variables(self) -> None:
104
105
  """Validate that the required environment variables are set."""
105
- validation_info = validate_environment(self._litellm_model_name)
106
+ validation_info = validate_environment(
107
+ self._litellm_model_name,
108
+ api_base=self._litellm_extra_parameters.get(API_BASE_CONFIG_KEY),
109
+ )
106
110
  if missing_environment_variables := validation_info.get(
107
111
  _VALIDATE_ENVIRONMENT_MISSING_KEYS_KEY
108
112
  ):
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.10.13"
3
+ __version__ = "3.10.14"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rasa-pro
3
- Version: 3.10.13
3
+ Version: 3.10.14
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
@@ -68,7 +68,7 @@ Requires-Dist: mattermostwrapper (>=2.2,<2.3)
68
68
  Requires-Dist: mlflow (>=2.15.1,<3.0.0) ; extra == "mlflow"
69
69
  Requires-Dist: networkx (>=3.1,<3.2)
70
70
  Requires-Dist: numpy (>=1.23.5,<1.25.0) ; python_version >= "3.9" and python_version < "3.11"
71
- Requires-Dist: openai (>=1.54.0,<1.55.0)
71
+ Requires-Dist: openai (>=1.55.3,<1.56.0)
72
72
  Requires-Dist: openpyxl (>=3.1.5,<4.0.0)
73
73
  Requires-Dist: opentelemetry-api (>=1.16.0,<1.17.0)
74
74
  Requires-Dist: opentelemetry-exporter-jaeger (>=1.16.0,<1.17.0)
@@ -359,13 +359,13 @@ rasa/dialogue_understanding/generator/command_generator.py,sha256=woJ4-59Iarugyx
359
359
  rasa/dialogue_understanding/generator/constants.py,sha256=yh4mAiIINkDcZs_xApEjMoMn7pFm3xhFmFF3DjStTco,680
360
360
  rasa/dialogue_understanding/generator/flow_document_template.jinja2,sha256=f4H6vVd-_nX_RtutMh1xD3ZQE_J2OyuPHAtiltfiAPY,253
361
361
  rasa/dialogue_understanding/generator/flow_retrieval.py,sha256=E7u1Ynb606LOLo_QEJke7NfdrWs9Z3MXjv0U15fbb18,16157
362
- rasa/dialogue_understanding/generator/llm_based_command_generator.py,sha256=wB00ojcueoYHOXl1zJosDJPuB0q-iBbqT7mdcmA75Gc,16628
362
+ rasa/dialogue_understanding/generator/llm_based_command_generator.py,sha256=Aktu_gdxAIQowfQ9KBcS2w3R9Hilc2ehLPB89ek9mVs,16627
363
363
  rasa/dialogue_understanding/generator/llm_command_generator.py,sha256=P1LA0eJxf33GKzN_baUWq1P9KNwYCvKZR-N-Z4zzdjA,2459
364
364
  rasa/dialogue_understanding/generator/multi_step/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
365
365
  rasa/dialogue_understanding/generator/multi_step/fill_slots_prompt.jinja2,sha256=Y0m673tAML3cFPaLM-urMXDsBYUUcXIw9YUpkAhGUuA,2933
366
366
  rasa/dialogue_understanding/generator/multi_step/handle_flows_prompt.jinja2,sha256=8l93_QBKBYnqLICVdiTu5ejZDE8F36BU8-qwba0px44,1927
367
367
  rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py,sha256=133WGlwv49PF4_DKM53u0J_pWrDs88dgUYc5fq1m6NQ,31568
368
- rasa/dialogue_understanding/generator/nlu_command_adapter.py,sha256=-oc3lxAdQEcX25f4IalxOhEw9XhA_6HxGpItlY1RUvY,8412
368
+ rasa/dialogue_understanding/generator/nlu_command_adapter.py,sha256=_mltSp6JzB6tYmhxjTVxyjOzorO7-Poj2nLpHQrDsQs,9202
369
369
  rasa/dialogue_understanding/generator/single_step/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
370
370
  rasa/dialogue_understanding/generator/single_step/command_prompt_template.jinja2,sha256=qVTuas5XgAv2M_hsihyXl-wAnBDEpg_uhVvNrR5m-h0,3751
371
371
  rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py,sha256=lzSGEqsKtRPWK9hP3GmaZazN39icII-MZp_0sykvpNQ,16031
@@ -559,7 +559,7 @@ rasa/shared/core/flows/flow_path.py,sha256=xstwahZBU5cfMY46mREA4NoOGlKLBRAqeP_mJ
559
559
  rasa/shared/core/flows/flow_step.py,sha256=YW2rF2uCDEPfkX8vIHue95zfjF4cU84DWiW1wvGsGZs,4218
560
560
  rasa/shared/core/flows/flow_step_links.py,sha256=phK1BiAnASSvjUm3FcPw3atOzXbZ8ul6t9PjJes0oqI,10006
561
561
  rasa/shared/core/flows/flow_step_sequence.py,sha256=jStz6epvKIycZWn8nE52ZB1vbncnOKkP5J_GuJsyLa8,2253
562
- rasa/shared/core/flows/flows_list.py,sha256=xxbJyEwVmGEKodeiU7cJxoq3C1_xT0XmbT49dU3ypBM,7959
562
+ rasa/shared/core/flows/flows_list.py,sha256=PtcoK9d7gabFeofdGzQ0bYGh7tYyQDs9t8Wa3F6fkAc,8119
563
563
  rasa/shared/core/flows/flows_yaml_schema.json,sha256=ZoVbDzNM89miI3q00J7JtkZRM5dBnicsCpuy9B76jr8,10896
564
564
  rasa/shared/core/flows/nlu_trigger.py,sha256=gfnRUi7QJaUjMb43RTyQWbLoIUSx2I78LeM8CjDIIDE,3907
565
565
  rasa/shared/core/flows/steps/__init__.py,sha256=M43kHDuB8okcIE3WLivnvuCBzIsA5Qi2ATXUGTVW2Rw,655
@@ -635,7 +635,7 @@ rasa/shared/providers/_configs/self_hosted_llm_client_config.py,sha256=fUEvqCrhE
635
635
  rasa/shared/providers/_configs/utils.py,sha256=vxtWmrnpnH2ryHWiP7hpLbSBAq3x-3hsGxGWSEgp4Lk,3334
636
636
  rasa/shared/providers/_ssl_verification_utils.py,sha256=4tujCOjg0KKX2_DzOb7lZTdsUXtzRB4UkfhkC3W0jO0,4166
637
637
  rasa/shared/providers/embedding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
638
- rasa/shared/providers/embedding/_base_litellm_embedding_client.py,sha256=c2q6wzPs9yZxgEeTzrJR7urOqhAtlDHj1e6De3kRVQQ,8992
638
+ rasa/shared/providers/embedding/_base_litellm_embedding_client.py,sha256=ggfcEc8Ht9m272awIl_1gWlG7Fe6xC-FhGGjujNRXlM,9148
639
639
  rasa/shared/providers/embedding/_langchain_embedding_client_adapter.py,sha256=IR2Rb3ReJ9C9sxOoOGRXgtz8STWdMREs_4AeSMKFjl4,2135
640
640
  rasa/shared/providers/embedding/azure_openai_embedding_client.py,sha256=R4d0AGXudYAeqOjDdUeqkcrziNrlD5E4RgLi1ggp0Rc,10242
641
641
  rasa/shared/providers/embedding/default_litellm_embedding_client.py,sha256=B-BSoIOWV_-tmRr_gcEEMpibA9PUTi3XF91PR0JKGM4,3231
@@ -644,7 +644,7 @@ rasa/shared/providers/embedding/embedding_response.py,sha256=H55mSAL3LfVvDlBklaC
644
644
  rasa/shared/providers/embedding/huggingface_local_embedding_client.py,sha256=Zo3gyj49h4LxXV7bx39TXpIPKlernG-5xzqXczTCbig,6913
645
645
  rasa/shared/providers/embedding/openai_embedding_client.py,sha256=XNRGE7apo2v3kWRrtgxE-Gq4rvNko3IiXtvgC4krDYE,5429
646
646
  rasa/shared/providers/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
647
- rasa/shared/providers/llm/_base_litellm_client.py,sha256=9ohMPg5DBBaC13DHpNdvgSDMob2hpXbdQs3MkI1ij0Y,9175
647
+ rasa/shared/providers/llm/_base_litellm_client.py,sha256=hZ12FaGnb13wacxBCQYi0gbLzYBwgobAyVsPjvCiIOI,9330
648
648
  rasa/shared/providers/llm/azure_openai_llm_client.py,sha256=jwEntKsBHKOXUhNEQM-kTYIfRCJ6qEka58ZPnKsSsb8,11836
649
649
  rasa/shared/providers/llm/default_litellm_llm_client.py,sha256=yvqd4ARoGSi9iqfE2uFvVEYRU6rICePBnEEKTduCc9w,2777
650
650
  rasa/shared/providers/llm/llm_client.py,sha256=6-gMsEJqquhUPGXzNiq_ybM_McLWxAJ_QhbmWcLnb_Q,2358
@@ -720,9 +720,9 @@ rasa/utils/train_utils.py,sha256=f1NWpp5y6al0dzoQyyio4hc4Nf73DRoRSHDzEK6-C4E,212
720
720
  rasa/utils/url_tools.py,sha256=JQcHL2aLqLHu82k7_d9imUoETCm2bmlHaDpOJ-dKqBc,1218
721
721
  rasa/utils/yaml.py,sha256=KjbZq5C94ZP7Jdsw8bYYF7HASI6K4-C_kdHfrnPLpSI,2000
722
722
  rasa/validator.py,sha256=ToRaa4dS859CJO3H2VGqS943O5qWOg45ypbDfFMKECU,62699
723
- rasa/version.py,sha256=aji2ixgfN5o0Qbky9Ay-XdGG4bS_vwvrv5hZY9MWQR0,118
724
- rasa_pro-3.10.13.dist-info/METADATA,sha256=jRz-VIUgsUpiuvknI7kTqZZoRTQfJNlaMwIquWXNyzw,10919
725
- rasa_pro-3.10.13.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
726
- rasa_pro-3.10.13.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
727
- rasa_pro-3.10.13.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
728
- rasa_pro-3.10.13.dist-info/RECORD,,
723
+ rasa/version.py,sha256=z2i3uuT45OdhuDRVnuLCtmG8pfzzwC-13qbKorgsDmQ,118
724
+ rasa_pro-3.10.14.dist-info/METADATA,sha256=ZDJzu4fsisgXmG0MJRp2XJGY2zHYrQUAddh2-G4Tezs,10919
725
+ rasa_pro-3.10.14.dist-info/NOTICE,sha256=7HlBoMHJY9CL2GlYSfTQ-PZsVmLmVkYmMiPlTjhuCqA,218
726
+ rasa_pro-3.10.14.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
727
+ rasa_pro-3.10.14.dist-info/entry_points.txt,sha256=ckJ2SfEyTPgBqj_I6vm_tqY9dZF_LAPJZA335Xp0Q9U,43
728
+ rasa_pro-3.10.14.dist-info/RECORD,,