rasa-pro 3.13.0.dev5__py3-none-any.whl → 3.13.0.dev8__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 (266) hide show
  1. rasa/__main__.py +0 -3
  2. rasa/api.py +5 -1
  3. rasa/cli/arguments/default_arguments.py +13 -1
  4. rasa/cli/arguments/train.py +2 -0
  5. rasa/cli/dialogue_understanding_test.py +1 -1
  6. rasa/cli/e2e_test.py +1 -1
  7. rasa/cli/evaluate.py +2 -2
  8. rasa/cli/export.py +3 -3
  9. rasa/cli/llm_fine_tuning.py +12 -11
  10. rasa/cli/project_templates/defaults.py +133 -0
  11. rasa/cli/run.py +1 -1
  12. rasa/cli/studio/link.py +53 -0
  13. rasa/cli/studio/pull.py +78 -0
  14. rasa/cli/studio/push.py +78 -0
  15. rasa/cli/studio/studio.py +12 -0
  16. rasa/cli/studio/upload.py +8 -0
  17. rasa/cli/train.py +2 -1
  18. rasa/cli/utils.py +1 -1
  19. rasa/cli/x.py +1 -1
  20. rasa/constants.py +4 -0
  21. rasa/core/__init__.py +0 -16
  22. rasa/core/actions/action.py +5 -1
  23. rasa/core/actions/action_repeat_bot_messages.py +18 -22
  24. rasa/core/actions/action_run_slot_rejections.py +0 -1
  25. rasa/core/agent.py +18 -3
  26. rasa/core/available_endpoints.py +146 -0
  27. rasa/core/brokers/kafka.py +4 -0
  28. rasa/core/brokers/pika.py +5 -2
  29. rasa/core/brokers/sql.py +1 -1
  30. rasa/core/channels/botframework.py +2 -2
  31. rasa/core/channels/channel.py +2 -2
  32. rasa/core/channels/hangouts.py +8 -5
  33. rasa/core/channels/inspector/.eslintrc.cjs +12 -6
  34. rasa/core/channels/inspector/.prettierrc +5 -0
  35. rasa/core/channels/inspector/README.md +10 -4
  36. rasa/core/channels/inspector/dist/assets/{arc-9f75cc3b.js → arc-c4b064fc.js} +1 -1
  37. rasa/core/channels/inspector/dist/assets/{blockDiagram-38ab4fdb-7f34db23.js → blockDiagram-38ab4fdb-215b5026.js} +1 -1
  38. rasa/core/channels/inspector/dist/assets/{c4Diagram-3d4e48cf-948bab2c.js → c4Diagram-3d4e48cf-2b54a0a3.js} +1 -1
  39. rasa/core/channels/inspector/dist/assets/channel-3730f5fd.js +1 -0
  40. rasa/core/channels/inspector/dist/assets/{classDiagram-70f12bd4-53b0dd0e.js → classDiagram-70f12bd4-daacea5f.js} +1 -1
  41. rasa/core/channels/inspector/dist/assets/{classDiagram-v2-f2320105-fdf789e7.js → classDiagram-v2-f2320105-930d4dc2.js} +1 -1
  42. rasa/core/channels/inspector/dist/assets/clone-e847561e.js +1 -0
  43. rasa/core/channels/inspector/dist/assets/{createText-2e5e7dd3-87c4ece5.js → createText-2e5e7dd3-83c206ba.js} +1 -1
  44. rasa/core/channels/inspector/dist/assets/{edges-e0da2a9e-5a8b0749.js → edges-e0da2a9e-b0eb01d0.js} +1 -1
  45. rasa/core/channels/inspector/dist/assets/{erDiagram-9861fffd-66da90e2.js → erDiagram-9861fffd-17586500.js} +1 -1
  46. rasa/core/channels/inspector/dist/assets/{flowDb-956e92f1-10044f05.js → flowDb-956e92f1-be2a1776.js} +1 -1
  47. rasa/core/channels/inspector/dist/assets/{flowDiagram-66a62f08-f338f66a.js → flowDiagram-66a62f08-c2120ebd.js} +1 -1
  48. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-efbbfe00.js +1 -0
  49. rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-4a651766-b13140aa.js → flowchart-elk-definition-4a651766-a6ab5c48.js} +1 -1
  50. rasa/core/channels/inspector/dist/assets/{ganttDiagram-c361ad54-f2b4a55a.js → ganttDiagram-c361ad54-ef613457.js} +1 -1
  51. rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-72cf32ee-dedc298d.js → gitGraphDiagram-72cf32ee-d59185b3.js} +1 -1
  52. rasa/core/channels/inspector/dist/assets/{graph-4ede11ff.js → graph-0f155405.js} +1 -1
  53. rasa/core/channels/inspector/dist/assets/{index-3862675e-65549d37.js → index-3862675e-d5f1d1b7.js} +1 -1
  54. rasa/core/channels/inspector/dist/assets/{index-3a23e736.js → index-47737d3a.js} +123 -123
  55. rasa/core/channels/inspector/dist/assets/{infoDiagram-f8f76790-65439671.js → infoDiagram-f8f76790-b07d141f.js} +1 -1
  56. rasa/core/channels/inspector/dist/assets/{journeyDiagram-49397b02-56d03d98.js → journeyDiagram-49397b02-1936d429.js} +1 -1
  57. rasa/core/channels/inspector/dist/assets/{layout-dd48f7f4.js → layout-dde8d0f3.js} +1 -1
  58. rasa/core/channels/inspector/dist/assets/{line-1569ad2c.js → line-0c2c7ee0.js} +1 -1
  59. rasa/core/channels/inspector/dist/assets/{linear-48bf4935.js → linear-35dd89a4.js} +1 -1
  60. rasa/core/channels/inspector/dist/assets/{mindmap-definition-fc14e90a-688504c1.js → mindmap-definition-fc14e90a-56192851.js} +1 -1
  61. rasa/core/channels/inspector/dist/assets/{pieDiagram-8a3498a8-78b6d7e6.js → pieDiagram-8a3498a8-fc21ed78.js} +1 -1
  62. rasa/core/channels/inspector/dist/assets/{quadrantDiagram-120e2f19-048b84b3.js → quadrantDiagram-120e2f19-25e98518.js} +1 -1
  63. rasa/core/channels/inspector/dist/assets/{requirementDiagram-deff3bca-dd67f107.js → requirementDiagram-deff3bca-546ff1f5.js} +1 -1
  64. rasa/core/channels/inspector/dist/assets/{sankeyDiagram-04a897e0-8128436e.js → sankeyDiagram-04a897e0-02d8b82d.js} +1 -1
  65. rasa/core/channels/inspector/dist/assets/{sequenceDiagram-704730f1-1a0d1461.js → sequenceDiagram-704730f1-3ca5a92e.js} +1 -1
  66. rasa/core/channels/inspector/dist/assets/{stateDiagram-587899a1-46d388ed.js → stateDiagram-587899a1-128ea07c.js} +1 -1
  67. rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-d93cdb3a-ea42951a.js → stateDiagram-v2-d93cdb3a-95f290af.js} +1 -1
  68. rasa/core/channels/inspector/dist/assets/{styles-6aaf32cf-7427ed0c.js → styles-6aaf32cf-4984898a.js} +1 -1
  69. rasa/core/channels/inspector/dist/assets/{styles-9a916d00-ff5e5a16.js → styles-9a916d00-1bf266ba.js} +1 -1
  70. rasa/core/channels/inspector/dist/assets/{styles-c10674c1-7b3680cf.js → styles-c10674c1-60521c63.js} +1 -1
  71. rasa/core/channels/inspector/dist/assets/{svgDrawCommon-08f97a94-f860f2ad.js → svgDrawCommon-08f97a94-a25b6e12.js} +1 -1
  72. rasa/core/channels/inspector/dist/assets/{timeline-definition-85554ec2-2eebf0c8.js → timeline-definition-85554ec2-0fc086bf.js} +1 -1
  73. rasa/core/channels/inspector/dist/assets/{xychartDiagram-e933f94c-5d7f4e96.js → xychartDiagram-e933f94c-44ee592e.js} +1 -1
  74. rasa/core/channels/inspector/dist/index.html +1 -1
  75. rasa/core/channels/inspector/package.json +3 -1
  76. rasa/core/channels/inspector/src/App.tsx +91 -90
  77. rasa/core/channels/inspector/src/components/Chat.tsx +45 -41
  78. rasa/core/channels/inspector/src/components/DiagramFlow.tsx +40 -40
  79. rasa/core/channels/inspector/src/components/DialogueInformation.tsx +57 -57
  80. rasa/core/channels/inspector/src/components/DialogueStack.tsx +36 -27
  81. rasa/core/channels/inspector/src/components/ExpandIcon.tsx +4 -4
  82. rasa/core/channels/inspector/src/components/FullscreenButton.tsx +7 -7
  83. rasa/core/channels/inspector/src/components/LoadingSpinner.tsx +28 -12
  84. rasa/core/channels/inspector/src/components/NoActiveFlow.tsx +9 -9
  85. rasa/core/channels/inspector/src/components/RasaLogo.tsx +5 -5
  86. rasa/core/channels/inspector/src/components/RecruitmentPanel.tsx +55 -60
  87. rasa/core/channels/inspector/src/components/SaraDiagrams.tsx +5 -5
  88. rasa/core/channels/inspector/src/components/Slots.tsx +22 -22
  89. rasa/core/channels/inspector/src/components/Welcome.tsx +28 -31
  90. rasa/core/channels/inspector/src/helpers/audio/audiostream.ts +245 -0
  91. rasa/core/channels/inspector/src/helpers/audio/microphone-processor.js +12 -0
  92. rasa/core/channels/inspector/src/helpers/audio/playback-processor.js +36 -0
  93. rasa/core/channels/inspector/src/helpers/conversation.ts +7 -7
  94. rasa/core/channels/inspector/src/helpers/formatters.test.ts +181 -181
  95. rasa/core/channels/inspector/src/helpers/formatters.ts +111 -111
  96. rasa/core/channels/inspector/src/helpers/utils.ts +78 -61
  97. rasa/core/channels/inspector/src/main.tsx +8 -8
  98. rasa/core/channels/inspector/src/theme/Button/Button.ts +8 -8
  99. rasa/core/channels/inspector/src/theme/Heading/Heading.ts +7 -7
  100. rasa/core/channels/inspector/src/theme/Input/Input.ts +9 -9
  101. rasa/core/channels/inspector/src/theme/Link/Link.ts +6 -6
  102. rasa/core/channels/inspector/src/theme/Modal/Modal.ts +13 -13
  103. rasa/core/channels/inspector/src/theme/Table/Table.tsx +10 -10
  104. rasa/core/channels/inspector/src/theme/Tooltip/Tooltip.ts +5 -5
  105. rasa/core/channels/inspector/src/theme/base/breakpoints.ts +7 -7
  106. rasa/core/channels/inspector/src/theme/base/colors.ts +64 -64
  107. rasa/core/channels/inspector/src/theme/base/fonts/fontFaces.css +21 -18
  108. rasa/core/channels/inspector/src/theme/base/radii.ts +8 -8
  109. rasa/core/channels/inspector/src/theme/base/shadows.ts +5 -5
  110. rasa/core/channels/inspector/src/theme/base/sizes.ts +5 -5
  111. rasa/core/channels/inspector/src/theme/base/space.ts +12 -12
  112. rasa/core/channels/inspector/src/theme/base/styles.ts +5 -5
  113. rasa/core/channels/inspector/src/theme/base/typography.ts +12 -12
  114. rasa/core/channels/inspector/src/theme/base/zIndices.ts +3 -3
  115. rasa/core/channels/inspector/src/theme/index.ts +38 -38
  116. rasa/core/channels/inspector/src/types.ts +56 -50
  117. rasa/core/channels/inspector/yarn.lock +5 -0
  118. rasa/core/channels/mattermost.py +1 -1
  119. rasa/core/channels/rasa_chat.py +2 -4
  120. rasa/core/channels/rest.py +5 -4
  121. rasa/core/channels/studio_chat.py +3 -2
  122. rasa/core/channels/vier_cvg.py +1 -2
  123. rasa/core/channels/voice_ready/audiocodes.py +35 -25
  124. rasa/core/channels/voice_stream/audiocodes.py +7 -4
  125. rasa/core/channels/voice_stream/genesys.py +2 -2
  126. rasa/core/channels/voice_stream/twilio_media_streams.py +10 -5
  127. rasa/core/channels/voice_stream/voice_channel.py +33 -22
  128. rasa/core/evaluation/marker_tracker_loader.py +1 -1
  129. rasa/core/exporter.py +1 -1
  130. rasa/core/http_interpreter.py +3 -7
  131. rasa/core/jobs.py +2 -1
  132. rasa/core/nlg/contextual_response_rephraser.py +38 -11
  133. rasa/core/nlg/generator.py +0 -1
  134. rasa/core/nlg/interpolator.py +2 -3
  135. rasa/core/nlg/summarize.py +40 -6
  136. rasa/core/persistor.py +55 -20
  137. rasa/core/policies/enterprise_search_policy.py +290 -66
  138. rasa/core/policies/enterprise_search_prompt_with_relevancy_check_and_citation_template.jinja2 +63 -0
  139. rasa/core/policies/flow_policy.py +1 -1
  140. rasa/core/policies/flows/flow_executor.py +96 -17
  141. rasa/core/policies/intentless_policy.py +24 -16
  142. rasa/core/processor.py +106 -53
  143. rasa/core/run.py +40 -13
  144. rasa/core/tracker_stores/__init__.py +0 -0
  145. rasa/core/{auth_retry_tracker_store.py → tracker_stores/auth_retry_tracker_store.py} +5 -1
  146. rasa/core/tracker_stores/dynamo_tracker_store.py +218 -0
  147. rasa/core/tracker_stores/mongo_tracker_store.py +206 -0
  148. rasa/core/tracker_stores/redis_tracker_store.py +219 -0
  149. rasa/core/tracker_stores/sql_tracker_store.py +555 -0
  150. rasa/core/tracker_stores/tracker_store.py +805 -0
  151. rasa/core/training/interactive.py +1 -1
  152. rasa/core/utils.py +24 -91
  153. rasa/dialogue_understanding/coexistence/intent_based_router.py +2 -1
  154. rasa/dialogue_understanding/coexistence/llm_based_router.py +8 -3
  155. rasa/dialogue_understanding/commands/can_not_handle_command.py +2 -0
  156. rasa/dialogue_understanding/commands/cancel_flow_command.py +2 -0
  157. rasa/dialogue_understanding/commands/chit_chat_answer_command.py +2 -0
  158. rasa/dialogue_understanding/commands/clarify_command.py +6 -2
  159. rasa/dialogue_understanding/commands/command_syntax_manager.py +1 -0
  160. rasa/dialogue_understanding/commands/human_handoff_command.py +2 -0
  161. rasa/dialogue_understanding/commands/knowledge_answer_command.py +2 -0
  162. rasa/dialogue_understanding/commands/repeat_bot_messages_command.py +2 -0
  163. rasa/dialogue_understanding/commands/set_slot_command.py +11 -1
  164. rasa/dialogue_understanding/commands/skip_question_command.py +2 -0
  165. rasa/dialogue_understanding/commands/start_flow_command.py +4 -0
  166. rasa/dialogue_understanding/commands/utils.py +26 -2
  167. rasa/dialogue_understanding/generator/__init__.py +7 -1
  168. rasa/dialogue_understanding/generator/command_generator.py +4 -2
  169. rasa/dialogue_understanding/generator/command_parser.py +2 -2
  170. rasa/dialogue_understanding/generator/command_parser_validator.py +63 -0
  171. rasa/dialogue_understanding/generator/constants.py +2 -2
  172. rasa/dialogue_understanding/generator/llm_based_command_generator.py +1 -1
  173. rasa/dialogue_understanding/generator/prompt_templates/command_prompt_v3_gpt_4o_2024_11_20_template.jinja2 +78 -0
  174. rasa/dialogue_understanding/generator/single_step/compact_llm_command_generator.py +28 -463
  175. rasa/dialogue_understanding/generator/single_step/search_ready_llm_command_generator.py +147 -0
  176. rasa/dialogue_understanding/generator/single_step/single_step_based_llm_command_generator.py +477 -0
  177. rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +8 -58
  178. rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml +37 -25
  179. rasa/dialogue_understanding/patterns/domain_for_patterns.py +190 -0
  180. rasa/dialogue_understanding/processor/command_processor.py +3 -3
  181. rasa/dialogue_understanding/processor/command_processor_component.py +3 -3
  182. rasa/dialogue_understanding/stack/frames/flow_stack_frame.py +17 -4
  183. rasa/dialogue_understanding/utils.py +68 -12
  184. rasa/dialogue_understanding_test/du_test_case.py +1 -1
  185. rasa/dialogue_understanding_test/du_test_runner.py +4 -22
  186. rasa/dialogue_understanding_test/test_case_simulation/test_case_tracker_simulator.py +2 -6
  187. rasa/e2e_test/e2e_test_runner.py +1 -1
  188. rasa/engine/constants.py +1 -1
  189. rasa/engine/recipes/default_recipe.py +26 -2
  190. rasa/engine/validation.py +3 -2
  191. rasa/hooks.py +2 -30
  192. rasa/keys +1 -0
  193. rasa/llm_fine_tuning/annotation_module.py +39 -9
  194. rasa/llm_fine_tuning/conversations.py +3 -0
  195. rasa/llm_fine_tuning/llm_data_preparation_module.py +66 -49
  196. rasa/llm_fine_tuning/paraphrasing/conversation_rephraser.py +4 -2
  197. rasa/llm_fine_tuning/paraphrasing/rephrase_validator.py +52 -44
  198. rasa/llm_fine_tuning/paraphrasing_module.py +10 -12
  199. rasa/llm_fine_tuning/storage.py +4 -4
  200. rasa/llm_fine_tuning/utils.py +63 -1
  201. rasa/model_manager/config.py +3 -1
  202. rasa/model_manager/model_api.py +89 -2
  203. rasa/model_manager/runner_service.py +8 -4
  204. rasa/model_manager/trainer_service.py +5 -4
  205. rasa/model_training.py +12 -3
  206. rasa/nlu/extractors/crf_entity_extractor.py +66 -16
  207. rasa/plugin.py +2 -12
  208. rasa/privacy/__init__.py +0 -0
  209. rasa/privacy/constants.py +83 -0
  210. rasa/privacy/event_broker_utils.py +77 -0
  211. rasa/privacy/privacy_config.py +281 -0
  212. rasa/privacy/privacy_config_schema.json +86 -0
  213. rasa/privacy/privacy_filter.py +340 -0
  214. rasa/privacy/privacy_manager.py +576 -0
  215. rasa/server.py +29 -4
  216. rasa/shared/constants.py +6 -0
  217. rasa/shared/core/constants.py +4 -3
  218. rasa/shared/core/domain.py +7 -0
  219. rasa/shared/core/events.py +99 -3
  220. rasa/shared/core/flows/flow.py +1 -2
  221. rasa/shared/core/flows/flows_yaml_schema.json +3 -0
  222. rasa/shared/core/flows/steps/collect.py +46 -2
  223. rasa/shared/core/slots.py +28 -0
  224. rasa/shared/exceptions.py +4 -0
  225. rasa/shared/providers/_configs/azure_openai_client_config.py +4 -0
  226. rasa/shared/providers/_configs/openai_client_config.py +4 -0
  227. rasa/shared/providers/embedding/_base_litellm_embedding_client.py +3 -0
  228. rasa/shared/providers/llm/_base_litellm_client.py +5 -2
  229. rasa/shared/utils/llm.py +161 -6
  230. rasa/shared/utils/yaml.py +32 -0
  231. rasa/studio/data_handler.py +3 -3
  232. rasa/studio/download/download.py +37 -60
  233. rasa/studio/download/flows.py +23 -31
  234. rasa/studio/link.py +200 -0
  235. rasa/studio/pull.py +94 -0
  236. rasa/studio/push.py +131 -0
  237. rasa/studio/upload.py +117 -67
  238. rasa/telemetry.py +84 -27
  239. rasa/tracing/config.py +4 -5
  240. rasa/tracing/constants.py +19 -1
  241. rasa/tracing/instrumentation/attribute_extractors.py +11 -3
  242. rasa/tracing/instrumentation/instrumentation.py +54 -3
  243. rasa/tracing/instrumentation/metrics.py +98 -15
  244. rasa/tracing/metric_instrument_provider.py +75 -3
  245. rasa/utils/common.py +1 -27
  246. rasa/utils/licensing.py +1 -2
  247. rasa/utils/log_utils.py +1 -45
  248. rasa/validator.py +2 -8
  249. rasa/version.py +1 -1
  250. {rasa_pro-3.13.0.dev5.dist-info → rasa_pro-3.13.0.dev8.dist-info}/METADATA +8 -9
  251. {rasa_pro-3.13.0.dev5.dist-info → rasa_pro-3.13.0.dev8.dist-info}/RECORD +254 -231
  252. rasa/anonymization/__init__.py +0 -2
  253. rasa/anonymization/anonymisation_rule_yaml_reader.py +0 -91
  254. rasa/anonymization/anonymization_pipeline.py +0 -286
  255. rasa/anonymization/anonymization_rule_executor.py +0 -266
  256. rasa/anonymization/anonymization_rule_orchestrator.py +0 -119
  257. rasa/anonymization/schemas/config.yml +0 -47
  258. rasa/anonymization/utils.py +0 -118
  259. rasa/core/channels/inspector/dist/assets/channel-dfa68278.js +0 -1
  260. rasa/core/channels/inspector/dist/assets/clone-edb7f119.js +0 -1
  261. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-96b9c2cf-65e7c670.js +0 -1
  262. rasa/core/channels/inspector/src/helpers/audiostream.ts +0 -191
  263. rasa/core/tracker_store.py +0 -1792
  264. {rasa_pro-3.13.0.dev5.dist-info → rasa_pro-3.13.0.dev8.dist-info}/NOTICE +0 -0
  265. {rasa_pro-3.13.0.dev5.dist-info → rasa_pro-3.13.0.dev8.dist-info}/WHEEL +0 -0
  266. {rasa_pro-3.13.0.dev5.dist-info → rasa_pro-3.13.0.dev8.dist-info}/entry_points.txt +0 -0
