rasa-pro 3.11.1__py3-none-any.whl → 3.11.2__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 (55) hide show
  1. rasa/cli/llm_fine_tuning.py +19 -11
  2. rasa/cli/project_templates/tutorial/config.yml +1 -3
  3. rasa/cli/project_templates/tutorial/endpoints.yml +8 -3
  4. rasa/cli/train.py +9 -0
  5. rasa/core/channels/inspector/dist/assets/{arc-bc141fb2.js → arc-861ddd57.js} +1 -1
  6. rasa/core/channels/inspector/dist/assets/{c4Diagram-d0fbc5ce-be2db283.js → c4Diagram-d0fbc5ce-921f02db.js} +1 -1
  7. rasa/core/channels/inspector/dist/assets/{classDiagram-936ed81e-55366915.js → classDiagram-936ed81e-b436c4f8.js} +1 -1
  8. rasa/core/channels/inspector/dist/assets/{classDiagram-v2-c3cb15f1-bb529518.js → classDiagram-v2-c3cb15f1-511a23cb.js} +1 -1
  9. rasa/core/channels/inspector/dist/assets/{createText-62fc7601-b0ec81d6.js → createText-62fc7601-ef476ecd.js} +1 -1
  10. rasa/core/channels/inspector/dist/assets/{edges-f2ad444c-6166330c.js → edges-f2ad444c-f1878e0a.js} +1 -1
  11. rasa/core/channels/inspector/dist/assets/{erDiagram-9d236eb7-5ccc6a8e.js → erDiagram-9d236eb7-fac75185.js} +1 -1
  12. rasa/core/channels/inspector/dist/assets/{flowDb-1972c806-fca3bfe4.js → flowDb-1972c806-201c5bbc.js} +1 -1
  13. rasa/core/channels/inspector/dist/assets/{flowDiagram-7ea5b25a-4739080f.js → flowDiagram-7ea5b25a-f904ae41.js} +1 -1
  14. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-b080d6f2.js +1 -0
  15. rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-abe16c3d-7c1b0e0f.js → flowchart-elk-definition-abe16c3d-1813da66.js} +1 -1
  16. rasa/core/channels/inspector/dist/assets/{ganttDiagram-9b5ea136-772fd050.js → ganttDiagram-9b5ea136-872af172.js} +1 -1
  17. rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-99d0ae7c-8eae1dc9.js → gitGraphDiagram-99d0ae7c-34a0af5a.js} +1 -1
  18. rasa/core/channels/inspector/dist/assets/{index-2c4b9a3b-f55afcdf.js → index-2c4b9a3b-42ba3e3d.js} +1 -1
  19. rasa/core/channels/inspector/dist/assets/{index-e7cef9de.js → index-37817b51.js} +68 -68
  20. rasa/core/channels/inspector/dist/assets/{infoDiagram-736b4530-124d4a14.js → infoDiagram-736b4530-6b731386.js} +1 -1
  21. rasa/core/channels/inspector/dist/assets/{journeyDiagram-df861f2b-7c4fae44.js → journeyDiagram-df861f2b-e8579ac6.js} +1 -1
  22. rasa/core/channels/inspector/dist/assets/{layout-b9885fb6.js → layout-89e6403a.js} +1 -1
  23. rasa/core/channels/inspector/dist/assets/{line-7c59abb6.js → line-dc73d3fc.js} +1 -1
  24. rasa/core/channels/inspector/dist/assets/{linear-4776f780.js → linear-f5b1d2bc.js} +1 -1
  25. rasa/core/channels/inspector/dist/assets/{mindmap-definition-beec6740-2332c46c.js → mindmap-definition-beec6740-82cb74fa.js} +1 -1
  26. rasa/core/channels/inspector/dist/assets/{pieDiagram-dbbf0591-8fb39303.js → pieDiagram-dbbf0591-bdf5f29b.js} +1 -1
  27. rasa/core/channels/inspector/dist/assets/{quadrantDiagram-4d7f4fd6-3c7180a2.js → quadrantDiagram-4d7f4fd6-c7a0cbe4.js} +1 -1
  28. rasa/core/channels/inspector/dist/assets/{requirementDiagram-6fc4c22a-e910bcb8.js → requirementDiagram-6fc4c22a-7ec5410f.js} +1 -1
  29. rasa/core/channels/inspector/dist/assets/{sankeyDiagram-8f13d901-ead16c89.js → sankeyDiagram-8f13d901-caee5554.js} +1 -1
  30. rasa/core/channels/inspector/dist/assets/{sequenceDiagram-b655622a-29a02a19.js → sequenceDiagram-b655622a-2935f8db.js} +1 -1
  31. rasa/core/channels/inspector/dist/assets/{stateDiagram-59f0c015-042b3137.js → stateDiagram-59f0c015-8f5d9693.js} +1 -1
  32. rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-2b26beab-2178c0f3.js → stateDiagram-v2-2b26beab-d565d1de.js} +1 -1
  33. rasa/core/channels/inspector/dist/assets/{styles-080da4f6-23ffa4fc.js → styles-080da4f6-75ad421d.js} +1 -1
  34. rasa/core/channels/inspector/dist/assets/{styles-3dcbcfbf-94f59763.js → styles-3dcbcfbf-7e764226.js} +1 -1
  35. rasa/core/channels/inspector/dist/assets/{styles-9c745c82-78a6bebc.js → styles-9c745c82-7a4e0e61.js} +1 -1
  36. rasa/core/channels/inspector/dist/assets/{svgDrawCommon-4835440b-eae2a6f6.js → svgDrawCommon-4835440b-4019d1bf.js} +1 -1
  37. rasa/core/channels/inspector/dist/assets/{timeline-definition-5b62e21b-5c968d92.js → timeline-definition-5b62e21b-01ea12df.js} +1 -1
  38. rasa/core/channels/inspector/dist/assets/{xychartDiagram-2b33534f-fd3db0d5.js → xychartDiagram-2b33534f-89407137.js} +1 -1
  39. rasa/core/channels/inspector/dist/index.html +1 -1
  40. rasa/core/channels/inspector/src/components/LoadingSpinner.tsx +1 -1
  41. rasa/core/channels/inspector/src/helpers/audiostream.ts +28 -2
  42. rasa/core/channels/voice_stream/asr/azure.py +6 -5
  43. rasa/core/utils.py +3 -1
  44. rasa/e2e_test/assertions.py +52 -5
  45. rasa/e2e_test/e2e_test_runner.py +2 -1
  46. rasa/engine/graph.py +9 -3
  47. rasa/engine/validation.py +54 -6
  48. rasa/shared/constants.py +5 -0
  49. rasa/version.py +1 -1
  50. {rasa_pro-3.11.1.dist-info → rasa_pro-3.11.2.dist-info}/METADATA +1 -1
  51. {rasa_pro-3.11.1.dist-info → rasa_pro-3.11.2.dist-info}/RECORD +54 -54
  52. rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-736177bf.js +0 -1
  53. {rasa_pro-3.11.1.dist-info → rasa_pro-3.11.2.dist-info}/NOTICE +0 -0
  54. {rasa_pro-3.11.1.dist-info → rasa_pro-3.11.2.dist-info}/WHEEL +0 -0
  55. {rasa_pro-3.11.1.dist-info → rasa_pro-3.11.2.dist-info}/entry_points.txt +0 -0
