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

Files changed (183) hide show
  1. README.md +0 -374
  2. rasa/__init__.py +1 -2
  3. rasa/__main__.py +5 -0
  4. rasa/anonymization/anonymization_rule_executor.py +2 -2
  5. rasa/api.py +27 -23
  6. rasa/cli/arguments/data.py +27 -2
  7. rasa/cli/arguments/default_arguments.py +25 -3
  8. rasa/cli/arguments/run.py +9 -9
  9. rasa/cli/arguments/train.py +11 -3
  10. rasa/cli/data.py +70 -8
  11. rasa/cli/e2e_test.py +104 -431
  12. rasa/cli/evaluate.py +1 -1
  13. rasa/cli/interactive.py +1 -0
  14. rasa/cli/llm_fine_tuning.py +398 -0
  15. rasa/cli/project_templates/calm/endpoints.yml +1 -1
  16. rasa/cli/project_templates/tutorial/endpoints.yml +1 -1
  17. rasa/cli/run.py +15 -14
  18. rasa/cli/scaffold.py +10 -8
  19. rasa/cli/studio/studio.py +35 -5
  20. rasa/cli/train.py +56 -8
  21. rasa/cli/utils.py +22 -5
  22. rasa/cli/x.py +1 -1
  23. rasa/constants.py +7 -1
  24. rasa/core/actions/action.py +98 -49
  25. rasa/core/actions/action_run_slot_rejections.py +4 -1
  26. rasa/core/actions/custom_action_executor.py +9 -6
  27. rasa/core/actions/direct_custom_actions_executor.py +80 -0
  28. rasa/core/actions/e2e_stub_custom_action_executor.py +68 -0
  29. rasa/core/actions/grpc_custom_action_executor.py +2 -2
  30. rasa/core/actions/http_custom_action_executor.py +6 -5
  31. rasa/core/agent.py +21 -17
  32. rasa/core/channels/__init__.py +2 -0
  33. rasa/core/channels/audiocodes.py +1 -16
  34. rasa/core/channels/voice_aware/__init__.py +0 -0
  35. rasa/core/channels/voice_aware/jambonz.py +103 -0
  36. rasa/core/channels/voice_aware/jambonz_protocol.py +344 -0
  37. rasa/core/channels/voice_aware/utils.py +20 -0
  38. rasa/core/channels/voice_native/__init__.py +0 -0
  39. rasa/core/constants.py +6 -1
  40. rasa/core/information_retrieval/faiss.py +7 -4
  41. rasa/core/information_retrieval/information_retrieval.py +8 -0
  42. rasa/core/information_retrieval/milvus.py +9 -2
  43. rasa/core/information_retrieval/qdrant.py +1 -1
  44. rasa/core/nlg/contextual_response_rephraser.py +32 -10
  45. rasa/core/nlg/summarize.py +4 -3
  46. rasa/core/policies/enterprise_search_policy.py +113 -45
  47. rasa/core/policies/flows/flow_executor.py +122 -76
  48. rasa/core/policies/intentless_policy.py +83 -29
  49. rasa/core/processor.py +72 -54
  50. rasa/core/run.py +5 -4
  51. rasa/core/tracker_store.py +8 -4
  52. rasa/core/training/interactive.py +1 -1
  53. rasa/core/utils.py +56 -57
  54. rasa/dialogue_understanding/coexistence/llm_based_router.py +53 -13
  55. rasa/dialogue_understanding/commands/__init__.py +6 -0
  56. rasa/dialogue_understanding/commands/restart_command.py +58 -0
  57. rasa/dialogue_understanding/commands/session_start_command.py +59 -0
  58. rasa/dialogue_understanding/commands/utils.py +40 -0
  59. rasa/dialogue_understanding/generator/constants.py +10 -3
  60. rasa/dialogue_understanding/generator/flow_retrieval.py +21 -5
  61. rasa/dialogue_understanding/generator/llm_based_command_generator.py +13 -3
  62. rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +134 -90
  63. rasa/dialogue_understanding/generator/nlu_command_adapter.py +47 -7
  64. rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +127 -41
  65. rasa/dialogue_understanding/patterns/restart.py +37 -0
  66. rasa/dialogue_understanding/patterns/session_start.py +37 -0
  67. rasa/dialogue_understanding/processor/command_processor.py +16 -3
  68. rasa/dialogue_understanding/processor/command_processor_component.py +6 -2
  69. rasa/e2e_test/aggregate_test_stats_calculator.py +134 -0
  70. rasa/e2e_test/assertions.py +1223 -0
  71. rasa/e2e_test/assertions_schema.yml +106 -0
  72. rasa/e2e_test/constants.py +20 -0
  73. rasa/e2e_test/e2e_config.py +220 -0
  74. rasa/e2e_test/e2e_config_schema.yml +26 -0
  75. rasa/e2e_test/e2e_test_case.py +131 -8
  76. rasa/e2e_test/e2e_test_converter.py +363 -0
  77. rasa/e2e_test/e2e_test_converter_prompt.jinja2 +70 -0
  78. rasa/e2e_test/e2e_test_coverage_report.py +364 -0
  79. rasa/e2e_test/e2e_test_result.py +26 -6
  80. rasa/e2e_test/e2e_test_runner.py +493 -71
  81. rasa/e2e_test/e2e_test_schema.yml +96 -0
  82. rasa/e2e_test/pykwalify_extensions.py +39 -0
  83. rasa/e2e_test/stub_custom_action.py +70 -0
  84. rasa/e2e_test/utils/__init__.py +0 -0
  85. rasa/e2e_test/utils/e2e_yaml_utils.py +55 -0
  86. rasa/e2e_test/utils/io.py +598 -0
  87. rasa/e2e_test/utils/validation.py +80 -0
  88. rasa/engine/graph.py +9 -3
  89. rasa/engine/recipes/default_components.py +0 -2
  90. rasa/engine/recipes/default_recipe.py +10 -2
  91. rasa/engine/storage/local_model_storage.py +40 -12
  92. rasa/engine/validation.py +78 -1
  93. rasa/env.py +9 -0
  94. rasa/graph_components/providers/story_graph_provider.py +59 -6
  95. rasa/llm_fine_tuning/__init__.py +0 -0
  96. rasa/llm_fine_tuning/annotation_module.py +241 -0
  97. rasa/llm_fine_tuning/conversations.py +144 -0
  98. rasa/llm_fine_tuning/llm_data_preparation_module.py +178 -0
  99. rasa/llm_fine_tuning/notebooks/unsloth_finetuning.ipynb +407 -0
  100. rasa/llm_fine_tuning/paraphrasing/__init__.py +0 -0
  101. rasa/llm_fine_tuning/paraphrasing/conversation_rephraser.py +281 -0
  102. rasa/llm_fine_tuning/paraphrasing/default_rephrase_prompt_template.jina2 +44 -0
  103. rasa/llm_fine_tuning/paraphrasing/rephrase_validator.py +121 -0
  104. rasa/llm_fine_tuning/paraphrasing/rephrased_user_message.py +10 -0
  105. rasa/llm_fine_tuning/paraphrasing_module.py +128 -0
  106. rasa/llm_fine_tuning/storage.py +174 -0
  107. rasa/llm_fine_tuning/train_test_split_module.py +441 -0
  108. rasa/model_training.py +56 -16
  109. rasa/nlu/persistor.py +157 -36
  110. rasa/server.py +45 -10
  111. rasa/shared/constants.py +76 -16
  112. rasa/shared/core/domain.py +27 -19
  113. rasa/shared/core/events.py +28 -2
  114. rasa/shared/core/flows/flow.py +208 -13
  115. rasa/shared/core/flows/flow_path.py +84 -0
  116. rasa/shared/core/flows/flows_list.py +33 -11
  117. rasa/shared/core/flows/flows_yaml_schema.json +269 -193
  118. rasa/shared/core/flows/validation.py +112 -25
  119. rasa/shared/core/flows/yaml_flows_io.py +149 -10
  120. rasa/shared/core/trackers.py +6 -0
  121. rasa/shared/core/training_data/structures.py +20 -0
  122. rasa/shared/core/training_data/visualization.html +2 -2
  123. rasa/shared/exceptions.py +4 -0
  124. rasa/shared/importers/importer.py +64 -16
  125. rasa/shared/nlu/constants.py +2 -0
  126. rasa/shared/providers/_configs/__init__.py +0 -0
  127. rasa/shared/providers/_configs/azure_openai_client_config.py +183 -0
  128. rasa/shared/providers/_configs/client_config.py +57 -0
  129. rasa/shared/providers/_configs/default_litellm_client_config.py +130 -0
  130. rasa/shared/providers/_configs/huggingface_local_embedding_client_config.py +234 -0
  131. rasa/shared/providers/_configs/openai_client_config.py +175 -0
  132. rasa/shared/providers/_configs/self_hosted_llm_client_config.py +176 -0
  133. rasa/shared/providers/_configs/utils.py +101 -0
  134. rasa/shared/providers/_ssl_verification_utils.py +124 -0
  135. rasa/shared/providers/embedding/__init__.py +0 -0
  136. rasa/shared/providers/embedding/_base_litellm_embedding_client.py +259 -0
  137. rasa/shared/providers/embedding/_langchain_embedding_client_adapter.py +74 -0
  138. rasa/shared/providers/embedding/azure_openai_embedding_client.py +277 -0
  139. rasa/shared/providers/embedding/default_litellm_embedding_client.py +102 -0
  140. rasa/shared/providers/embedding/embedding_client.py +90 -0
  141. rasa/shared/providers/embedding/embedding_response.py +41 -0
  142. rasa/shared/providers/embedding/huggingface_local_embedding_client.py +191 -0
  143. rasa/shared/providers/embedding/openai_embedding_client.py +172 -0
  144. rasa/shared/providers/llm/__init__.py +0 -0
  145. rasa/shared/providers/llm/_base_litellm_client.py +251 -0
  146. rasa/shared/providers/llm/azure_openai_llm_client.py +338 -0
  147. rasa/shared/providers/llm/default_litellm_llm_client.py +84 -0
  148. rasa/shared/providers/llm/llm_client.py +76 -0
  149. rasa/shared/providers/llm/llm_response.py +50 -0
  150. rasa/shared/providers/llm/openai_llm_client.py +155 -0
  151. rasa/shared/providers/llm/self_hosted_llm_client.py +293 -0
  152. rasa/shared/providers/mappings.py +75 -0
  153. rasa/shared/utils/cli.py +30 -0
  154. rasa/shared/utils/io.py +65 -2
  155. rasa/shared/utils/llm.py +246 -200
  156. rasa/shared/utils/yaml.py +121 -15
  157. rasa/studio/auth.py +6 -4
  158. rasa/studio/config.py +13 -4
  159. rasa/studio/constants.py +1 -0
  160. rasa/studio/data_handler.py +10 -3
  161. rasa/studio/download.py +19 -13
  162. rasa/studio/train.py +2 -3
  163. rasa/studio/upload.py +19 -11
  164. rasa/telemetry.py +113 -58
  165. rasa/tracing/instrumentation/attribute_extractors.py +32 -17
  166. rasa/utils/common.py +18 -19
  167. rasa/utils/endpoints.py +7 -4
  168. rasa/utils/json_utils.py +60 -0
  169. rasa/utils/licensing.py +9 -1
  170. rasa/utils/ml_utils.py +4 -2
  171. rasa/validator.py +213 -3
  172. rasa/version.py +1 -1
  173. rasa_pro-3.10.16.dist-info/METADATA +196 -0
  174. {rasa_pro-3.9.18.dist-info → rasa_pro-3.10.16.dist-info}/RECORD +179 -113
  175. rasa/nlu/classifiers/llm_intent_classifier.py +0 -519
  176. rasa/shared/providers/openai/clients.py +0 -43
  177. rasa/shared/providers/openai/session_handler.py +0 -110
  178. rasa_pro-3.9.18.dist-info/METADATA +0 -563
  179. /rasa/{shared/providers/openai → cli/project_templates/tutorial/actions}/__init__.py +0 -0
  180. /rasa/cli/project_templates/tutorial/{actions.py → actions/actions.py} +0 -0
  181. {rasa_pro-3.9.18.dist-info → rasa_pro-3.10.16.dist-info}/NOTICE +0 -0
  182. {rasa_pro-3.9.18.dist-info → rasa_pro-3.10.16.dist-info}/WHEEL +0 -0
  183. {rasa_pro-3.9.18.dist-info → rasa_pro-3.10.16.dist-info}/entry_points.txt +0 -0