@@ -12,86 +12,86 @@ import {
12
12
  useColorModeValue,
13
13
  useTab,
14
14
  useToast,
15
- } from "@chakra-ui/react";
16
- import { Light as SyntaxHighlighter } from "react-syntax-highlighter";
17
- import { useOurTheme } from "../theme";
18
- import { Event, Slot } from "../types";
19
- import { formatTestCases } from "../helpers/formatters";
20
- import { useCopyToClipboard } from "usehooks-ts";
21
- import { useEffect } from "react";
22
- import { FullscreenButton } from "./FullscreenButton";
23
- import { SlotTable, Slots } from "./Slots";
15
+ } from '@chakra-ui/react'
16
+ import { Light as SyntaxHighlighter } from 'react-syntax-highlighter'
17
+ import { useOurTheme } from '../theme'
18
+ import { Event, Slot } from '../types'
19
+ import { formatTestCases } from '../helpers/formatters'
20
+ import { useCopyToClipboard } from 'usehooks-ts'
21
+ import { useEffect } from 'react'
22
+ import { FullscreenButton } from './FullscreenButton'
23
+ import { SlotTable, Slots } from './Slots'
24
24
 
25
25
  interface Props extends FlexProps {
26
- rasaChatSessionId?: string;
27
- events: Event[];
28
- story: string;
29
- slots: Slot[];
26
+ rasaChatSessionId?: string
27
+ events: Event[]
28
+ story: string
29
+ slots: Slot[]
30
30
  }