@@ -1,4 +1,4 @@
1
- import{Z as zt,$ as ot,X as wt,W as Ft,s as Nt,g as Xt,B as Yt,D as St,a as Ht,b as $t,E as Ut,l as Ct,U as qt,i as jt,d as Gt}from"./index-e7cef9de.js";import{c as Qt}from"./createText-62fc7601-b0ec81d6.js";import{i as Kt}from"./init-77b53fdd.js";import{o as Zt}from"./ordinal-ba9b4969.js";import{l as ft}from"./linear-4776f780.js";import{l as pt}from"./line-7c59abb6.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function Jt(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function st(){var e=Zt().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,c,f=!1,d=0,R=0,_=.5;delete e.unknown;function A(){var m=t().length,T=n<s,S=T?n:s,P=T?s:n;o=(P-S)/Math.max(1,m-d+R*2),f&&(o=Math.floor(o)),S+=(P-S-o*(m-d))*_,c=o*(1-d),f&&(S=Math.round(S),c=Math.round(c));var p=Jt(m).map(function(C){return S+o*C});return i(T?p.reverse():p)}return e.domain=function(m){return arguments.length?(t(m),A()):t()},e.range=function(m){return arguments.length?([s,n]=m,s=+s,n=+n,A()):[s,n]},e.rangeRound=function(m){return[s,n]=m,s=+s,n=+n,f=!0,A()},e.bandwidth=function(){return c},e.step=function(){return o},e.round=function(m){return arguments.length?(f=!!m,A()):f},e.padding=function(m){return arguments.length?(d=Math.min(1,R=+m),A()):d},e.paddingInner=function(m){return arguments.length?(d=Math.min(1,m),A()):d},e.paddingOuter=function(m){return arguments.length?(R=+m,A()):R},e.align=function(m){return arguments.length?(_=Math.max(0,Math.min(1,m)),A()):_},e.copy=function(){return st(t(),[s,n]).round(f).paddingInner(d).paddingOuter(R).align(_)},Kt.apply(A(),arguments)}var nt=function(){var e=function(V,r,l,u){for(l=l||{},u=V.length;u--;l[V[u]]=r);return l},t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],c=[1,7],f=[1,5,10,12,14,16,18,19,21,23,34,35,36],d=[1,25],R=[1,26],_=[1,28],A=[1,29],m=[1,30],T=[1,31],S=[1,32],P=[1,33],p=[1,34],C=[1,35],h=[1,36],L=[1,37],z=[1,43],lt=[1,42],ct=[1,47],$=[1,50],w=[1,10,12,14,16,18,19,21,23,34,35,36],Q=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],ut=[1,64],K={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:function(r,l,u,g,b,a,F){var x=a.length-1;switch(b){case 5:g.setOrientation(a[x]);break;case 9:g.setDiagramTitle(a[x].text.trim());break;case 12:g.setLineData({text:"",type:"text"},a[x]);break;case 13:g.setLineData(a[x-1],a[x]);break;case 14:g.setBarData({text:"",type:"text"},a[x]);break;case 15:g.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),g.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),g.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:g.setXAxisTitle(a[x]);break;case 23:g.setXAxisTitle(a[x-1]);break;case 24:g.setXAxisTitle({type:"text",text:""});break;case 25:g.setXAxisBand(a[x]);break;case 26:g.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:g.setYAxisTitle(a[x]);break;case 31:g.setYAxisTitle(a[x-1]);break;case 32:g.setYAxisTitle({type:"text",text:""});break;case 33:g.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(f,[2,34]),e(f,[2,35]),e(f,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:c}),{1:[2,3]},e(f,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:c}),{11:23,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{11:39,13:38,24:z,27:lt,29:40,30:41,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{11:45,15:44,27:ct,33:46,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{11:49,17:48,24:$,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{11:52,17:51,24:$,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{20:[1,53]},{22:[1,54]},e(w,[2,18]),{1:[2,2]},e(w,[2,8]),e(w,[2,9]),e(Q,[2,37],{40:55,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L}),e(Q,[2,38]),e(Q,[2,39]),e(E,[2,40]),e(E,[2,42]),e(E,[2,43]),e(E,[2,44]),e(E,[2,45]),e(E,[2,46]),e(E,[2,47]),e(E,[2,48]),e(E,[2,49]),e(E,[2,50]),e(E,[2,51]),e(w,[2,10]),e(w,[2,22],{30:41,29:56,24:z,27:lt}),e(w,[2,24]),e(w,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},e(w,[2,11]),e(w,[2,30],{33:60,27:ct}),e(w,[2,32]),{31:[1,61]},e(w,[2,12]),{17:62,24:$},{25:63,27:ut},e(w,[2,14]),{17:65,24:$},e(w,[2,16]),e(w,[2,17]),e(E,[2,41]),e(w,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(w,[2,31]),{27:[1,69]},e(w,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(w,[2,15]),e(w,[2,26]),e(w,[2,27]),{11:59,32:72,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},e(w,[2,33]),e(w,[2,19]),{25:73,27:ut},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:function(r,l){if(l.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=l,u}},parse:function(r){var l=this,u=[0],g=[],b=[null],a=[],F=this.table,x="",U=0,gt=0,Vt=2,xt=1,Bt=a.slice.call(arguments,1),k=Object.create(this.lexer),B={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(B.yy[J]=this.yy[J]);k.setInput(r,B.yy),B.yy.lexer=k,B.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var tt=k.yylloc;a.push(tt);var Wt=k.options&&k.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var I;return I=g.pop()||k.lex()||xt,typeof I!="number"&&(I instanceof Array&&(g=I,I=g.pop()),I=l.symbols_[I]||I),I}for(var D,W,v,it,O={},q,M,dt,j;;){if(W=u[u.length-1],this.defaultActions[W]?v=this.defaultActions[W]:((D===null||typeof D>"u")&&(D=Ot()),v=F[W]&&F[W][D]),typeof v>"u"||!v.length||!v[0]){var et="";j=[];for(q in F[W])this.terminals_[q]&&q>Vt&&j.push("'"+this.terminals_[q]+"'");k.showPosition?et="Parse error on line "+(U+1)+`:
1
+ import{Z as zt,$ as ot,X as wt,W as Ft,s as Nt,g as Xt,B as Yt,D as St,a as Ht,b as $t,E as Ut,l as Ct,U as qt,i as jt,d as Gt}from"./index-37817b51.js";import{c as Qt}from"./createText-62fc7601-ef476ecd.js";import{i as Kt}from"./init-77b53fdd.js";import{o as Zt}from"./ordinal-ba9b4969.js";import{l as ft}from"./linear-f5b1d2bc.js";import{l as pt}from"./line-dc73d3fc.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function Jt(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function st(){var e=Zt().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,c,f=!1,d=0,R=0,_=.5;delete e.unknown;function A(){var m=t().length,T=n<s,S=T?n:s,P=T?s:n;o=(P-S)/Math.max(1,m-d+R*2),f&&(o=Math.floor(o)),S+=(P-S-o*(m-d))*_,c=o*(1-d),f&&(S=Math.round(S),c=Math.round(c));var p=Jt(m).map(function(C){return S+o*C});return i(T?p.reverse():p)}return e.domain=function(m){return arguments.length?(t(m),A()):t()},e.range=function(m){return arguments.length?([s,n]=m,s=+s,n=+n,A()):[s,n]},e.rangeRound=function(m){return[s,n]=m,s=+s,n=+n,f=!0,A()},e.bandwidth=function(){return c},e.step=function(){return o},e.round=function(m){return arguments.length?(f=!!m,A()):f},e.padding=function(m){return arguments.length?(d=Math.min(1,R=+m),A()):d},e.paddingInner=function(m){return arguments.length?(d=Math.min(1,m),A()):d},e.paddingOuter=function(m){return arguments.length?(R=+m,A()):R},e.align=function(m){return arguments.length?(_=Math.max(0,Math.min(1,m)),A()):_},e.copy=function(){return st(t(),[s,n]).round(f).paddingInner(d).paddingOuter(R).align(_)},Kt.apply(A(),arguments)}var nt=function(){var e=function(V,r,l,u){for(l=l||{},u=V.length;u--;l[V[u]]=r);return l},t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],c=[1,7],f=[1,5,10,12,14,16,18,19,21,23,34,35,36],d=[1,25],R=[1,26],_=[1,28],A=[1,29],m=[1,30],T=[1,31],S=[1,32],P=[1,33],p=[1,34],C=[1,35],h=[1,36],L=[1,37],z=[1,43],lt=[1,42],ct=[1,47],$=[1,50],w=[1,10,12,14,16,18,19,21,23,34,35,36],Q=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],ut=[1,64],K={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:function(r,l,u,g,b,a,F){var x=a.length-1;switch(b){case 5:g.setOrientation(a[x]);break;case 9:g.setDiagramTitle(a[x].text.trim());break;case 12:g.setLineData({text:"",type:"text"},a[x]);break;case 13:g.setLineData(a[x-1],a[x]);break;case 14:g.setBarData({text:"",type:"text"},a[x]);break;case 15:g.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),g.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),g.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:g.setXAxisTitle(a[x]);break;case 23:g.setXAxisTitle(a[x-1]);break;case 24:g.setXAxisTitle({type:"text",text:""});break;case 25:g.setXAxisBand(a[x]);break;case 26:g.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:g.setYAxisTitle(a[x]);break;case 31:g.setYAxisTitle(a[x-1]);break;case 32:g.setYAxisTitle({type:"text",text:""});break;case 33:g.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(f,[2,34]),e(f,[2,35]),e(f,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:c}),{1:[2,3]},e(f,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:c}),{11:23,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{11:39,13:38,24:z,27:lt,29:40,30:41,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{11:45,15:44,27:ct,33:46,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{11:49,17:48,24:$,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{11:52,17:51,24:$,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},{20:[1,53]},{22:[1,54]},e(w,[2,18]),{1:[2,2]},e(w,[2,8]),e(w,[2,9]),e(Q,[2,37],{40:55,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L}),e(Q,[2,38]),e(Q,[2,39]),e(E,[2,40]),e(E,[2,42]),e(E,[2,43]),e(E,[2,44]),e(E,[2,45]),e(E,[2,46]),e(E,[2,47]),e(E,[2,48]),e(E,[2,49]),e(E,[2,50]),e(E,[2,51]),e(w,[2,10]),e(w,[2,22],{30:41,29:56,24:z,27:lt}),e(w,[2,24]),e(w,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},e(w,[2,11]),e(w,[2,30],{33:60,27:ct}),e(w,[2,32]),{31:[1,61]},e(w,[2,12]),{17:62,24:$},{25:63,27:ut},e(w,[2,14]),{17:65,24:$},e(w,[2,16]),e(w,[2,17]),e(E,[2,41]),e(w,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(w,[2,31]),{27:[1,69]},e(w,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(w,[2,15]),e(w,[2,26]),e(w,[2,27]),{11:59,32:72,37:24,38:d,39:R,40:27,41:_,42:A,43:m,44:T,45:S,46:P,47:p,48:C,49:h,50:L},e(w,[2,33]),e(w,[2,19]),{25:73,27:ut},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:function(r,l){if(l.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=l,u}},parse:function(r){var l=this,u=[0],g=[],b=[null],a=[],F=this.table,x="",U=0,gt=0,Vt=2,xt=1,Bt=a.slice.call(arguments,1),k=Object.create(this.lexer),B={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(B.yy[J]=this.yy[J]);k.setInput(r,B.yy),B.yy.lexer=k,B.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var tt=k.yylloc;a.push(tt);var Wt=k.options&&k.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var I;return I=g.pop()||k.lex()||xt,typeof I!="number"&&(I instanceof Array&&(g=I,I=g.pop()),I=l.symbols_[I]||I),I}for(var D,W,v,it,O={},q,M,dt,j;;){if(W=u[u.length-1],this.defaultActions[W]?v=this.defaultActions[W]:((D===null||typeof D>"u")&&(D=Ot()),v=F[W]&&F[W][D]),typeof v>"u"||!v.length||!v[0]){var et="";j=[];for(q in F[W])this.terminals_[q]&&q>Vt&&j.push("'"+this.terminals_[q]+"'");k.showPosition?et="Parse error on line "+(U+1)+`:
2
2
  `+k.showPosition()+`
