rasa-pro 3.13.0.dev3__py3-none-any.whl → 3.13.0.dev7__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 (228) hide show
  1. rasa/__main__.py +3 -1
  2. rasa/api.py +4 -0
  3. rasa/cli/arguments/default_arguments.py +13 -1
  4. rasa/cli/arguments/train.py +2 -0
  5. rasa/cli/evaluate.py +1 -1
  6. rasa/cli/export.py +2 -2
  7. rasa/cli/inspect.py +8 -4
  8. rasa/cli/project_templates/default/config.yml +5 -32
  9. rasa/cli/project_templates/{calm → default}/e2e_tests/cancelations/user_cancels_during_a_correction.yml +1 -1
  10. rasa/cli/project_templates/{calm → default}/e2e_tests/cancelations/user_changes_mind_on_a_whim.yml +1 -1
  11. rasa/cli/project_templates/{calm → default}/e2e_tests/corrections/user_corrects_contact_handle.yml +1 -1
  12. rasa/cli/project_templates/{calm → default}/e2e_tests/corrections/user_corrects_contact_name.yml +1 -1
  13. rasa/cli/project_templates/{calm → default}/e2e_tests/happy_paths/user_adds_contact_to_their_list.yml +1 -1
  14. rasa/cli/project_templates/{calm → default}/e2e_tests/happy_paths/user_lists_contacts.yml +1 -1
  15. rasa/cli/project_templates/{calm → default}/e2e_tests/happy_paths/user_removes_contact.yml +1 -1
  16. rasa/cli/project_templates/{calm → default}/e2e_tests/happy_paths/user_removes_contact_from_list.yml +1 -1
  17. rasa/cli/project_templates/default/endpoints.yml +18 -2
  18. rasa/cli/scaffold.py +3 -4
  19. rasa/cli/studio/download.py +1 -1
  20. rasa/cli/studio/upload.py +0 -6
  21. rasa/cli/train.py +1 -0
  22. rasa/constants.py +2 -0
  23. rasa/core/agent.py +2 -2
  24. rasa/core/brokers/kafka.py +4 -0
  25. rasa/core/brokers/pika.py +4 -0
  26. rasa/core/brokers/sql.py +1 -1
  27. rasa/core/channels/channel.py +68 -5
  28. rasa/core/channels/inspector/.eslintrc.cjs +12 -6
  29. rasa/core/channels/inspector/.prettierrc +5 -0
  30. rasa/core/channels/inspector/README.md +10 -4
  31. rasa/core/channels/inspector/dist/assets/{arc-c7691751.js → arc-c4b064fc.js} +1 -1
  32. rasa/core/channels/inspector/dist/assets/{blockDiagram-38ab4fdb-ab99dff7.js → blockDiagram-38ab4fdb-215b5026.js} +1 -1
  33. rasa/core/channels/inspector/dist/assets/{c4Diagram-3d4e48cf-08c35a6b.js → c4Diagram-3d4e48cf-2b54a0a3.js} +1 -1
  34. rasa/core/channels/inspector/dist/assets/channel-3730f5fd.js +1 -0
  35. rasa/core/channels/inspector/dist/assets/{classDiagram-70f12bd4-9e9c71c9.js → classDiagram-70f12bd4-daacea5f.js} +1 -1
  36. rasa/core/channels/inspector/dist/assets/{classDiagram-v2-f2320105-15e7e2bf.js → classDiagram-v2-f2320105-930d4dc2.js} +1 -1
  37. rasa/core/channels/inspector/dist/assets/clone-e847561e.js +1 -0
  38. rasa/core/channels/inspector/dist/assets/{createText-2e5e7dd3-9c105cb1.js → createText-2e5e7dd3-83c206ba.js} +1 -1
  39. rasa/core/channels/inspector/dist/assets/{edges-e0da2a9e-77e89e48.js → edges-e0da2a9e-b0eb01d0.js} +1 -1
  40. rasa/core/channels/inspector/dist/assets/{erDiagram-9861fffd-7a011646.js → erDiagram-9861fffd-17586500.js} +1 -1
  41. rasa/core/channels/inspector/dist/assets/{flowDb-956e92f1-b6f105ac.js → flowDb-956e92f1-be2a1776.js} +1 -1
  42. rasa/core/channels/inspector/dist/assets/{flowDiagram-66a62f08-ce4f18c2.js → flowDiagram-66a62f08-c2120ebd.js} +1 -1
  43. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-efbbfe00.js +1 -0
  44. rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-4a651766-cb5f6da4.js → flowchart-elk-definition-4a651766-a6ab5c48.js} +1 -1
  45. rasa/core/channels/inspector/dist/assets/{ganttDiagram-c361ad54-e4d19e28.js → ganttDiagram-c361ad54-ef613457.js} +1 -1
  46. rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-72cf32ee-727b1c33.js → gitGraphDiagram-72cf32ee-d59185b3.js} +1 -1
  47. rasa/core/channels/inspector/dist/assets/{graph-6e2ab9a7.js → graph-0f155405.js} +1 -1
  48. rasa/core/channels/inspector/dist/assets/{index-3862675e-84ec700f.js → index-3862675e-d5f1d1b7.js} +1 -1
  49. rasa/core/channels/inspector/dist/assets/{index-098a1a24.js → index-47737d3a.js} +162 -149
  50. rasa/core/channels/inspector/dist/assets/{infoDiagram-f8f76790-78dda442.js → infoDiagram-f8f76790-b07d141f.js} +1 -1
  51. rasa/core/channels/inspector/dist/assets/{journeyDiagram-49397b02-f1cc6dd1.js → journeyDiagram-49397b02-1936d429.js} +1 -1
  52. rasa/core/channels/inspector/dist/assets/{layout-d98dcd0c.js → layout-dde8d0f3.js} +1 -1
  53. rasa/core/channels/inspector/dist/assets/{line-838e3d82.js → line-0c2c7ee0.js} +1 -1
  54. rasa/core/channels/inspector/dist/assets/{linear-eae72406.js → linear-35dd89a4.js} +1 -1
  55. rasa/core/channels/inspector/dist/assets/{mindmap-definition-fc14e90a-c96fd84b.js → mindmap-definition-fc14e90a-56192851.js} +1 -1
  56. rasa/core/channels/inspector/dist/assets/{pieDiagram-8a3498a8-c936d4e2.js → pieDiagram-8a3498a8-fc21ed78.js} +1 -1
  57. rasa/core/channels/inspector/dist/assets/{quadrantDiagram-120e2f19-b338eb8f.js → quadrantDiagram-120e2f19-25e98518.js} +1 -1
  58. rasa/core/channels/inspector/dist/assets/{requirementDiagram-deff3bca-c6b6c0d5.js → requirementDiagram-deff3bca-546ff1f5.js} +1 -1
  59. rasa/core/channels/inspector/dist/assets/{sankeyDiagram-04a897e0-b9372e19.js → sankeyDiagram-04a897e0-02d8b82d.js} +1 -1
  60. rasa/core/channels/inspector/dist/assets/{sequenceDiagram-704730f1-479e0a3f.js → sequenceDiagram-704730f1-3ca5a92e.js} +1 -1
  61. rasa/core/channels/inspector/dist/assets/{stateDiagram-587899a1-fd26eebc.js → stateDiagram-587899a1-128ea07c.js} +1 -1
  62. rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-d93cdb3a-3233e0ae.js → stateDiagram-v2-d93cdb3a-95f290af.js} +1 -1
  63. rasa/core/channels/inspector/dist/assets/{styles-6aaf32cf-1fdd392b.js → styles-6aaf32cf-4984898a.js} +1 -1
  64. rasa/core/channels/inspector/dist/assets/{styles-9a916d00-6d7bfa1b.js → styles-9a916d00-1bf266ba.js} +1 -1
  65. rasa/core/channels/inspector/dist/assets/{styles-c10674c1-f86aab11.js → styles-c10674c1-60521c63.js} +1 -1
  66. rasa/core/channels/inspector/dist/assets/{svgDrawCommon-08f97a94-e3e49d7a.js → svgDrawCommon-08f97a94-a25b6e12.js} +1 -1
  67. rasa/core/channels/inspector/dist/assets/{timeline-definition-85554ec2-6fe08b4d.js → timeline-definition-85554ec2-0fc086bf.js} +1 -1
  68. rasa/core/channels/inspector/dist/assets/{xychartDiagram-e933f94c-c2e06fd6.js → xychartDiagram-e933f94c-44ee592e.js} +1 -1
  69. rasa/core/channels/inspector/dist/index.html +1 -1
  70. rasa/core/channels/inspector/package.json +3 -1
  71. rasa/core/channels/inspector/src/App.tsx +92 -90
  72. rasa/core/channels/inspector/src/components/Chat.tsx +61 -36
  73. rasa/core/channels/inspector/src/components/DiagramFlow.tsx +40 -43
  74. rasa/core/channels/inspector/src/components/DialogueInformation.tsx +57 -57
  75. rasa/core/channels/inspector/src/components/DialogueStack.tsx +36 -27
  76. rasa/core/channels/inspector/src/components/ExpandIcon.tsx +4 -4
  77. rasa/core/channels/inspector/src/components/FullscreenButton.tsx +7 -7
  78. rasa/core/channels/inspector/src/components/LoadingSpinner.tsx +28 -12
  79. rasa/core/channels/inspector/src/components/NoActiveFlow.tsx +9 -9
  80. rasa/core/channels/inspector/src/components/RasaLogo.tsx +5 -5
  81. rasa/core/channels/inspector/src/components/RecruitmentPanel.tsx +55 -60
  82. rasa/core/channels/inspector/src/components/SaraDiagrams.tsx +5 -5
  83. rasa/core/channels/inspector/src/components/Slots.tsx +22 -22
  84. rasa/core/channels/inspector/src/components/Welcome.tsx +28 -31
  85. rasa/core/channels/inspector/src/helpers/audio/audiostream.ts +245 -0
  86. rasa/core/channels/inspector/src/helpers/audio/microphone-processor.js +12 -0
  87. rasa/core/channels/inspector/src/helpers/audio/playback-processor.js +36 -0
  88. rasa/core/channels/inspector/src/helpers/conversation.ts +16 -0
  89. rasa/core/channels/inspector/src/helpers/formatters.test.ts +181 -181
  90. rasa/core/channels/inspector/src/helpers/formatters.ts +111 -111
  91. rasa/core/channels/inspector/src/helpers/utils.ts +78 -61
  92. rasa/core/channels/inspector/src/main.tsx +8 -8
  93. rasa/core/channels/inspector/src/theme/Button/Button.ts +8 -8
  94. rasa/core/channels/inspector/src/theme/Heading/Heading.ts +7 -7
  95. rasa/core/channels/inspector/src/theme/Input/Input.ts +9 -9
  96. rasa/core/channels/inspector/src/theme/Link/Link.ts +6 -6
  97. rasa/core/channels/inspector/src/theme/Modal/Modal.ts +13 -13
  98. rasa/core/channels/inspector/src/theme/Table/Table.tsx +10 -10
  99. rasa/core/channels/inspector/src/theme/Tooltip/Tooltip.ts +5 -5
  100. rasa/core/channels/inspector/src/theme/base/breakpoints.ts +7 -7
  101. rasa/core/channels/inspector/src/theme/base/colors.ts +64 -64
  102. rasa/core/channels/inspector/src/theme/base/fonts/fontFaces.css +21 -18
  103. rasa/core/channels/inspector/src/theme/base/radii.ts +8 -8
  104. rasa/core/channels/inspector/src/theme/base/shadows.ts +5 -5
  105. rasa/core/channels/inspector/src/theme/base/sizes.ts +5 -5
  106. rasa/core/channels/inspector/src/theme/base/space.ts +12 -12
  107. rasa/core/channels/inspector/src/theme/base/styles.ts +5 -5
  108. rasa/core/channels/inspector/src/theme/base/typography.ts +12 -12
  109. rasa/core/channels/inspector/src/theme/base/zIndices.ts +3 -3
  110. rasa/core/channels/inspector/src/theme/index.ts +38 -38
  111. rasa/core/channels/inspector/src/types.ts +56 -50
  112. rasa/core/channels/inspector/yarn.lock +5 -0
  113. rasa/core/channels/voice_ready/audiocodes.py +75 -32
  114. rasa/core/channels/voice_ready/twilio_voice.py +48 -1
  115. rasa/core/channels/voice_stream/tts/azure.py +11 -2
  116. rasa/core/channels/voice_stream/twilio_media_streams.py +101 -26
  117. rasa/core/channels/voice_stream/voice_channel.py +28 -2
  118. rasa/core/concurrent_lock_store.py +24 -10
  119. rasa/core/evaluation/marker_tracker_loader.py +1 -1
  120. rasa/core/exporter.py +1 -1
  121. rasa/core/lock_store.py +151 -60
  122. rasa/core/nlg/contextual_response_rephraser.py +4 -2
  123. rasa/core/nlg/summarize.py +1 -1
  124. rasa/core/persistor.py +55 -20
  125. rasa/core/policies/enterprise_search_policy.py +7 -4
  126. rasa/core/policies/intentless_policy.py +15 -9
  127. rasa/core/processor.py +2 -2
  128. rasa/core/run.py +7 -2
  129. rasa/core/{auth_retry_tracker_store.py → tracker_stores/auth_retry_tracker_store.py} +5 -1
  130. rasa/core/tracker_stores/dynamo_tracker_store.py +218 -0
  131. rasa/core/tracker_stores/mongo_tracker_store.py +206 -0
  132. rasa/core/tracker_stores/redis_tracker_store.py +219 -0
  133. rasa/core/tracker_stores/sql_tracker_store.py +555 -0
  134. rasa/core/tracker_stores/tracker_store.py +805 -0
  135. rasa/core/utils.py +6 -0
  136. rasa/dialogue_understanding/coexistence/llm_based_router.py +8 -3
  137. rasa/dialogue_understanding/commands/clarify_command.py +2 -2
  138. rasa/dialogue_understanding/commands/knowledge_answer_command.py +2 -2
  139. rasa/dialogue_understanding/generator/constants.py +2 -2
  140. rasa/dialogue_understanding/generator/llm_based_command_generator.py +1 -1
  141. rasa/dialogue_understanding/generator/prompt_templates/command_prompt_v2_gpt_4o_2024_11_20_template.jinja2 +33 -12
  142. rasa/dialogue_understanding/generator/single_step/compact_llm_command_generator.py +2 -2
  143. rasa/dialogue_understanding_test/du_test_case.py +16 -8
  144. rasa/hooks.py +2 -2
  145. rasa/keys +1 -0
  146. rasa/llm_fine_tuning/paraphrasing/conversation_rephraser.py +4 -2
  147. rasa/model_manager/config.py +3 -1
  148. rasa/model_manager/model_api.py +1 -2
  149. rasa/model_manager/runner_service.py +8 -4
  150. rasa/model_manager/trainer_service.py +1 -0
  151. rasa/model_training.py +12 -3
  152. rasa/nlu/extractors/crf_entity_extractor.py +66 -16
  153. rasa/plugin.py +1 -4
  154. rasa/server.py +6 -2
  155. rasa/shared/constants.py +4 -0
  156. rasa/shared/core/domain.py +165 -11
  157. rasa/shared/core/events.py +68 -2
  158. rasa/shared/core/flows/flow.py +155 -131
  159. rasa/shared/core/flows/flow_step.py +19 -3
  160. rasa/shared/core/flows/flow_step_links.py +15 -0
  161. rasa/shared/core/flows/flow_step_sequence.py +6 -0
  162. rasa/shared/core/flows/nlu_trigger.py +13 -0
  163. rasa/shared/core/flows/steps/action.py +7 -4
  164. rasa/shared/core/flows/steps/call.py +11 -4
  165. rasa/shared/core/flows/steps/collect.py +27 -6
  166. rasa/shared/core/flows/steps/internal.py +6 -1
  167. rasa/shared/core/flows/steps/link.py +7 -4
  168. rasa/shared/core/flows/steps/no_operation.py +7 -4
  169. rasa/shared/core/flows/steps/set_slots.py +8 -4
  170. rasa/shared/core/flows/yaml_flows_io.py +106 -5
  171. rasa/shared/importers/importer.py +8 -0
  172. rasa/shared/providers/_configs/azure_openai_client_config.py +4 -0
  173. rasa/shared/providers/_configs/openai_client_config.py +4 -0
  174. rasa/shared/providers/_utils.py +83 -0
  175. rasa/shared/providers/embedding/_base_litellm_embedding_client.py +3 -0
  176. rasa/shared/providers/llm/_base_litellm_client.py +11 -5
  177. rasa/shared/providers/llm/azure_openai_llm_client.py +6 -68
  178. rasa/shared/providers/router/_base_litellm_router_client.py +53 -1
  179. rasa/shared/utils/common.py +42 -0
  180. rasa/studio/download/__init__.py +0 -0
  181. rasa/studio/download/domains.py +49 -0
  182. rasa/studio/download/download.py +439 -0
  183. rasa/studio/download/flows.py +359 -0
  184. rasa/studio/results_logger.py +6 -1
  185. rasa/studio/upload.py +69 -5
  186. rasa/telemetry.py +2 -2
  187. rasa/tracing/config.py +1 -1
  188. rasa/tracing/instrumentation/attribute_extractors.py +1 -1
  189. rasa/tracing/instrumentation/instrumentation.py +1 -1
  190. rasa/utils/common.py +36 -0
  191. rasa/utils/endpoints.py +22 -1
  192. rasa/utils/licensing.py +2 -3
  193. rasa/validator.py +1 -2
  194. rasa/version.py +1 -1
  195. {rasa_pro-3.13.0.dev3.dist-info → rasa_pro-3.13.0.dev7.dist-info}/METADATA +10 -10
  196. {rasa_pro-3.13.0.dev3.dist-info → rasa_pro-3.13.0.dev7.dist-info}/RECORD +213 -210
  197. rasa/cli/project_templates/calm/config.yml +0 -10
  198. rasa/cli/project_templates/calm/credentials.yml +0 -33
  199. rasa/cli/project_templates/calm/endpoints.yml +0 -58
  200. rasa/cli/project_templates/default/actions/actions.py +0 -27
  201. rasa/cli/project_templates/default/data/nlu.yml +0 -91
  202. rasa/cli/project_templates/default/data/rules.yml +0 -13
  203. rasa/cli/project_templates/default/data/stories.yml +0 -30
  204. rasa/cli/project_templates/default/domain.yml +0 -34
  205. rasa/cli/project_templates/default/tests/test_stories.yml +0 -91
  206. rasa/core/channels/inspector/dist/assets/channel-11268142.js +0 -1
  207. rasa/core/channels/inspector/dist/assets/clone-ff7f2ce7.js +0 -1
  208. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-cba7ae20.js +0 -1
  209. rasa/core/channels/inspector/src/helpers/audiostream.ts +0 -191
  210. rasa/core/tracker_store.py +0 -1792
  211. rasa/studio/download.py +0 -489
  212. /rasa/cli/project_templates/{calm → default}/actions/action_template.py +0 -0
  213. /rasa/cli/project_templates/{calm → default}/actions/add_contact.py +0 -0
  214. /rasa/cli/project_templates/{calm → default}/actions/db.py +0 -0
  215. /rasa/cli/project_templates/{calm → default}/actions/list_contacts.py +0 -0
  216. /rasa/cli/project_templates/{calm → default}/actions/remove_contact.py +0 -0
  217. /rasa/cli/project_templates/{calm → default}/data/flows/add_contact.yml +0 -0
  218. /rasa/cli/project_templates/{calm → default}/data/flows/list_contacts.yml +0 -0
  219. /rasa/cli/project_templates/{calm → default}/data/flows/remove_contact.yml +0 -0
  220. /rasa/cli/project_templates/{calm → default}/db/contacts.json +0 -0
  221. /rasa/cli/project_templates/{calm → default}/domain/add_contact.yml +0 -0
  222. /rasa/cli/project_templates/{calm → default}/domain/list_contacts.yml +0 -0
  223. /rasa/cli/project_templates/{calm → default}/domain/remove_contact.yml +0 -0
  224. /rasa/cli/project_templates/{calm → default}/domain/shared.yml +0 -0
  225. /rasa/{cli/project_templates/calm/actions → core/tracker_stores}/__init__.py +0 -0
  226. {rasa_pro-3.13.0.dev3.dist-info → rasa_pro-3.13.0.dev7.dist-info}/NOTICE +0 -0
  227. {rasa_pro-3.13.0.dev3.dist-info → rasa_pro-3.13.0.dev7.dist-info}/WHEEL +0 -0
  228. {rasa_pro-3.13.0.dev3.dist-info → rasa_pro-3.13.0.dev7.dist-info}/entry_points.txt +0 -0