31
31
 
32
32
  export const DialougeInformation = ({
33
33
  sx,
34
- rasaChatSessionId = "-",
34
+ rasaChatSessionId = '-',
35
35
  events,
36
36
  story,
37
37
  slots,
38
38
  ...props
39
39
  }: Props) => {
40
- const toast = useToast();
41
- const { rasaSpace, rasaFontSizes } = useOurTheme();
42
- const [copiedText, copyToClipboard] = useCopyToClipboard();
40
+ const toast = useToast()
41
+ const { rasaSpace, rasaFontSizes } = useOurTheme()
42
+ const [copiedText, copyToClipboard] = useCopyToClipboard()
43
43
 
44
44
  const containerSx = {
45
45
  ...sx,
46
46
  p: 0,
47
- flexDirection: "column",
48
- };
47
+ flexDirection: 'column',
48
+ }
49
49
  const tabsSx = {
50
- height: "100%",
51
- display: "flex",
52
- flexDirection: "column",
53
- };
50
+ height: '100%',
51
+ display: 'flex',
52
+ flexDirection: 'column',
53
+ }
54
54
  const tabListSx = {
55
55
  px: rasaSpace[1],
56
56
  py: rasaSpace[0.5],
57
- borderBottom: "1px solid",
58
- borderColor: useColorModeValue("neutral.400", "neutral.400"),
59
- };
57
+ borderBottom: '1px solid',
58
+ borderColor: useColorModeValue('neutral.400', 'neutral.400'),
59
+ }
60
60
  const tabPanelSx = {
61
- height: "100%",
62
- overflow: "hidden",
61
+ height: '100%',
62
+ overflow: 'hidden',
63
63
  padding: rasaSpace[0.5],
64
- position: "relative",
65
- };
64
+ position: 'relative',
65
+ }
66
66
  const overflowBox = {
67
- height: "100%",
68
- overflow: "auto",
67
+ height: '100%',
68
+ overflow: 'auto',
69
69
  padding: rasaSpace[0.5],
70
- };
70
+ }
71
71
  const highlighterSx = {
72
- background: useColorModeValue("neutral.50", "neutral.50"),
72
+ background: useColorModeValue('neutral.50', 'neutral.50'),
73
73
  fontSize: rasaFontSizes.sm,
74
- letterSpacing: "0",
75
- };
74
+ letterSpacing: '0',
75
+ }
76
76
  const buttonsProps = {
77
- position: "absolute",
78
- bg: useColorModeValue("neutral.50", "neutral.50"),
77
+ position: 'absolute',
78
+ bg: useColorModeValue('neutral.50', 'neutral.50'),
79
79
  right: rasaSpace[1],
80
80
  bottom: rasaSpace[1],
81
- };
81
+ }
82
82
 