3
3
  Expecting `+j.join(", ")+", got '"+(this.terminals_[D]||D)+"'":et="Parse error on line "+(U+1)+": Unexpected "+(D==xt?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(et,{text:k.match,token:this.terminals_[D]||D,line:k.yylineno,loc:tt,expected:j})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+D);switch(v[0]){case 1:u.push(D),b.push(k.yytext),a.push(k.yylloc),u.push(v[1]),D=null,gt=k.yyleng,x=k.yytext,U=k.yylineno,tt=k.yylloc;break;case 2:if(M=this.productions_[v[1]][1],O.$=b[b.length-M],O._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Wt&&(O._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),it=this.performAction.apply(O,[x,gt,U,B.yy,v[1],b,a].concat(Bt)),typeof it<"u")return it;M&&(u=u.slice(0,-1*M*2),b=b.slice(0,-1*M),a=a.slice(0,-1*M)),u.push(this.productions_[v[1]][0]),b.push(O.$),a.push(O._$),dt=F[u[u.length-2]][u[u.length-1]],u.push(dt);break;case 3:return!0}}return!0}},It=function(){var V={EOF:1,parseError:function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},setInput:function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var l=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===g.length?this.yylloc.first_column:0)+g[g.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <link rel="icon" href="data:image/x-icon;base64,AAABAAEAICAQAAEABADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAOwAAADsAAAAEAAAABAAAABxaUwAwoyZAMOJmADBi5kAwoyZAMKMmQDCjJkAwoyZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAAAACV3AAAAAAAAAAAAAAAAAAYXdwAAAAAAAAAAAAAAAANHd3cAAAAAAAEREREREREXd3d3ERAAAAAHd3d3d3d3d3FXd3dwAAAAB3d3d3d3d3dDB3d3cAAAAAd3IiIiIiIiAAIid3AAAAAHdwAAAAAAAAAAAHdwAAAAB3cAAAAAAAAAAAB3cAAAAAd3AAd3AABnd0AAd3AAAAAHdwAHdwADF3QgAHdwAAAAB3cAB3dTMXcSAAB3cAAAAAd3AAd3dxdxMAAAd3AAAAAHdwAHd3d3dGAAAHdwAAAAB3cAB3dHd3dxUAB3cAAAAAd3AAd3A1F3d3AAd3AAAAAHdwAHdwAANXdwAHdwAAAAB3cAB3cAAAAXcAB3cAAAAAd3AAd3d3d3d3AAd3AAAAAHdwAHd3d3d3dwAHdwAAAAB3cAB3d3d3d3cAB3cAAAAAd3AAAAAAAAAAAAd3AAAAAHdwAAAAAAAAAAAHdwAAAAB3cAAAAAAAAAAAB3cAAAAAd3d3d3d3d3d3d3d3AAAAAHd3d3d3d3d3d3d3dwAAAAB3d3d3d3d3d3d3d3cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///5////4f///8H///8B/8AAAD/AAAA/wAAQP8AAcD/H//4/x//+P8ceDj/HHA4/xwAeP8cAPj/HAD4/xwAOP8cQDj/HHg4/xx+OP8cADj/HAA4/xwAOP8f//j/H//4/x//+P8AAAD/AAAA/wAAAP/////////////////////w==" sizes="32x32">
8
8
  <title>Rasa inspector</title>
9
- <script type="module" crossorigin src="./assets/index-e7cef9de.js"></script>
9
+ <script type="module" crossorigin src="./assets/index-37817b51.js"></script>
10
10
  <link rel="stylesheet" href="./assets/index-3ee28881.css">
11
11
  </head>
12
12
 
@@ -16,7 +16,7 @@ export const LoadingSpinner = () => {
16
16
  mb={rasaSpace[1]}
17
17
  />
18
18
  <Text fontSize="lg">{text}</Text>
19
- {isVoice ? <Button onClick={createAudioConnection}>Go</Button> : null}
19
+ {isVoice ? <Button onClick={async () => await createAudioConnection(window.location.href)}>Go</Button> : null}
20
20
  </Center>
21
21
  );
22
22
  };
@@ -156,8 +156,34 @@ const addDataToAudioQueue = (audioQueue: AudioQueue) => (message: MessageEvent<a
156
156
  }
157
157
  }
158
158
 
159
- export async function createAudioConnection() {
160
- const websocketURL = "ws://localhost:5005/webhooks/browser_audio/websocket"
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)
161
187
  const socket = new WebSocket(websocketURL)
162
188
  socket.onopen = async () => { await streamMicrophoneToServer(socket)}
163
189
  const audioQueue = setupAudioPlayback(socket)
@@ -35,10 +35,7 @@ class AzureASR(ASREngine[AzureASRConfig]):
35
35
  self.queue: asyncio.Queue[speechsdk.SpeechRecognitionEventArgs] = (
36
36
  asyncio.Queue()
37
37
  )
38
-
39
- @staticmethod
40
- def validate_environment() -> None:
41
- """Make sure all needed requirements for this component are met."""
38
+ self.main_loop = asyncio.get_running_loop()
42
39
 
43
40
  def signal_user_is_speaking(self, event: Any) -> None:
44
41
  """Replace the azure event with a generic is speaking event."""
@@ -46,7 +43,11 @@ class AzureASR(ASREngine[AzureASRConfig]):
46
43
 
47
44
  def fill_queue(self, event: Any) -> None:
48
45
  """Either puts the event or a dedicated ASR Event into the queue."""
49
- self.queue.put_nowait(event)
46
+ # This function is used by call backs of the azure speech library
47
+ # which seems to run separate threads/processes
48
+ # To properly wake up the task waiting at queue.get, we need to
49
+ # put to the queue in the same event loop
50
+ self.main_loop.call_soon_threadsafe(self.queue.put_nowait, event)
50
51
 
51
52
  async def connect(self) -> None:
52
53
  import azure.cognitiveservices.speech as speechsdk
rasa/core/utils.py CHANGED
@@ -233,7 +233,9 @@ class AvailableEndpoints:
233
233
  self.model_groups = model_groups
234
234
 
235
235
  @classmethod
236
- def get_instance(cls, endpoint_file: Optional[Text] = None) -> "AvailableEndpoints":
236
+ def get_instance(
237
+ cls, endpoint_file: Optional[Text] = DEFAULT_ENDPOINTS_PATH
238
+ ) -> "AvailableEndpoints":
237
239
  """Get the singleton instance of AvailableEndpoints."""
238
240
  # Ensure that the instance is initialized only once.
239
241
  if cls._instance is None:
@@ -453,6 +453,11 @@ class ActionExecutedAssertion(Assertion):
453
453
  **kwargs: Any,
454
454
  ) -> Tuple[Optional[AssertionFailure], Optional[Event]]:
455
455
  """Run the action executed assertion on the given events for that user turn."""
456
+ step_index = kwargs.get("step_index")
457
+ original_turn_events, turn_events = _get_turn_events_based_on_step_index(
458
+ step_index, turn_events, prior_events
459
+ )
460
+
456
461
  try:
457
462
  matching_event = next(
458
463
  event
@@ -465,7 +470,7 @@ class ActionExecutedAssertion(Assertion):
465
470
  error_message += assertion_order_error_message
466
471
 
467
472
  return self._generate_assertion_failure(
468
- error_message, prior_events, turn_events, self.line
473
+ error_message, prior_events, original_turn_events, self.line
469
474
  )
470
475
 
471
476
  return None, matching_event
@@ -520,6 +525,11 @@ class SlotWasSetAssertion(Assertion):
520
525
  """Run the slot_was_set assertion on the given events for that user turn."""
521
526
  matching_event = None
522
527
 
528
+ step_index = kwargs.get("step_index")
529
+ original_turn_events, turn_events = _get_turn_events_based_on_step_index(
530
+ step_index, turn_events, prior_events
531
+ )
532
+
523
533
  for slot in self.slots:
524
534
  matching_events = [
525
535
  event
@@ -558,7 +568,7 @@ class SlotWasSetAssertion(Assertion):
558
568
  error_message += assertion_order_error_message
559
569
 
560
570
  return self._generate_assertion_failure(
561
- error_message, prior_events, turn_events, slot.line
571
+ error_message, prior_events, original_turn_events, slot.line
562
572
  )
563
573
 
564
574
  return None, matching_event
@@ -596,6 +606,11 @@ class SlotWasNotSetAssertion(Assertion):
596
606
  """Run the slot_was_not_set assertion on the given events for that user turn."""
597
607
  matching_event = None
598
608
 
609
+ step_index = kwargs.get("step_index")
610
+ original_turn_events, turn_events = _get_turn_events_based_on_step_index(
611
+ step_index, turn_events, prior_events
612
+ )
613
+
599
614
  for slot in self.slots:
600
615
  matching_events = [
601
616
  event
@@ -631,7 +646,7 @@ class SlotWasNotSetAssertion(Assertion):
631
646
  error_message += assertion_order_error_message
632
647
 
633
648
  return self._generate_assertion_failure(
634
- error_message, prior_events, turn_events, slot.line
649
+ error_message, prior_events, original_turn_events, slot.line
635
650
  )
636
651
 
637
652
  return None, matching_event
@@ -725,6 +740,11 @@ class BotUtteredAssertion(Assertion):
725
740
  matching_event = None
726
741
  error_messages = []
727
742
 
743
+ step_index = kwargs.get("step_index")
744
+ original_turn_events, turn_events = _get_turn_events_based_on_step_index(
745
+ step_index, turn_events, prior_events
746
+ )
747
+
728
748
  if self.utter_name is not None:
729
749
  try:
730
750
  matching_event = next(
@@ -769,7 +789,7 @@ class BotUtteredAssertion(Assertion):
769
789
  error_message = " ".join(error_messages)
770
790
  error_message += assertion_order_error_message
771
791
  return self._generate_assertion_failure(
772
- error_message, prior_events, turn_events, self.line
792
+ error_message, prior_events, original_turn_events, self.line
773
793
  )
774
794
 
775
795
  return None, matching_event
@@ -846,6 +866,11 @@ class BotDidNotUtterAssertion(Assertion):
846
866
  **kwargs: Any,
847
867
  ) -> Tuple[Optional[AssertionFailure], Optional[Event]]:
848
868
  """Checks that the bot did not utter the specified messages or buttons."""
869
+ step_index = kwargs.get("step_index")
870
+ original_turn_events, turn_events = _get_turn_events_based_on_step_index(
871
+ step_index, turn_events, prior_events
872
+ )
873
+
849
874
  for event in turn_events:
850
875
  if isinstance(event, BotUttered):
851
876
  error_messages = []
@@ -867,7 +892,7 @@ class BotDidNotUtterAssertion(Assertion):
867
892
  error_message = " ".join(error_messages)
868
893
  error_message += assertion_order_error_message
869
894
  return self._generate_assertion_failure(
870
- error_message, prior_events, turn_events, self.line
895
+ error_message, prior_events, original_turn_events, self.line
871
896
  )
872
897
  return None, None
873
898
 
@@ -1296,3 +1321,25 @@ def _find_matching_generative_events(turn_events: List[Event]) -> List[BotUttere
1296
1321
  and event.metadata.get(UTTER_SOURCE_METADATA_KEY)
1297
1322
  in ELIGIBLE_UTTER_SOURCE_METADATA
1298
1323
  ]
1324
+
1325
+
1326
+ def _get_turn_events_based_on_step_index(
1327
+ step_index: int, turn_events: List[Event], prior_events: List[Event]
1328
+ ) -> Tuple[List[Event], List[Event]]:
1329
+ """Get the turn events based on the step index.
1330
+
1331
+ For the first step, we need to include the prior events as well
1332
+ in the same user turn. For the subsequent steps, we only need the
1333
+ events that follow the user uttered event on which the tracker
1334
+ was originally sliced by.
1335
+
1336
+ Returns:
1337
+ List[Event]: The copy of turn_events
1338
+ List[Event]: The turn events based on the step index
1339
+
1340
+ """
1341
+ original_turn_events = turn_events[:]
1342
+ if step_index == 0:
1343
+ return original_turn_events, prior_events + turn_events
1344
+
1345
+ return original_turn_events, turn_events
@@ -442,7 +442,7 @@ class E2ETestRunner:
442
442
  assertion_failure_found = False
443
443
  input_metadata = input_metadata if input_metadata else []
444
444
 
445
- for step in test_case.steps:
445
+ for index, step in enumerate(test_case.steps):
446
446
  if not step.assertions:
447
447
  structlogger.debug(
448
448
  "e2e_test_runner.run_assertions.no_assertions.skipping_step",
@@ -490,6 +490,7 @@ class E2ETestRunner:
490
490
  assertion_order_error_message=assertion_order_error_msg,
491
491
  llm_judge_config=self.llm_judge_config,
492
492
  step_text=step.text,
493
+ step_index=index,
493
494
  )
494
495
 
495
496
  if assertion_failure:
rasa/engine/graph.py CHANGED
@@ -67,6 +67,14 @@ class SchemaNode:
67
67
  is_input: bool = False
68
68
  resource: Optional[Resource] = None
69
69
 
70
+ def matches_type(self, node_type: Type, include_subtypes: bool = True) -> bool:
71
+ """Checks if schema node's 'uses' is of specified node type.
72
+ By default, it also checks for subtypes of the specified node type.
73
+ """
74
+ return (self.uses is node_type) or (
75
+ include_subtypes and issubclass(self.uses, node_type)
76
+ )
77
+
70
78
 
71
79
  @dataclass
72
80
  class GraphSchema:
@@ -166,9 +174,7 @@ class GraphSchema:
166
174
  By default, it also checks for subtypes of the specified node type.
167
175
  """
168
176
  for node in self.nodes.values():
169
- if (node.uses is node_type) or (
170
- include_subtypes and issubclass(node.uses, node_type)
171
- ):
177
+ if node.matches_type(node_type, include_subtypes):
172
178
  return True
173
179
  return False
174
180
 
rasa/engine/validation.py CHANGED
@@ -16,6 +16,7 @@ from typing import (
16
16
  Union,
17
17
  TypeVar,
18
18
  List,
19
+ Literal,
19
20
  )
20
21
 
21
22
  import rasa.utils.common
@@ -77,6 +78,9 @@ from rasa.shared.constants import (
77
78
  AWS_SESSION_TOKEN_CONFIG_KEY,
78
79
  SENSITIVE_DATA,
79
80
  USE_CHAT_COMPLETIONS_ENDPOINT_CONFIG_KEY,
81
+ API_TYPE_CONFIG_KEY,
82
+ VALID_PROVIDERS_FOR_API_TYPE_CONFIG_KEY,
83
+ PROVIDER_CONFIG_KEY,
80
84
  )
81
85
  from rasa.shared.core.constants import ACTION_RESET_ROUTING, ACTION_TRIGGER_CHITCHAT
82
86
  from rasa.shared.core.domain import Domain
@@ -946,6 +950,8 @@ def validate_model_client_configuration_setup_during_training_time(
946
950
  the same time (either at component level itself or across different components)
947
951
  - the LLM/embeddings is/are defined using the new syntax, but no model
948
952
  group is defined or the referenced model group does not exist
953
+ - the LLM/embeddings provider is defined using 'api_type' key for providers other
954
+ than 'openai' or 'azure'
949
955
 
950
956
  Args:
951
957
  config: The config dictionary
@@ -962,22 +968,28 @@ def validate_model_client_configuration_setup_during_training_time(
962
968
  if outer_key not in config or config[outer_key] is None:
963
969
  continue
964
970
 
965
- for component in config[outer_key]:
971
+ for component_config in config[outer_key]:
966
972
  for key in [LLM_CONFIG_KEY, EMBEDDINGS_CONFIG_KEY]:
967
973
  _validate_component_model_client_config(
968
- component, key, model_group_syntax_used, model_group_ids
974
+ component_config, key, model_group_syntax_used, model_group_ids
969
975
  )
976
+ validate_api_type_config_key_usage(component_config, key)
970
977
 
971
978
  # as flow retrieval is not a component itself, we need to
972
979
  # check it separately
973
- if FLOW_RETRIEVAL_KEY in component:
974
- if EMBEDDINGS_CONFIG_KEY in component[FLOW_RETRIEVAL_KEY]:
980
+ if FLOW_RETRIEVAL_KEY in component_config:
981
+ if EMBEDDINGS_CONFIG_KEY in component_config[FLOW_RETRIEVAL_KEY]:
975
982
  _validate_component_model_client_config(
976
- component[FLOW_RETRIEVAL_KEY],
983
+ component_config[FLOW_RETRIEVAL_KEY],
977
984
  EMBEDDINGS_CONFIG_KEY,
978
985
  model_group_syntax_used,
979
986
  model_group_ids,
980
- component["name"] + "." + FLOW_RETRIEVAL_KEY,
987
+ component_config["name"] + "." + FLOW_RETRIEVAL_KEY,
988
+ )
989
+ validate_api_type_config_key_usage(
990
+ component_config[FLOW_RETRIEVAL_KEY],
991
+ EMBEDDINGS_CONFIG_KEY,
992
+ component_config["name"] + "." + FLOW_RETRIEVAL_KEY,
981
993
  )
982
994
 
983
995
  # also include the ContextualResponseRephraser component
@@ -1401,3 +1413,39 @@ def validate_command_generator_setup(
1401
1413
  ) -> None:
1402
1414
  schema = model_configuration.predict_schema
1403
1415
  validate_command_generator_exclusivity(schema)
1416
+
1417
+
1418
+ def validate_api_type_config_key_usage(
1419
+ component_config: Dict[str, Any],
1420
+ key: Literal["llm", "embeddings"],
1421
+ component_name: Optional[str] = None,
1422
+ ) -> None:
1423
+ """Validate the LLM/embeddings configuration of a component.
1424
+
1425
+ Validation fails, if
1426
+ - the LLM/embeddings provider is defined using 'api_type' key for providers other
1427
+ than 'openai' or 'azure'
1428
+
1429
+ Args:
1430
+ component_config: The config of the component
1431
+ key: either 'llm' or 'embeddings'
1432
+ component_name: the name of the component
1433
+ """
1434
+ if component_config is None or key not in component_config:
1435
+ return
1436
+
1437
+ if API_TYPE_CONFIG_KEY in component_config[key]:
1438
+ api_type = component_config[key][API_TYPE_CONFIG_KEY]
1439
+ if api_type not in VALID_PROVIDERS_FOR_API_TYPE_CONFIG_KEY:
1440
+ structlogger.error(
1441
+ "validation.component.api_type_config_key_invalid",
1442
+ event_info=(
1443
+ f"You specified '{API_TYPE_CONFIG_KEY}: {api_type}' for "
1444
+ f"'{component_name or component_config['name']}', which is not "
1445
+ f"allowed. "
1446
+ f"The '{API_TYPE_CONFIG_KEY}' key can only be used for the "
1447
+ f"following providers: {VALID_PROVIDERS_FOR_API_TYPE_CONFIG_KEY}. "
1448
+ f"For other providers, please use the '{PROVIDER_CONFIG_KEY}' key."
1449
+ ),
1450
+ )
1451
+ sys.exit(1)
rasa/shared/constants.py CHANGED
@@ -263,6 +263,11 @@ SELF_HOSTED_VLLM_API_KEY_ENV_VAR = "HOSTED_VLLM_API_KEY"
263
263
  SELF_HOSTED_VLLM_PREFIX = "hosted_vllm"
264
264
  SELF_HOSTED_VLLM_API_KEY_ENV_VAR = "HOSTED_VLLM_API_KEY"
265
265
 
266
+ VALID_PROVIDERS_FOR_API_TYPE_CONFIG_KEY = [
267
+ OPENAI_PROVIDER,
268
+ AZURE_OPENAI_PROVIDER,
269
+ ]
270
+
266
271
  SELF_HOSTED_VLLM_PREFIX = "hosted_vllm"
267
272
  SELF_HOSTED_VLLM_API_KEY_ENV_VAR = "HOSTED_VLLM_API_KEY"
268
273
 
rasa/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  # this file will automatically be changed,
2
2
  # do not add anything but the version number here!
3
- __version__ = "3.11.1"
3
+ __version__ = "3.11.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rasa-pro
3
- Version: 3.11.1
3
+ Version: 3.11.2
4
4
  Summary: State-of-the-art open-core Conversational AI framework for Enterprises that natively leverages generative AI for effortless assistant development.
5
5
  Home-page: https://rasa.com
6
6
  Keywords: nlp,machine-learning,machine-learning-library,bot,bots,botkit,rasa conversational-agents,conversational-ai,chatbot,chatbot-framework,bot-framework