@@ -1,10 +0,0 @@
1
- recipe: default.v1
2
- language: en
3
- pipeline:
4
- - name: CompactLLMCommandGenerator
5
- llm:
6
- model_group: openai-gpt-4o
7
-
8
- policies:
9
- - name: FlowPolicy
10
- - name: IntentlessPolicy
@@ -1,33 +0,0 @@
1
- # This file contains the credentials for the voice & chat platforms
2
- # which your bot is using.
3
- # https://rasa.com/docs/rasa-pro/connectors/messaging-and-voice-channels/
4
-
5
- rest:
6
- # # you don't need to provide anything here - this channel doesn't
7
- # # require any credentials
8
-
9
-
10
- #facebook:
11
- # verify: "<verify>"
12
- # secret: "<your secret>"
13
- # page-access-token: "<your page access token>"
14
-
15
- #slack:
16
- # slack_token: "<your slack token>"
17
- # slack_channel: "<the slack channel>"
18
- # slack_signing_secret: "<your slack signing secret>"
19
-
20
- #socketio:
21
- # user_message_evt: <event name for user message>
22
- # bot_message_evt: <event name for bot messages>
23
- # session_persistence: <true/false>
24
-
25
- #mattermost:
26
- # url: "https://<mattermost instance>/api/v4"
27
- # token: "<bot token>"
28
- # webhook_url: "<callback URL>"
29
-
30
- # This entry is needed if you are using Rasa Enterprise. The entry represents credentials
31
- # for the Rasa Enterprise "channel", i.e. Talk to your bot and Share with guest testers.
32
- rasa:
33
- url: "http://localhost:5002/api"
@@ -1,58 +0,0 @@
1
- # This file contains the different endpoints your bot can use.
2
-
3
- # Server where the models are pulled from.
4
- # https://rasa.com/docs/rasa-pro/production/model-storage#fetching-models-from-a-server
5
-
6
- #models:
7
- # url: http://my-server.com/models/default_core@latest
8
- # wait_time_between_pulls: 10 # [optional](default: 100)
9
-
10
- # Server which runs your custom actions.
11
- # https://rasa.com/docs/rasa-pro/concepts/custom-actions
12
-
13
- action_endpoint:
14
- actions_module: "actions"
15
-
16
- # Tracker store which is used to store the conversations.
17
- # By default the conversations are stored in memory.
18
- # https://rasa.com/docs/rasa-pro/production/tracker-stores
19
-
20
- #tracker_store:
21
- # type: redis
22
- # url: <host of the redis instance, e.g. localhost>
23
- # port: <port of your redis instance, usually 6379>
24
- # db: <number of your database within redis, e.g. 0>
25
- # password: <password used for authentication>
26
- # use_ssl: <whether or not the communication is encrypted, default false>
27
-
28
- #tracker_store:
29
- # type: mongod
30
- # url: <url to your mongo instance, e.g. mongodb://localhost:27017>
31
- # db: <name of the db within your mongo instance, e.g. rasa>
32
- # username: <username used for authentication>
33
- # password: <password used for authentication>
34
-
35
- # Event broker which all conversation events should be streamed to.
36
- # https://rasa.com/docs/rasa-pro/production/event-brokers
37
-
38
- #event_broker:
39
- # url: localhost
40
- # username: username
41
- # password: password
42
- # queue: queue
43
-
44
- # The lines below activate contextual rephrasing, using the default OpenAI language model.
45
- # Ensure the OPENAI_API_KEY is set to prevent any missing API key errors.
46
- # For more details, refer to the documentation:
47
- # https://rasa.com/docs/rasa-pro/concepts/contextual-response-rephraser
48
- # To enable the rephraser, remove the comment symbols in the lines below.
49
- #nlg:
50
- # type: rephrase
51
-
52
- model_groups:
53
- - id: openai-gpt-4o
54
- models:
55
- - provider: openai
56
- model: gpt-4o-2024-11-20
57
- request_timeout: 7
58
- max_tokens: 256
@@ -1,27 +0,0 @@
1
- # This files contains your custom actions which can be used to run
2
- # custom Python code.
3
- #
4
- # See this guide on how to implement these action:
5
- # https://rasa.com/docs/rasa-pro/concepts/custom-actions
6
-
7
-
8
- # This is a simple example for a custom action which utters "Hello World!"
9
-
10
- # from typing import Any, Text, Dict, List
11
- #
12
- # from rasa_sdk import Action, Tracker
13
- # from rasa_sdk.executor import CollectingDispatcher
14
- #
15
- #
16
- # class ActionHelloWorld(Action):
17
- #
18
- # def name(self) -> Text:
19
- # return "action_hello_world"
20
- #
21
- # def run(self, dispatcher: CollectingDispatcher,
22
- # tracker: Tracker,
23
- # domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
24
- #
25
- # dispatcher.utter_message(text="Hello World!")
26
- #
27
- # return []
@@ -1,91 +0,0 @@
1
- version: "3.1"
2
-
3
- nlu:
4
- - intent: greet
5
- examples: |
6
- - hey
7
- - hello
8
- - hi
9
- - hello there
10
- - good morning
11
- - good evening
12
- - moin
13
- - hey there
14
- - let's go
15
- - hey dude
16
- - goodmorning
17
- - goodevening
18
- - good afternoon
19
-
20
- - intent: goodbye
21
- examples: |
22
- - cu
23
- - good by
24
- - cee you later
25
- - good night
26
- - bye
27
- - goodbye
28
- - have a nice day
29
- - see you around
30
- - bye bye
31
- - see you later
32
-
33
- - intent: affirm
34
- examples: |
35
- - yes
36
- - y
37
- - indeed
38
- - of course
39
- - that sounds good
40
- - correct
41
-
42
- - intent: deny
43
- examples: |
44
- - no
45
- - n
46
- - never
47
- - I don't think so
48
- - don't like that
49
- - no way
50
- - not really
51
-
52
- - intent: mood_great
53
- examples: |
54
- - perfect
55
- - great
56
- - amazing
57
- - feeling like a king
58
- - wonderful
59
- - I am feeling very good
60
- - I am great
61
- - I am amazing
62
- - I am going to save the world
63
- - super stoked
64
- - extremely good
65
- - so so perfect
66
- - so good
67
- - so perfect
68
-
69
- - intent: mood_unhappy
70
- examples: |
71
- - my day was horrible
72
- - I am sad
73
- - I don't feel very well
74
- - I am disappointed
75
- - super sad
76
- - I'm so sad
77
- - sad
78
- - very sad
79
- - unhappy
80
- - not good
81
- - not very good
82
- - extremly sad
83
- - so saad
84
- - so sad
85
-
86
- - intent: bot_challenge
87
- examples: |
88
- - are you a bot?
89
- - are you a human?
90
- - am I talking to a bot?
91
- - am I talking to a human?
@@ -1,13 +0,0 @@
1
- version: "3.1"
2
-
3
- rules:
4
-
5
- - rule: Say goodbye anytime the user says goodbye
6
- steps:
7
- - intent: goodbye
8
- - action: utter_goodbye
9
-
10
- - rule: Say 'I am a bot' anytime the user challenges
11
- steps:
12
- - intent: bot_challenge
13
- - action: utter_iamabot
@@ -1,30 +0,0 @@
1
- version: "3.1"
2
-
3
- stories:
4
-
5
- - story: happy path
6
- steps:
7
- - intent: greet
8
- - action: utter_greet
9
- - intent: mood_great
10
- - action: utter_happy
11
-
12
- - story: sad path 1
13
- steps:
14
- - intent: greet
15
- - action: utter_greet
16
- - intent: mood_unhappy
17
- - action: utter_cheer_up
18
- - action: utter_did_that_help
19
- - intent: affirm
20
- - action: utter_happy
21
-
22
- - story: sad path 2
23
- steps:
24
- - intent: greet
25
- - action: utter_greet
26
- - intent: mood_unhappy
27
- - action: utter_cheer_up
28
- - action: utter_did_that_help
29
- - intent: deny
30
- - action: utter_goodbye
@@ -1,34 +0,0 @@
1
- version: "3.1"
2
-
3
- intents:
4
- - greet
5
- - goodbye
6
- - affirm
7
- - deny
8
- - mood_great
9
- - mood_unhappy
10
- - bot_challenge
11
-
12
- responses:
13
- utter_greet:
14
- - text: "Hey! How are you?"
15
-
16
- utter_cheer_up:
17
- - text: "Here is something to cheer you up:"
18
- image: "https://i.imgur.com/nGF1K8f.jpg"
19
-
20
- utter_did_that_help:
21
- - text: "Did that help you?"
22
-
23
- utter_happy:
24
- - text: "Great, carry on!"
25
-
26
- utter_goodbye:
27
- - text: "Bye"
28
-
29
- utter_iamabot:
30
- - text: "I am a bot, powered by Rasa."
31
-
32
- session_config:
33
- session_expiration_time: 60
34
- carry_over_slots_to_new_session: true
@@ -1,91 +0,0 @@
1
- #### This file contains tests to evaluate that your bot behaves as expected.
2
- #### If you want to learn more, please see the docs: https://rasa.com/docs/rasa-pro/nlu-based-assistants/testing-your-assistant
3
-
4
- stories:
5
- - story: happy path 1
6
- steps:
7
- - user: |
8
- hello there!
9
- intent: greet
10
- - action: utter_greet
11
- - user: |
12
- amazing
13
- intent: mood_great
14
- - action: utter_happy
15
-
16
- - story: happy path 2
17
- steps:
18
- - user: |
19
- hello there!
20
- intent: greet
21
- - action: utter_greet
22
- - user: |
23
- amazing
24
- intent: mood_great
25
- - action: utter_happy
26
- - user: |
27
- bye-bye!
28
- intent: goodbye
29
- - action: utter_goodbye
30
-
31
- - story: sad path 1
32
- steps:
33
- - user: |
34
- hello
35
- intent: greet
36
- - action: utter_greet
37
- - user: |
38
- not good
39
- intent: mood_unhappy
40
- - action: utter_cheer_up
41
- - action: utter_did_that_help
42
- - user: |
43
- yes
44
- intent: affirm
45
- - action: utter_happy
46
-
47
- - story: sad path 2
48
- steps:
49
- - user: |
50
- hello
51
- intent: greet
52
- - action: utter_greet
53
- - user: |
54
- not good
55
- intent: mood_unhappy
56
- - action: utter_cheer_up
57
- - action: utter_did_that_help
58
- - user: |
59
- not really
60
- intent: deny
61
- - action: utter_goodbye
62
-
63
- - story: sad path 3
64
- steps:
65
- - user: |
66
- hi
67
- intent: greet
68
- - action: utter_greet
69
- - user: |
70
- very terrible
71
- intent: mood_unhappy
72
- - action: utter_cheer_up
73
- - action: utter_did_that_help
74
- - user: |
75
- no
76
- intent: deny
77
- - action: utter_goodbye
78
-
79
- - story: say goodbye
80
- steps:
81
- - user: |
82
- bye-bye!
83
- intent: goodbye
84
- - action: utter_goodbye
85
-
86
- - story: bot challenge
87
- steps:
88
- - user: |
89
- are you a bot?
90
- intent: bot_challenge
91
- - action: utter_iamabot
@@ -1 +0,0 @@
1
- import{aI as o,aJ as r}from"./index-098a1a24.js";const s=(a,n)=>o.lang.round(r.parse(a)[n]),e=s;export{e as c};
@@ -1 +0,0 @@
1
- import{c as r}from"./graph-6e2ab9a7.js";var e=4;function a(o){return r(o,e)}export{a as c};
@@ -1 +0,0 @@
1
- import{p as e,f as o}from"./flowDb-956e92f1-b6f105ac.js";import{f as t,g as a}from"./styles-c10674c1-f86aab11.js";import{u as i}from"./index-098a1a24.js";import"./graph-6e2ab9a7.js";import"./layout-d98dcd0c.js";import"./index-3862675e-84ec700f.js";import"./clone-ff7f2ce7.js";import"./edges-e0da2a9e-77e89e48.js";import"./createText-2e5e7dd3-9c105cb1.js";import"./line-838e3d82.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";import"./channel-11268142.js";const M={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,i({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{M as diagram};
@@ -1,191 +0,0 @@
1
- const bufferSize = 4096
2
- const sampleRate = 8000
3
- const audioOptions = {
4
- audio: {
5
- echoCancellation: true,
6
- noiseSuppression: true,
7
- autoGainControl: true
8
- }
9
- }
10
-
11
- const arrayBufferToBase64 = ( buffer: ArrayBuffer ): string => {
12
- let binary = '';
13
- const bytes = new Uint8Array( buffer );
14
- const len = bytes.byteLength;
15
- for (let i = 0; i < len; i++) {
16
- binary += String.fromCharCode( bytes[ i ] );
17
- }
18
- return window.btoa( binary );
19
- }
20
-
21
- const base64ToArrayBuffer = ( s: string ): ArrayBuffer => {
22
- const binary_string = window.atob(s);
23
- const len = binary_string.length;
24
- const bytes = new Uint8Array( len );
25
- for (let i = 0; i < len; i++) {
26
- bytes[i] = binary_string.charCodeAt(i);
27
- }
28
- return bytes.buffer;
29
- }
30
-
31
- const floatToIntArray = (arr: Float32Array): Int32Array => {
32
- // Convert Float Array [-1, 1] to full range int array
33
- return Int32Array.from(arr, x => x * 0x7fffffff)
34
- }
35
-
36
- const intToFloatArray = (arr: Int32Array): Float32Array => {
37
- return Float32Array.from(arr, x => (x / 0x7fffffff))
38
- }
39
-
40
- interface Mark {
41
- id: string
42
- bytesToGo: number
43
- }
44
-
45
- interface AudioQueue {
46
- buffer: Float32Array;
47
- marks: Array<Mark>
48
- socket: WebSocket,
49
- write: (newAudio: Float32Array) => void;
50
- read: (nSamples: number) => Float32Array;
51
- length: () => number;
52
- addMarker: (id: string) => void;
53
- reduceMarkers: (bytesRead: number) => void;
54
- popMarkers: () => void;
55
- }
56
-
57
-
58
- const createAudioQueue = (socket: WebSocket) : AudioQueue => {
59
- return {
60
- buffer: new Float32Array(0),
61
- marks: new Array<Mark>(),
62
- socket,
63
-
64
- write: function(newAudio: Float32Array) {
65
- const currentQLength = this.buffer.length;
66
- const newBuffer = new Float32Array(currentQLength + newAudio.length);
67
- newBuffer.set(this.buffer, 0);
68
- newBuffer.set(newAudio, currentQLength);
69
- this.buffer = newBuffer;
70
- },
71
-
72
- read: function(nSamples: number) {
73
- const samplesToPlay = this.buffer.subarray(0, nSamples);
74
- this.buffer = this.buffer.subarray(nSamples, this.buffer.length);
75
- this.reduceMarkers(samplesToPlay.length)
76
- this.popMarkers()
77
- return samplesToPlay;
78
- },
79
-
80
- length: function() {
81
- return this.buffer.length;
82
- },
83
-
84
- addMarker: function(id: string) {
85
- this.marks.push({id, bytesToGo: this.length()})
86
- },
87
-
88
- reduceMarkers: function(bytesRead: number) {
89
- this.marks = this.marks.map((m) => {
90
- return {id: m.id, bytesToGo: m.bytesToGo - bytesRead}
91
- })
92
- },
93
-
94
- popMarkers: function() {
95
- // marks are ordered
96
- let popUpTo = 0;
97
- while (popUpTo < this.marks.length) {
98
- if (this.marks[popUpTo].bytesToGo <= 0) {
99
- popUpTo += 1
100
- } else {
101
- break
102
- }
103
- }
104
- const marksToPop = this.marks.slice(0, popUpTo)
105
- this.marks = this.marks.slice(popUpTo, this.marks.length)
106
- marksToPop.forEach((m) => {
107
- this.socket.send(JSON.stringify({marker: m.id}))
108
- })
109
- }
110
-
111
- };
112
- }
113
-
114
- const streamMicrophoneToServer = async (socket: WebSocket) => {
115
- let audioStream = null;
116
- const audioContext = new AudioContext({sampleRate});
117
-
118
- try {
119
- audioStream = await navigator.mediaDevices.getUserMedia(audioOptions);
120
- const audioInput = audioContext.createMediaStreamSource(audioStream)
121
- const sender = audioContext.createScriptProcessor(bufferSize, 1, 1)
122
- sender.onaudioprocess = function(event) {
123
- const message = JSON.stringify({
124
- "audio": arrayBufferToBase64(floatToIntArray(event.inputBuffer.getChannelData(0)).buffer)
125
- })
126
- socket.send(message)
127
- }
128
- audioInput.connect(sender)
129
- sender.connect(audioContext.destination)
130
- } catch (err) {
131
- console.error(err);
132
- }
133
- }
134
-
135
- const setupAudioPlayback = (socket: WebSocket): AudioQueue => {
136
- const audioQueue = createAudioQueue(socket)
137
- const silence = new Float32Array(bufferSize)
138
- const audioOutputContext = new AudioContext({sampleRate})
139
- const scriptNode = audioOutputContext.createScriptProcessor(bufferSize, 1, 1);
140
- scriptNode.onaudioprocess = function(e) {
141
- const audioData = audioQueue.length() ? audioQueue.read(bufferSize) : silence
142
- e.outputBuffer.getChannelData(0).set(audioData);
143
- }
144
- scriptNode.connect(audioOutputContext.destination)
145
- return audioQueue
146
- }
147
-
148
- const addDataToAudioQueue = (audioQueue: AudioQueue) => (message: MessageEvent<any>) => {
149
- const data = JSON.parse(message.data.toString())
150
- if (data["audio"]) {
151
- const audioBytes = base64ToArrayBuffer(data["audio"])
152
- const audioData = intToFloatArray(new Int32Array(audioBytes))
153
- audioQueue.write(audioData);
154
- } else if (data["marker"]) {
155
- audioQueue.addMarker(data["marker"])
156
- }
157
- }
158
-
159
- /**
160
- * Constructs a WebSocket URL for browser audio from a base HTTP/HTTPS URL
161
- *
162
- * @param baseUrl - The base URL (e.g., "https://example.com" or "http://localhost:5005")
163
- * @returns WebSocket URL for browser audio endpoint
164
- *
165
- * @example
166
- * getWebSocketUrl("https://example.com")
167
- * // Returns: "wss://example.com/webhooks/browser_audio/websocket"
168
- *
169
- * getWebSocketUrl("http://localhost:5005")
170
- * // Returns: "ws://localhost:5005/webhooks/browser_audio/websocket"
171
- *
172
- * @throws {TypeError} If baseUrl is not a valid URL
173
- */
174
- export function getWebSocketUrl(baseUrl: string) {
175
- const url = new URL(baseUrl);
176
- const wsProtocol = url.protocol === 'https:' ? 'wss:' : 'ws:';
177
- return `${wsProtocol}//${url.host}/webhooks/browser_audio/websocket`;
178
- }
179
-
180
- /**
181
- * Creates a WebSocket connection for browser audio and streams microphone input to the server
182
- *
183
- * @param baseUrl - The base URL (e.g., "https://example.com" or "http://localhost:5005")
184
- */
185
- export async function createAudioConnection(baseUrl: string) {
186
- const websocketURL = getWebSocketUrl(baseUrl)
187
- const socket = new WebSocket(websocketURL)
188
- socket.onopen = async () => { await streamMicrophoneToServer(socket)}
189
- const audioQueue = setupAudioPlayback(socket)
190
- socket.onmessage = addDataToAudioQueue(audioQueue)
191
- }