83
83
  useEffect(() => {
84
- if (toast.isActive("copy-to-clipboard") || !copiedText) return;
84
+ if (toast.isActive('copy-to-clipboard') || !copiedText) return
85
85
  toast({
86
- id: "copy-to-clipboard",
87
- title: "Text copied to clipboard",
88
- status: "success",
86
+ id: 'copy-to-clipboard',
87
+ title: 'Text copied to clipboard',
88
+ status: 'success',
89
89
  duration: 2000,
90
90
  isClosable: true,
91
- });
92
- }, [copiedText, toast]);
91
+ })
92
+ }, [copiedText, toast])
93
93
 
94
- const testCases = formatTestCases(events, rasaChatSessionId);
94
+ const testCases = formatTestCases(events, rasaChatSessionId)
95
95
 
96
96
  return (
97
97
  <Flex sx={containerSx} {...props}>
@@ -163,25 +163,25 @@ export const DialougeInformation = ({
163
163
  </TabPanels>
164
164
  </Tabs>
165
165
  </Flex>
166
- );
167
- };
166
+ )
167
+ }
168
168
 
169
169
  const CustomTab = (props: TabProps) => {
170
- const { rasaRadii } = useOurTheme();
171
- const tabProps = useTab(props);
172
- const isSelected = !!tabProps["aria-selected"];
173
- const variant = isSelected ? "solidRasa" : "ghost";
174
- const selectedColor = useColorModeValue("neutral.50", "neutral.50");
175
- const unselectedColor = useColorModeValue("neutral.900", "neutral.900");
170
+ const { rasaRadii } = useOurTheme()
171
+ const tabProps = useTab(props)
172
+ const isSelected = !!tabProps['aria-selected']
173
+ const variant = isSelected ? 'solidRasa' : 'ghost'
174
+ const selectedColor = useColorModeValue('neutral.50', 'neutral.50')
175
+ const unselectedColor = useColorModeValue('neutral.900', 'neutral.900')
176
176
 
177
177
  const buttonSx = {
178
178
  borderRadius: rasaRadii.full,
179
179
  color: isSelected ? selectedColor : unselectedColor,
180
- };
180
+ }
181
181
 