@@ -1,563 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: rasa-pro
3
- Version: 3.9.18
4
- Summary: State-of-the-art open-core Conversational AI framework for Enterprises that natively leverages generative AI for effortless assistant development.
5
- Home-page: https://rasa.com
6
- Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework
7
- Author: Rasa Technologies GmbH
8
- Author-email: hi@rasa.com
9
- Maintainer: Tom Bocklisch
10
- Maintainer-email: tom@rasa.com
11
- Requires-Python: >=3.9,<3.11
12
- Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Intended Audience :: Developers
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Topic :: Software Development :: Libraries
18
- Provides-Extra: full
19
- Provides-Extra: gh-release-notes
20
- Provides-Extra: jieba
21
- Provides-Extra: metal
22
- Provides-Extra: spacy
23
- Provides-Extra: transformers
24
- Requires-Dist: CacheControl (>=0.12.14,<0.13.0)
25
- Requires-Dist: PyJWT[crypto] (>=2.8.0,<3.0.0)
26
- Requires-Dist: SQLAlchemy (>=2.0.22,<2.1.0)
27
- Requires-Dist: absl-py (>=2.0,<2.1)
28
- Requires-Dist: aio-pika (>=8.2.3,<8.2.4)
29
- Requires-Dist: aiogram (>=2.15,<2.26)
30
- Requires-Dist: aiohttp (>=3.9.4,<3.10)
31
- Requires-Dist: apscheduler (>=3.10,<3.11)
32
- Requires-Dist: attrs (>=23.1,<23.2)
33
- Requires-Dist: azure-storage-blob (>=12.16.0,<12.17.0)
34
- Requires-Dist: boto3 (>=1.27.1,<2.0.0)
35
- Requires-Dist: certifi (>=2024.2.2)
36
- Requires-Dist: colorama (>=0.4.6,<0.5.0) ; sys_platform == "win32"
37
- Requires-Dist: colorclass (>=2.2,<2.3)
38
- Requires-Dist: coloredlogs (>=15,<16)
39
- Requires-Dist: colorhash (>=2.0,<2.1.0)
40
- Requires-Dist: confluent-kafka (>=2.3.0,<3.0.0)
41
- Requires-Dist: cryptography (>=42.0.5)
42
- Requires-Dist: cvg-python-sdk (>=0.5.1,<0.6.0)
43
- Requires-Dist: dask (==2022.10.2) ; python_version >= "3.9" and python_version < "3.11"
44
- Requires-Dist: dnspython (==2.6.1)
45
- Requires-Dist: faiss-cpu (>=1.7.4,<2.0.0)
46
- Requires-Dist: faker (>=19.13.0,<20.0.0)
47
- Requires-Dist: fbmessenger (>=6.0.0,<6.1.0)
48
- Requires-Dist: github3.py (>=3.2.0,<3.3.0) ; extra == "gh-release-notes"
49
- Requires-Dist: google-auth (>=2.23.4,<3)
50
- Requires-Dist: google-cloud-storage (>=2.14.0,<3.0.0)
51
- Requires-Dist: hvac (>=1.2.1,<2.0.0)
52
- Requires-Dist: importlib-metadata (>=6.8.0,<7.0.0)
53
- Requires-Dist: importlib-resources (>=6.1.1,<7.0.0)
54
- Requires-Dist: jieba (>=0.42.1,<0.43) ; extra == "jieba" or extra == "full"
55
- Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
56
- Requires-Dist: jsonpatch (>=1.33,<2.0)
57
- Requires-Dist: jsonpickle (>=3.3.0,<3.4)
58
- Requires-Dist: jsonschema (>=4.20,<4.21)
59
- Requires-Dist: keras (==2.14.0)
60
- Requires-Dist: langchain (>=0.0.329,<0.0.330)
61
- Requires-Dist: matplotlib (>=3.7,<3.8)
62
- Requires-Dist: mattermostwrapper (>=2.2,<2.3)
63
- Requires-Dist: networkx (>=3.1,<3.2)
64
- Requires-Dist: numpy (>=1.23.5,<1.25.0) ; python_version >= "3.9" and python_version < "3.11"
65
- Requires-Dist: openai (>=0.28.1,<0.29.0)
66
- Requires-Dist: opentelemetry-api (>=1.16.0,<1.17.0)
67
- Requires-Dist: opentelemetry-exporter-jaeger (>=1.16.0,<1.17.0)
68
- Requires-Dist: opentelemetry-exporter-otlp (>=1.16.0,<1.17.0)
69
- Requires-Dist: opentelemetry-sdk (>=1.16.0,<1.17.0)
70
- Requires-Dist: packaging (>=21.3,<21.4)
71
- Requires-Dist: pep440-version-utils (>=1.1.0,<1.2.0)
72
- Requires-Dist: pluggy (>=1.2.0,<2.0.0)
73
- Requires-Dist: portalocker (>=2.7.0,<3.0.0)
74
- Requires-Dist: presidio-analyzer (>=2.2.33,<2.2.34)
75
- Requires-Dist: presidio-anonymizer (>=2.2.33,<2.2.34)
76
- Requires-Dist: prompt-toolkit (>=3.0.28,<3.0.29)
77
- Requires-Dist: protobuf (>=4.23.3,<4.25.4)
78
- Requires-Dist: psutil (>=5.9.5,<6.0.0)
79
- Requires-Dist: psycopg2-binary (>=2.9.9,<2.10.0)
80
- Requires-Dist: pycountry (>=22.3.5,<23.0.0)
81
- Requires-Dist: pydantic (>=2.0,<3.0)
82
- Requires-Dist: pydot (>=1.4,<1.5)
83
- Requires-Dist: pykwalify (>=1.8,<1.9)
84
- Requires-Dist: pymilvus (>=2.3.6,<3.0.0)
85
- Requires-Dist: pymongo[srv,tls] (>=4.6.3,<4.7)
86
- Requires-Dist: pypred (>=0.4.0,<0.5.0)
87
- Requires-Dist: python-dateutil (>=2.8.2,<2.9.0)
88
- Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
89
- Requires-Dist: python-engineio (>=4.5.1,<6,!=5.0.0)
90
- Requires-Dist: python-keycloak (>=3.7.0,<4.0.0)
91
- Requires-Dist: python-socketio (>=5.8,<6)
92
- Requires-Dist: pytz (>=2022.7.1,<2023.0)
93
- Requires-Dist: pyyaml (>=6.0)
94
- Requires-Dist: qdrant-client (>=1.9.0,<2.0.0)
95
- Requires-Dist: questionary (>=1.10.0,<2.1.0)
96
- Requires-Dist: randomname (>=0.2.1,<0.3.0)
97
- Requires-Dist: rasa-sdk (==3.9.1)
98
- Requires-Dist: redis (>=4.6.0,<6.0)
99
- Requires-Dist: regex (>=2022.10.31,<2022.11)
100
- Requires-Dist: requests (>=2.31.0,<2.32.0)
101
- Requires-Dist: rich (>=13.4.2,<14.0.0)
102
- Requires-Dist: rocketchat_API (>=1.30.0,<1.31.0)
103
- Requires-Dist: ruamel.yaml (>=0.17.21,<0.17.22)
104
- Requires-Dist: safetensors (>=0.4.5,<0.5.0)
105
- Requires-Dist: sanic (>=22.12,<22.13)
106
- Requires-Dist: sanic-cors (>=2.2.0,<2.3.0)
107
- Requires-Dist: sanic-jwt (>=1.8.0,<2.0.0)
108
- Requires-Dist: sanic-routing (>=22.8.0,<23.0.0)
109
- Requires-Dist: scikit-learn (>=1.1.3,<1.2) ; python_version >= "3.9" and python_version < "3.11"
110
- Requires-Dist: scipy (>=1.10.1,<1.11.0) ; python_version >= "3.9" and python_version < "3.11"
111
- Requires-Dist: sentencepiece[sentencepiece] (>=0.1.99,<0.2.0) ; extra == "transformers" or extra == "full"
112
- Requires-Dist: sentry-sdk (>=1.14.0,<1.15.0)
113
- Requires-Dist: setuptools (>=70.0.0,<70.1.0)
114
- Requires-Dist: sklearn-crfsuite (>=0.3.6,<0.4.0)
115
- Requires-Dist: skops (>=0.10.0,<0.11.0)
116
- Requires-Dist: slack-sdk (>=3.27.1,<4.0.0)
117
- Requires-Dist: spacy (>=3.5.4,<4.0.0) ; extra == "spacy" or extra == "full"
118
- Requires-Dist: structlog (>=23.1.0,<23.2.0)
119
- Requires-Dist: structlog-sentry (>=2.0.3,<3.0.0)
120
- Requires-Dist: tarsafe (>=0.0.5,<0.0.6)
121
- Requires-Dist: tenacity (>=8.4.1,<8.5.0)
122
- Requires-Dist: tensorflow (==2.14.1) ; sys_platform != "darwin" or platform_machine != "arm64"
123
- Requires-Dist: tensorflow-cpu-aws (==2.14.1) ; sys_platform == "linux" and (platform_machine == "arm64" or platform_machine == "aarch64")
124
- Requires-Dist: tensorflow-intel (==2.14.1) ; sys_platform == "win32"
125
- Requires-Dist: tensorflow-io-gcs-filesystem (==0.31) ; sys_platform == "win32"
126
- Requires-Dist: tensorflow-io-gcs-filesystem (==0.34) ; sys_platform == "darwin" and platform_machine != "arm64"
127
- Requires-Dist: tensorflow-io-gcs-filesystem (==0.34) ; sys_platform == "linux"
128
- Requires-Dist: tensorflow-macos (==2.14.1) ; sys_platform == "darwin" and platform_machine == "arm64"
129
- Requires-Dist: tensorflow-metal (==1.1.0) ; (sys_platform == "darwin" and platform_machine == "arm64") and (extra == "metal")
130
- Requires-Dist: tensorflow-text (==2.14.0) ; sys_platform != "win32" and (platform_machine != "arm64" and platform_machine != "aarch64")
131
- Requires-Dist: tensorflow_hub (>=0.13.0,<0.14.0)
132
- Requires-Dist: terminaltables (>=3.1.10,<3.2.0)
133
- Requires-Dist: tiktoken (>=0.4.0,<0.5.0)
134
- Requires-Dist: tqdm (>=4.66.2,<5.0.0)
135
- Requires-Dist: transformers (>=4.36.2,<4.37.0) ; extra == "transformers" or extra == "full"
136
- Requires-Dist: twilio (>=8.4,<8.5)
137
- Requires-Dist: types-protobuf (==4.25.0.20240417)
138
- Requires-Dist: typing-extensions (>=4.7.1,<5.0.0)
139
- Requires-Dist: typing-utils (>=0.1.0,<0.2.0)
140
- Requires-Dist: ujson (>=5.8,<6.0)
141
- Requires-Dist: webexteamssdk (>=1.6.1,<1.7.0)
142
- Requires-Dist: websockets (>=10.4,<11.0)
143
- Requires-Dist: wheel (>=0.40.0)
144
- Project-URL: Documentation, https://rasa.com/docs
145
- Project-URL: Repository, https://github.com/rasahq/rasa
146
- Description-Content-Type: text/markdown
147
-
148
- <h1 align="center">Rasa Pro</h1>
149
-
150
- <div align="center">
151
-
152
- [![Build Status](https://github.com/RasaHQ/rasa-private/workflows/Continuous%20Integration/badge.svg)](https://github.com/RasaHQ/rasa-private/actions)
153
- [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=RasaHQ_rasa&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=RasaHQ_rasa)
154
- [![Documentation Status](https://img.shields.io/badge/docs-stable-brightgreen.svg)](https://rasa.com/docs/rasa-pro/)
155
-
156
- </div>
157
-
158
- <hr />
159
-
160
-
161
- Rasa Pro is a framework for building scalable, dynamic conversational AI assistants that integrate large language models (LLMs) to enable more contextually aware and agentic interactions. Whether you’re new to conversational AI or an experienced developer, Rasa Pro offers enhanced flexibility, control, and performance for mission-critical applications.
162
-
163
- Building on the foundation of Rasa Open Source, Rasa Pro adds advanced features like CALM (Conversational AI with Language Models) and Dialogue Understanding (DU), which enable developers to shift from traditional intent-driven systems to LLM-based agents. This allows for more robust, responsive interactions that adhere strictly to business logic, while reducing risks like prompt injection and minimizing hallucinations.
164
-
165
- **Key Features:**
166
-
167
- - **Flows for Business Logic:** Easily define business logic through Flows, a simplified way to describe how your AI assistant should handle conversations. Flows help streamline the development process, focusing on key tasks and reducing the complexity involved in managing conversations.
168
- - **Automatic Conversation Repair:** Ensure seamless interactions by automatically handling interruptions or unexpected inputs. Developers have full control to customize these repairs based on specific use cases.
169
- - **Customizable and Open:** Fully customizable code that allows developers to modify Rasa Pro to meet specific requirements, ensuring flexibility and adaptability to various conversational AI needs.
170
- - **Robustness and Control:** Maintain strict adherence to business logic, preventing unwanted behaviors like prompt injection and hallucinations, leading to more reliable responses and secure interactions.
171
- - **Built-in Security:** Safeguard sensitive data, control access, and ensure secure deployment, essential for production environments that demand high levels of security and compliance.
172
-
173
-
174
-
175
- A [free developer license](https://rasa.com/docs/rasa-pro/developer-edition/) is available so you can explore and get to know Rasa Pro. For small production deployments, the Extended Developer License allows you to take your assistant live in a limited capacity. A paid license is required for larger-scale production use, but all code is visible and can be customized as needed.
176
-
177
- To get started right now, you can
178
-
179
- `pip install rasa-pro`
180
-
181
- Check out our
182
-
183
- - [Rasa-pro Quickstart](https://rasa.com/docs/rasa-pro/installation/quickstart/),
184
- - [Conversational AI with Language Models (CALM) conceptual rundown](https://rasa.com/docs/rasa-pro/calm/),
185
- - [Rasa Pro / CALM tutorial](https://rasa.com/docs/rasa-pro/tutorial), and
186
- - [Rasa pro changelog](https://rasa.com/docs/rasa/rasa-pro-changelog/)
187
-
188
- <<<<<<< HEAD
189
- ### Managing environments
190
-
191
- The official [Poetry guide](https://python-poetry.org/docs/managing-environments/) suggests to use
192
- [pyenv](https://github.com/pyenv/pyenv) or any other similar tool to easily switch between Python versions.
193
- This is how it can be done:
194
-
195
- ```bash
196
- pyenv install 3.10.10
197
- pyenv local 3.10.10 # Activate Python 3.10.10 for the current project
198
- ```
199
- *Note*: If you have trouble installing a specific version of python on your system
200
- it might be worth trying other supported versions.
201
-
202
- By default, Poetry will try to use the currently activated Python version to create the virtual environment
203
- for the current project automatically. You can also create and activate a virtual environment manually — in this
204
- case, Poetry should pick it up and use it to install the dependencies. For example:
205
-
206
- ```bash
207
- python -m venv .venv
208
- source .venv/bin/activate
209
- ```
210
-
211
- You can make sure that the environment is picked up by executing
212
-
213
- ```bash
214
- poetry env info
215
- ```
216
-
217
- ### Building from source
218
-
219
- To install dependencies and `rasa` itself in editable mode execute
220
-
221
- ```bash
222
- make install
223
- ```
224
-
225
- *Note for macOS users*: under macOS Big Sur we've seen some compiler issues for
226
- dependencies. Using `export SYSTEM_VERSION_COMPAT=1` before the installation helped.
227
-
228
-
229
- #### Installing optional dependencies
230
-
231
- In order to install rasa's optional dependencies, you need to run:
232
-
233
- ```bash
234
- make install-full
235
- ```
236
-
237
- *Note for macOS users*: The command `make install-full` could result in a failure while installing `tokenizers`
238
- (issue described in depth [here](https://github.com/huggingface/tokenizers/issues/1050)).
239
-
240
- In order to resolve it, you must follow these steps to install a Rust compiler:
241
- ```bash
242
- brew install rustup
243
- rustup-init
244
- ```
245
-
246
- After initialising the Rust compiler, you should restart the console and check its installation:
247
- ```bash
248
- rustc --version
249
- ```
250
-
251
- In case the PATH variable had not been automatically setup, run:
252
- ```bash
253
- export PATH="$HOME/.cargo/bin:$PATH"
254
- ```
255
-
256
- #### Installing from published Python package
257
-
258
- We have a private package registry running at **europe-west3-docker.pkg.dev/rasa-releases/** which hosts python packages as well
259
- as docker containers. To use it, you need to be authenticated.
260
- Follow the steps in the [google documentation](https://cloud.google.com/artifact-registry/docs/python/authentication#keyring)
261
- to make sure `pip` has the necessary credentials to authenticate with the registry.
262
- Afterwards, you should be able to run `pip install rasa`.
263
-
264
- To be able to pull the docker image via `docker pull europe-west3-docker.pkg.dev/rasa-releases/rasa/rasa`,
265
- you’ll need to authenticate using the `gcloud auth` command: `gcloud auth configure-docker europe-west3-docker.pkg.dev`.
266
-
267
- More information is available in our [public documentation](https://rasa.com/docs/rasa-pro/installation/python/installation).
268
-
269
- ### Running the Tests
270
-
271
- In order to run the tests, make sure that you have set locally the environment variable `RASA_PRO_LICENSE` to a valid license available in 1Password.
272
- You should ensure to install the development requirements:
273
-
274
- ```bash
275
- make prepare-tests-ubuntu # Only on Ubuntu and Debian based systems
276
- make prepare-tests-macos # Only on macOS
277
- ```
278
-
279
- Then, run the tests:
280
-
281
- ```bash
282
- make test
283
- ```
284
-
285
- They can also be run at multiple jobs to save some time:
286
-
287
- ```bash
288
- JOBS=[n] make test
289
- ```
290
-
291
- Where `[n]` is the number of jobs desired. If omitted, `[n]` will be automatically chosen by pytest.
292
-
293
-
294
- ### Running the Integration Tests
295
-
296
- In order to run the integration tests, make sure that you have the development requirements installed:
297
-
298
- ```bash
299
- make prepare-tests-ubuntu # Only on Ubuntu and Debian based systems
300
- make prepare-tests-macos # Only on macOS
301
- ```
302
-
303
- Then, you'll need to start services with the following command which uses
304
- [Docker Compose](https://docs.docker.com/compose/install/):
305
-
306
- ```bash
307
- make run-integration-containers
308
- ```
309
-
310
- Finally, you can run the integration tests like this:
311
-
312
- ```bash
313
- make test-integration
314
- ```
315
-
316
- In order to run locally the integration tests for the tracing capability, you must first build the rasa image locally.
317
- You can do so using the `docker buildx bake` command.
318
- Note that the rasa image build requires a few base images, which must be built prior to building the rasa image.
319
- The Dockerfiles for these base images are located in the `docker` subdirectory.
320
-
321
- You must also set the following environment variables to build the rasa image locally:
322
- - `TARGET_IMAGE_REGISTRY`, e.g. you can either use `rasa` or the private registry `europe-west3-docker.pkg.dev/rasa-releases/rasa-docker`.
323
- - `IMAGE_TAG`, e.g. `localdev`, `latest` or PR ID.
324
- - `BASE_IMAGE_HASH`, e.g. `localdev`
325
- - `BASE_MITIE_IMAGE_HASH`, e.g. `localdev`
326
- - `BASE_BUILDER_IMAGE_HASH`, e.g. `localdev`
327
-
328
-
329
- ### Resolving merge conflicts
330
-
331
- Poetry doesn't include any solution that can help to resolve merge conflicts in
332
- the lock file `poetry.lock` by default.
333
- However, there is a great tool called [poetry-merge-lock](https://poetry-merge-lock.readthedocs.io/en/latest/).
334
- Here is how you can install it:
335
-
336
- ```bash
337
- pip install poetry-merge-lock
338
- ```
339
-
340
- Just execute this command to resolve merge conflicts in `poetry.lock` automatically:
341
-
342
- ```bash
343
- poetry-merge-lock
344
- ```
345
-
346
- ### Build a Docker image locally
347
-
348
- In order to build a Docker image on your local machine execute the following command:
349
-
350
- ```bash
351
- make build-docker
352
- ```
353
-
354
- The Docker image is available on your local machine as `rasa-private-dev`.
355
-
356
- ### Code Style
357
-
358
- To ensure a standardized code style we use the [ruff](https://docs.astral.sh/ruff/formatter/) formatter.
359
- To ensure our type annotations are correct we use the type checker [mypy](https://mypy.readthedocs.io/en/stable/).
360
- If your code is not formatted properly or doesn't type check, GitHub will fail to build.
361
-
362
- #### Formatting
363
-
364
- If you want to automatically format your code on every commit, you can use [pre-commit](https://pre-commit.com/).
365
- Just install it via `pip install pre-commit` and execute `pre-commit install` in the root folder.
366
- This will add a hook to the repository, which reformats files on every commit.
367
-
368
- If you want to set it up manually, install `ruff` via `poetry install`.
369
- To reformat files execute
370
- ```
371
- make formatter
372
- ```
373
-
374
- #### Type Checking
375
-
376
- If you want to check types on the codebase, install `mypy` using `poetry install`.
377
- To check the types execute
378
- ```
379
- make types
380
- ```
381
-
382
- ### Backporting
383
-
384
- In order to port changes to `main` and across release branches, we use the `backport` workflow located at
385
- the `.github/workflows/backport.yml` path.
386
- This workflow is triggered by the `backport-to-<release-branch>` label applied to a PR, for example `backport-to-3.8.x`.
387
- Current available target branches are `main` and maintained release branches.
388
-
389
- When a PR gets labelled `backport-to-<release-branch>`, a PR is opened by the `backport-github-action` as soon as the
390
- source PR gets closed (by merging). If you want to close the PR without merging changes, make sure to remove the `backport-to-<release-branch>` label.
391
-
392
- The PR author which the action assigns to the backporting PR has to resolve any conflicts before approving and merging.
393
- Release PRs should also be labelled with `backport-to-main` to backport the `CHANGELOG.md` updates to `main`.
394
- Backporting version updates should be accepted to the `main` branch from the latest release branch only.
395
-
396
- Here are some guidelines to follow when backporting changes and resolving conflicts:
397
-
398
- a) for conflicts in `version.py`: accept only the version from the latest release branch. Do not merge version changes
399
- from earlier release branches into `main` because this could cause issues when trying to make the next minor release.
400
-
401
- b) for conflicts in `pyproject.toml`: if related to the `rasa-pro` version, accept only the latest release branch;
402
- if related to other dependencies, accept `main` or whichever is the higher upgrade (main usually has the updated
403
- dependencies because we only do housekeeping on `main`, apart from vulnerability updates). Be mindful of dependencies that
404
- are removed from `main` but still exist in former release branches (for example `langchain`).
405
-
406
- c) for conflicts in `poetry.lock`: accept changes which were already present on the target branch, then run
407
- `poetry lock --no-update` so that the lock file contains your changes from `pyproject.toml` too.
408
-
409
- d) for conflicts in `CHANGELOG.md`: Manually place the changelog in their allocated section (e.g. 3.8.10 will go under the
410
- 3.8 section with the other releases, rather than go at the top of the file)
411
-
412
- If the backporting workflow fails, you are encouraged to cherry-pick the commits manually and create a PR to
413
- the target branch. Alternatively, you can install the backporting CLI tool as described [here](https://github.com/sorenlouv/backport?tab=readme-ov-file#install).
414
-
415
- ## Releases
416
- Rasa has implemented robust policies governing version naming, as well as release pace for major, minor, and patch releases.
417
-
418
- The values for a given version number (MAJOR.MINOR.PATCH) are incremented as follows:
419
- - MAJOR version for incompatible API changes or other breaking changes.
420
- - MINOR version for functionality added in a backward compatible manner.
421
- - PATCH version for backward compatible bug fixes.
422
-
423
- The following table describes the version types and their expected *release cadence*:
424
-
425
- | Version Type | Description | Target Cadence |
426
- |--------------|-----------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
427
- | Major | For significant changes, or when any backward-incompatible changes are introduced to the API or data model. | Every 1 - 2 yrs |
428
- | Minor | For when new backward-compatible functionality is introduced, a minor feature is introduced, or when a set of smaller features is rolled out. | +/- Quarterly |
429
- | Patch | For backward-compatible bug fixes that fix incorrect behavior. | As needed |
430
-
431
- While this table represents our target release frequency, we reserve the right to modify it based on changing market conditions and technical requirements.
432
-
433
- ### Maintenance Policy
434
- Our End of Life policy defines how long a given release is considered supported, as well as how long a release is
435
- considered to be still in active development or maintenance.
436
-
437
- The maintenance duration and end of life for every release are shown on our website as part of the [Product Release and Maintenance Policy](https://rasa.com/rasa-product-release-and-maintenance-policy/).
438
-
439
- ### Cutting a Major / Minor release
440
- #### A week before release day
441
-
442
- **Post a message on the engineering Slack channel**, letting the team know you'll be the one cutting the upcoming
443
- release, as well as:
444
- 1. Reminding everyone to go over their issues and PRs and prioritise reviews and merges
445
- 2. Reminding everyone of the scheduled date for the release
446
-
447
- #### A day before release day
448
-
449
- 1. **Evaluate the status of any PR merging that's happening. Follow up with people on their
450
- bugs and fixes.** If the release introduces new bugs or regressions that can't be fixed in time, we should discuss on
451
- Slack about this and take a decision on how to move forward. If the issue is not ready to be merged in time, we remove the issue / PR from the release and notify the PR owner and the product manager on Slack about it. The PR / issue owners are responsible for
452
- communicating any issues which might be release relevant. Postponing the release should be considered as an edge case scenario.
453
-
454
- #### Release day! 🚀
455
-
456
- 1. **At the start of the day, post a small message on slack announcing release day!** Communicate you'll be handling
457
- the release, and the time you're aiming to start releasing (again, no later than 4pm, as issues may arise and
458
- cause delays). This message should be posted early in the morning and before moving forward with any of the steps of the release,
459
- in order to give enough time to people to check their PRs and issues. That way they can plan any remaining work. A template of the slack message can be found [here](https://rasa-hq.slack.com/archives/C36SS4N8M/p1613032208137500?thread_ts=1612876410.068400&cid=C36SS4N8M).
460
- The release time should be communicated transparently so that others can plan potentially necessary steps accordingly. If there are bigger changes this should be communicated.
461
- 2. Once everything in the release is taken care of, post a small message on Slack communicating you are about to
462
- start the release process (in case anything is missing).
463
- 3. **You may now do the release by following the instructions outlined in the
464
- [Rasa Pro README](#steps-to-release-a-new-version) !**
465
-
466
- ### Steps to release a new version
467
- Releasing a new version is quite simple, as the packages are build and distributed by GitHub Actions.
468
-
469
- *Release steps*:
470
- 1. Make sure all dependencies are up to date (**especially Rasa SDK**)
471
- - For Rasa SDK, except in the case of a patch release, that means first creating a [new Rasa SDK release](https://github.com/RasaHQ/rasa-sdk#steps-to-release-a-new-version) (make sure the version numbers between the new Rasa and Rasa SDK releases match)
472
- - Once the tag with the new Rasa SDK release is pushed and the package appears on [pypi](https://pypi.org/project/rasa-sdk/), the dependency in the rasa repository can be resolved (see below).
473
- 2. If this is a minor / major release: Make sure all fixes from currently supported minor versions have been merged from their respective release branches (e.g. 3.8.x) back into main.
474
- 3. In case of a minor release, create a new branch that corresponds to the new release, e.g.
475
- ```bash
476
- git checkout -b 3.8.x
477
- git push origin 3.8.x
478
- ```
479
- 4. Switch to the branch you want to cut the release from (`main` in case of a major, the `<major>.<minor>.x` branch for minors and patches)
480
- - Update the `rasa-sdk` entry in `pyproject.toml` with the new release version and run `poetry update`. This creates a new `poetry.lock` file with all dependencies resolved.
481
- - Commit the changes with `git commit -am "bump rasa-sdk dependency"` but do not push them. They will be automatically picked up by the following step.
482
- 5. Run `make release`
483
- 6. Create a PR against the release branch (e.g. `3.8.x`)
484
- 7. Once your PR is merged, [this](https://github.com/RasaHQ/rasa-private/actions/workflows/tag-release.yml) workflow runs and an automatic tag is created and pushed to remote.
485
- (If this fails for some reason, then run the following manually on the release branch) :
486
- ```bash
487
- git checkout 3.8.x
488
- git pull origin 3.8.x
489
- git tag 3.8.0 -m "next release"
490
- git push origin 3.8.0 --tags
491
- ```
492
- GitHub will build this tag and publish the build artifacts.
493
- 8. After all the steps are completed and if everything goes well then we should see a message automatically posted in the company's Slack (`release` channel) like this [one](https://rasa-hq.slack.com/archives/C7B08Q5FX/p1614354499046600)
494
- 9. If however an error occurs in the build, then we should see a failure message automatically posted in the company's Slack (`dev-tribe` channel) like this [one](https://rasa-hq.slack.com/archives/C01M5TAHDHA/p1701444735622919)
495
- (In this case do the following checks):
496
- - Check the workflows in [Github Actions](https://github.com/RasaHQ/rasa-private/actions) and make sure that the merged PR of the current release is completed successfully. To easily find your PR you can use the filters `event: push` and `branch: <version number>` (example on release 2.4 you can see [here](https://github.com/RasaHQ/rasa/actions/runs/643344876))
497
- - If the workflow is not completed, then try to re-run the workflow in case that solves the problem
498
- - If the problem persists, check also the log files and try to find the root cause of the issue
499
- - If you still cannot resolve the error, contact the infrastructure team by providing any helpful information from your investigation
500
- 10. If the release is successful, add the newly created release branch to the backporting configuration in the `.backportrc.json` file to
501
- the `targetBranchesChoices` list. This is necessary for the backporting workflow to work correctly with new release branches.
502
-
503
-
504
- ### Cutting a Patch release
505
-
506
- Patch releases are simpler to cut, since they are meant to contain only bugfixes.
507
-
508
- **The only things you need to do to cut a patch release are:**
509
-
510
- 1. Notify the engineering team on Slack that you are planning to cut a patch, in case someone has an important fix
511
- to add.
512
- 2. Make sure the bugfix(es) are in the release branch you will use (p.e if you are cutting a `3.8.2` patch, you will
513
- need your fixes to be on the `3.8.x` release branch). All patch releases must come from a `.x` branch!
514
- 3. Once you're ready to release the Rasa Pro patch, checkout the branch, run `make release` and follow the
515
- steps + get the PR merged.
516
- 4. Once the PR is in, wait for the [tag release workflow](https://github.com/RasaHQ/rasa-private/actions/workflows/tag-release.yml) to create the tag.
517
- (If this fails for some reason, then run the following manually on the release branch) :
518
- ```bash
519
- git checkout 3.8.x
520
- git pull origin 3.8.x
521
- git tag 3.8.0 -m "next release"
522
- git push origin 3.8.0 --tags
523
- ```
524
- 5. After this you should see the CI workflow "Continuous Integration" in the Actions tab with the relevant tag name. Keep an eye on it to make sure it is successful as sometimes retries might be required.
525
- 6. After all the steps are completed and if everything goes well then we should see a message automatically posted in the company's Slack (`release` channel) like this [one](https://rasa-hq.slack.com/archives/C7B08Q5FX/p1614354499046600)
526
- 7. If however an error occurs in the build, then we should see a failure message automatically posted in the company's Slack (`dev-tribe` channel) like this [one](https://rasa-hq.slack.com/archives/C01M5TAHDHA/p1701444735622919)
527
-
528
- Make sure to merge the branch `3.7.x` after your PR with `main`. This needs to be done manually until Roberto is added (see [ATO-2091](https://rasahq.atlassian.net/browse/ATO-2091))
529
-
530
- ### Cutting a Pre release version
531
-
532
- A Pre release version is an alpha, beta, dev or rc version. For more details on which version you require refer to the [Rasa Software Release Lifecycle](https://www.notion.so/rasa/Rasa-Software-Release-Lifecycle-eb704d75f87646a9a9aca1f3fbe71fb3#6e26ac9a15b64f91bb94d6bfea9306a0)
533
-
534
- 1. Make sure you are using the right branch for the release, for instance pre releases are always made from either the main or a feature branch (especially for a dev release)
535
- 2. Once you're ready to release, checkout the branch, run `make release` and follow the
536
- steps.
537
- 3. Only in case of a pre release, the release branch created will be prefixed with 'prepare-release-pre-'
538
- 4. Note that when releasing from a feature branch the 'prepare-release-pre' branch will not be created automatically and has to be done manually. This is done to ensure all major/minor/patch releases only happens from the correct branches.
539
- (In this case the version updates will be added to the same branch as a commit, and you will have to manually create a `prepare-release-pre-' branch and push to remote)
540
- 5. Only in case of a pre release, we currently skip all test runs and docker image builds on a 'prepare-release-pre-' PR. This was done to speed up the pre release process.
541
- 6. Once your PR gets merged, the [tag release workflow](https://github.com/RasaHQ/rasa-private/actions/workflows/tag-release.yml) will create the tag.
542
- 7. After this you should see the CI workflow "Continuous Integration" in the Actions tab with the relevant tag name. Keep an eye on it to make sure it is successful as sometimes retries might be required.
543
- 8. After all the steps are completed and if everything goes well then we should see a message automatically posted in the company's Slack (`release` channel) like this [one](https://rasa-hq.slack.com/archives/C7B08Q5FX/p1614354499046600)
544
- 9. If however an error occurs in the build, then we should see a failure message automatically posted in the company's Slack (`dev-tribe` channel) like this [one](https://rasa-hq.slack.com/archives/C01M5TAHDHA/p1701444735622919)
545
-
546
-
547
- ### Actively maintained versions
548
-
549
- Please refer to the [Rasa Product Release and Maintenance Policy](https://rasa.com/rasa-product-release-and-maintenance-policy/) page.
550
-
551
- ## Troubleshooting
552
-
553
- - When running docker commands, if you encounter this error: `OSError No space left on device`, consider running:
554
-
555
- ```shell
556
- docker system prune --all
557
- ```
558
-
559
- For more information on this command, please see the [Official Docker Documentation](https://docs.docker.com/engine/reference/commandline/system_prune/).
560
- =======
561
- for more. Also feel free to reach out to us on the [Rasa forum](https://forum.rasa.com/).
562
- >>>>>>> 2c5cd7bc639 (update readme.md from main branch on 3.10.x (#1597))
563
-