182
182
  return (
183
183
  <Button sx={buttonSx} variant={variant} {...tabProps} size="sm">
184
184
  {tabProps.children}
185
185
  </Button>
186
- );
187
- };
186
+ )
187
+ }
@@ -12,15 +12,15 @@ import {
12
12
  useColorModeValue,
13
13
  Flex,
14
14
  Tooltip,
15
- } from "@chakra-ui/react";
16
- import { useOurTheme } from "../theme";
17
- import { Stack } from "../types";
18
- import { shouldShowTooltip } from "../helpers/utils";
15
+ } from '@chakra-ui/react'
16
+ import { useOurTheme } from '../theme'
17
+ import { Stack } from '../types'
18
+ import { shouldShowTooltip } from '../helpers/utils'
19
19
 
20
20
  interface Props extends FlexProps {
21
- stack: Stack[];
22
- active?: Stack;
23
- onItemClick?: (stack: Stack) => void;
21
+ stack: Stack[]
22
+ active?: Stack
23
+ onItemClick?: (stack: Stack) => void
24
24
  }
25
25
 
26
26
  function StackRow({
@@ -29,32 +29,34 @@ function StackRow({
29
29
  selectable,
30
30
  onItemClick,
31
31
  }: {
32
- stack: Stack;
33
- highlighted?: boolean;
34
- selectable?: boolean;
35
- onItemClick?: (stack: Stack) => void;
32
+ stack: Stack
33
+ highlighted?: boolean
34
+ selectable?: boolean
35
+ onItemClick?: (stack: Stack) => void
36
36
  }) {
37
37
  // use pointy hand cursor when hovering over a row
38
38
  const clickableTrSx = {
39
39
  _hover: {
40
- cursor: "pointer",
40
+ cursor: 'pointer',
41
41
  },
42
- };
42
+ }
43
43
 
44
44
  const highlightedTrSx = {
45
45
  td: {
46
- bg: useColorModeValue("warning.50", "warning.50"),
46
+ bg: useColorModeValue('warning.50', 'warning.50'),
47
47
  },
48
48
  _last: {
49
49
  td: {
50
- border: "none",
50
+ border: 'none',
51
51
  },
52
52
  },
53
- };
53
+ }
54
54
 
55
55
  return (
56
56
  <Tr
57
- sx={highlighted ? highlightedTrSx : selectable ? clickableTrSx : undefined}
57
+ sx={
58
+ highlighted ? highlightedTrSx : selectable ? clickableTrSx : undefined
59
+ }
58
60
  onClick={() => onItemClick?.(stack)}
59
61
  >
60
62
  <Td>
@@ -72,7 +74,7 @@ function StackRow({
72
74
  )}
73
75
  </Td>
74
76
  </Tr>
75
- );
77
+ )
76
78
  }
77
79
 
78
80
  export const DialogueStack = ({
@@ -82,20 +84,20 @@ export const DialogueStack = ({
82
84
  onItemClick,
83
85
  ...props
84
86
  }: Props) => {
85
- const { rasaSpace } = useOurTheme();
87
+ const { rasaSpace } = useOurTheme()
86
88
 
87
89
  const containerSx = {
88
90
  ...sx,
89
91
  pr: 0,
90
92
  pb: 0,
91
- flexDirection: "column",
92
- };
93
+ flexDirection: 'column',
94
+ }
93
95
  const overflowBox = {
94
- height: "100%",
95
- overflow: "auto",
96
+ height: '100%',
97
+ overflow: 'auto',
96
98
  pr: rasaSpace[1],
97
99
  pb: rasaSpace[0.5],
98
- };
100
+ }
99
101
 
100
102
  return (
101
103
  <Flex sx={containerSx} {...props}>
@@ -126,11 +128,18 @@ export const DialogueStack = ({
126
128
  />
127
129
  ))}
128
130
  {stack.length === 0 && (
129
- <StackRow stack={{ frame_id: "-", flow_id: "-", step_id: "-", ended: false }} />
131
+ <StackRow
132
+ stack={{
133
+ frame_id: '-',
134
+ flow_id: '-',
135
+ step_id: '-',
136
+ ended: false,
137
+ }}
138
+ />
130
139
  )}
131
140
  </Tbody>
132
141
  </Table>
133
142
  </Box>
134
143
  </Flex>
135
- );
136
- };
144
+ )
145
+ }
@@ -1,4 +1,4 @@
1
- import { Box, BoxProps, useColorModeValue } from "@chakra-ui/react";
1
+ import { Box, BoxProps, useColorModeValue } from '@chakra-ui/react'
2
2
 
3
3
  export const ExpandIcon = (props: BoxProps) => {
4
4
  return (
@@ -7,10 +7,10 @@ export const ExpandIcon = (props: BoxProps) => {
7
7
  xmlns="http://www.w3.org/2000/svg"
8
8
  height="1em"
9
9
  viewBox="0 0 448 512"
10
- fill={useColorModeValue("rasaPurple.500", "rasaPurple.500")}
10
+ fill={useColorModeValue('rasaPurple.500', 'rasaPurple.500')}
11
11
  {...props}
12
12
  >
13
13
  <path d="M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zm32 320c0-17.7-14.3-32-32-32S0 334.3 0 352v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64v-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32h-96zm128 320c0-17.7-14.3-32-32-32s-32 14.3-32 32v64h-64c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32v-96z"></path>
14
14
  </Box>
15
- );
16
- };
15
+ )
16
+ }
@@ -9,15 +9,15 @@ import {
9
9
  ModalOverlay,
10
10
  Tooltip,
11
11
  useDisclosure,
12
- } from "@chakra-ui/react";
13
- import { ExpandIcon } from "./ExpandIcon";
12
+ } from '@chakra-ui/react'
13
+ import { ExpandIcon } from './ExpandIcon'
14
14
 
15
- interface Props extends Omit<IconButtonProps, "aria-label"> {
16
- title: string;
15
+ interface Props extends Omit<IconButtonProps, 'aria-label'> {
16
+ title: string
17
17
  }
18
18
 
19
19
  export const FullscreenButton = ({ title, children, ...props }: Props) => {
20
- const { isOpen, onOpen, onClose } = useDisclosure();
20
+ const { isOpen, onOpen, onClose } = useDisclosure()
21
21
 
22
22
  return (
23
23
  <>
@@ -41,5 +41,5 @@ export const FullscreenButton = ({ title, children, ...props }: Props) => {
41
41
  </ModalContent>
42
42
  </Modal>
43
43
  </>
44
- );
45
- };
44
+ )
45
+ }
@@ -1,22 +1,38 @@
1
- import { Center, Spinner, Text, Button, useColorModeValue } from "@chakra-ui/react";
2
- import { useOurTheme } from "../theme";
3
- import {createAudioConnection} from "../helpers/audiostream.ts";
1
+ import {
2
+ Center,
3
+ Spinner,
4
+ Text,
5
+ Button,
6
+ useColorModeValue,
7
+ } from '@chakra-ui/react'
8
+ import { useOurTheme } from '../theme'
9
+ import { createAudioConnection } from '../helpers/audio/audiostream.ts'
4
10
 
5
11
  export const LoadingSpinner = () => {
6
- const { rasaSpace } = useOurTheme();
7
- const isVoice = window.location.href.includes("browser_audio");
8
- const text = isVoice ? "Start a new conversation" : "Waiting for a new conversation"
12
+ const { rasaSpace } = useOurTheme()
13
+ const isVoice = window.location.href.includes('browser_audio')
14
+ const text = isVoice
15
+ ? 'Start a new conversation'
16
+ : 'Waiting for a new conversation'
9
17
  return (
10
- <Center height={"100vh"} flexDirection="column">
18
+ <Center height={'100vh'} flexDirection="column">
11
19
  <Spinner
12
20
  speed="1s"
13
- emptyColor={useColorModeValue("neutral.500", "neutral.500")}
14
- color={useColorModeValue("rasaPurple.800", "rasaPurple.800")}
21
+ emptyColor={useColorModeValue('neutral.500', 'neutral.500')}
22
+ color={useColorModeValue('rasaPurple.800', 'rasaPurple.800')}
15
23
  size="lg"
16
24
  mb={rasaSpace[1]}
17
25
  />
18
26
  <Text fontSize="lg">{text}</Text>
19
- {isVoice ? <Button onClick={async () => await createAudioConnection(window.location.href)}>Go</Button> : null}
27
+ {isVoice ? (
28
+ <Button
29
+ onClick={async () =>
30
+ await createAudioConnection(window.location.href)
31
+ }
32
+ >
33
+ Go
34
+ </Button>
35
+ ) : null}
20
36
  </Center>
21
- );
22
- };
37
+ )
38
+ }
@@ -1,15 +1,15 @@
1
- import { Center, CenterProps, Text, useColorModeValue } from "@chakra-ui/react";
2
- import { useOurTheme } from "../theme";
3
- import { SaraDiagrams } from "./SaraDiagrams";
1
+ import { Center, CenterProps, Text, useColorModeValue } from '@chakra-ui/react'
2
+ import { useOurTheme } from '../theme'
3
+ import { SaraDiagrams } from './SaraDiagrams'
4
4
 
5
5
  export const NoActiveFlow = (props: CenterProps) => {
6
- const { rasaSpace, rasaFontSizes } = useOurTheme();
7
- const textColor = useColorModeValue("neutral.700", "neutral.700");
6
+ const { rasaSpace, rasaFontSizes } = useOurTheme()
7
+ const textColor = useColorModeValue('neutral.700', 'neutral.700')
8
8
 
9
9
  return (
10
- <Center height={"100%"} flexDirection="column" {...props}>
10
+ <Center height={'100%'} flexDirection="column" {...props}>
11
11
  <SaraDiagrams mb={rasaSpace[1]} size={220} />
12
- <Text as={"b"} fontSize={rasaFontSizes.lg} mb={rasaSpace[0.5]}>
12
+ <Text as={'b'} fontSize={rasaFontSizes.lg} mb={rasaSpace[0.5]}>
13
13
  No flow is currently active
14
14
  </Text>
15
15
  <Text maxW="21.25rem" color={textColor}>
@@ -17,5 +17,5 @@ export const NoActiveFlow = (props: CenterProps) => {
17
17
  activate one
18
18
  </Text>
19
19
  </Center>
20
- );
21
- };
20
+ )
21
+ }
@@ -1,4 +1,4 @@
1
- import { Box, BoxProps } from "@chakra-ui/react";
1
+ import { Box, BoxProps } from '@chakra-ui/react'
2
2
 
3
3
  export const RasaLogo = (props: BoxProps) => {
4
4
  return (
@@ -28,8 +28,8 @@ export const RasaLogo = (props: BoxProps) => {
28
28
  clipRule="evenodd"
29
29
  ></path>
30
30
  </Box>
31
- );
32
- };
31
+ )
32
+ }
33
33
 
34
34
  export const RasaLogoDark = (props: BoxProps) => {
35
35
  return (
@@ -59,5 +59,5 @@ export const RasaLogoDark = (props: BoxProps) => {
59
59
  clipRule="evenodd"
60
60
  ></path>
61
61
  </Box>
62
- );
63
- };
62
+ )
63
+ }
@@ -1,68 +1,63 @@
1
1
  // RecruitmentPanel.tsx
2
- import {
3
- Box,
4
- Flex,
5
- Heading,
6
- IconButton,
7
- Text,
8
- Button,
9
- } from "@chakra-ui/react";
10
- import { CloseIcon } from "@chakra-ui/icons";
11
- import { useOurTheme } from "../theme";
2
+ import { Box, Flex, Heading, IconButton, Text, Button } from '@chakra-ui/react'
3
+ import { CloseIcon } from '@chakra-ui/icons'
4
+ import { useOurTheme } from '../theme'
12
5
 
13
6
  interface RecruitmentPanelProps {
14
- onClose: () => void;
7
+ onClose: () => void
15
8
  }
16
9
 
17
- export const RecruitmentPanel: React.FC<RecruitmentPanelProps> = ({ onClose }) => {
18
- const { rasaRadii } = useOurTheme();
10
+ export const RecruitmentPanel: React.FC<RecruitmentPanelProps> = ({
11
+ onClose,
12
+ }) => {
13
+ const { rasaRadii } = useOurTheme()
19
14
 
20
- const textColor = "white";
21
- const iconColor = "white";
15
+ const textColor = 'white'
16
+ const iconColor = 'white'
22
17
 
23
- const boxSx = {
24
- borderRadius: rasaRadii.normal,
25
- padding: "1rem",
26
- bgGradient: "linear(to-b, #4E61E1, #7622D2)",
27
- color: textColor,
28
- };
18
+ const boxSx = {
19
+ borderRadius: rasaRadii.normal,
20
+ padding: '1rem',
21
+ bgGradient: 'linear(to-b, #4E61E1, #7622D2)',
22
+ color: textColor,
23
+ }
29
24
 
30
- return (
31
- <Box sx={boxSx}>
32
- <Flex justify="space-between" align="center">
33
- <Flex align="center">
34
- <Heading as="h3" size="lg" fontWeight="bold" color={textColor}>
35
- Help us Improve Rasa Pro!
36
- </Heading>
37
- </Flex>
38
- <IconButton
39
- aria-label="Close"
40
- icon={<CloseIcon color={iconColor} />}
41
- size="sm"
42
- onClick={onClose}
43
- bg="transparent"
44
- _hover={{ bg: "rgba(255, 255, 255, 0.2)" }}
45
- />
46
- </Flex>
47
- <Flex align="center" mt="0.5rem" justify="space-between">
48
- <Text fontSize="sm" color={textColor}>
49
- We're looking for users to share their feedback.
50
- </Text>
51
- <Button
52
- as="a"
53
- href="https://calendly.com/alvaro-rasa/rasa-pro-installation"
54
- target="_blank"
55
- rel="noopener noreferrer"
56
- color="#7622D2"
57
- bg="white"
58
- fontWeight="bold"
59
- ml="1rem"
60
- size="sm"
61
- _hover={{ bg: "whiteAlpha.800" }}
62
- >
63
- Sign up
64
- </Button>
65
- </Flex>
66
- </Box>
67
- );
68
- };
25
+ return (
26
+ <Box sx={boxSx}>
27
+ <Flex justify="space-between" align="center">
28
+ <Flex align="center">
29
+ <Heading as="h3" size="lg" fontWeight="bold" color={textColor}>
30
+ Help us Improve Rasa Pro!
31
+ </Heading>
32
+ </Flex>
33
+ <IconButton
34
+ aria-label="Close"
35
+ icon={<CloseIcon color={iconColor} />}
36
+ size="sm"
37
+ onClick={onClose}
38
+ bg="transparent"
39
+ _hover={{ bg: 'rgba(255, 255, 255, 0.2)' }}
40
+ />
41
+ </Flex>
42
+ <Flex align="center" mt="0.5rem" justify="space-between">
43
+ <Text fontSize="sm" color={textColor}>
44
+ We're looking for users to share their feedback.
45
+ </Text>
46
+ <Button
47
+ as="a"
48
+ href="https://calendly.com/alvaro-rasa/rasa-pro-installation"
49
+ target="_blank"
50
+ rel="noopener noreferrer"
51
+ color="#7622D2"
52
+ bg="white"
53
+ fontWeight="bold"
54
+ ml="1rem"
55
+ size="sm"
56
+ _hover={{ bg: 'whiteAlpha.800' }}
57
+ >
58
+ Sign up
59
+ </Button>
60
+ </Flex>
61
+ </Box>
62
+ )
63
+ }
@@ -1,11 +1,11 @@
1
- import { Box, BoxProps } from "@chakra-ui/react";
1
+ import { Box, BoxProps } from '@chakra-ui/react'
2
2
 
3
3
  interface Props extends BoxProps {
4
- size?: number;
4
+ size?: number
5
5
  }
6
6
 
7
7
  export const SaraDiagrams = (props: Props) => {
8
- const { size = 440, ...otherProps } = props;
8
+ const { size = 440, ...otherProps } = props
9
9
 
10
10
  return (
11
11
  <Box
@@ -35,5 +35,5 @@ export const SaraDiagrams = (props: Props) => {
35
35
  />
36
36
  </defs>
37
37
  </Box>
38
- );
39
- };
38
+ )
39
+ }