Rasa webbot

I couldn’t able integrate my rasa chat bot with webchat. I have seen videos and articles but i am not getting

Try to integrate with this video as a reference and let me know if this works or not

Sorry, I followed you video exatcly but my index.html is blank and does not show the chatbot…

Do you have any other soruces like text or video how to set this up?

This is is a mess again… There are 50% of the peopel where this works and for the rest it works not…And no one has a solution since 4 month?

http://forum.rasa.com/search?q=webchat%20order:latest

1 Like

Please check if anything comes up in inspect in the console. Look at the image below

hey @tide90 just try the below code and check if it works

<script>
  !(function () {
    let e = document.createElement("script"),
      t = document.head || document.getElementsByTagName("head")[0];
    (e.src = "https://cdn.jsdelivr.net/npm/rasa-webchat/lib/index.js"),
      (e.async = !0),
      (e.onload = () => {
        window.WebChat.default(
          {
            socketUrl: "http://localhost:5005",
            // add other props here
          },
          null
        );
      }),
      t.insertBefore(e, t.firstChild);
  })();
</script>

the main issue lies with the socketUrl if you try to add it like

"socketUrl: “http://localhost:5005/socket.io

it won’t work as the path /socket.io is already added in the URL

I hope this helps

Thanks, Jitesh

Hey, thanks @JiteshGaikwad what exactly were thhe chnages?

I think I found it. t is an issue with the current rasa version. I will try downgrade it:

What rasa version are you using where it will work? Is 2.2 enough?

So it works with rasa version 2.2! SO actually everyone here with this problem can be now be given a solution just as simple as intsalling version 2.2…

That is strange. I retrained the model via rasa init for the new version and the ui seems now not working anymore. Before with the trained model from version 2.4 the ui worked:

Now I get:


localhost:5059/socke…polling&t=NWxHCuR:1 Failed to load resource: the server responded with a status of 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
localhost:5059/socke…polling&t=NWxHDCy:1 Failed to load resource: the server responded with a status of 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHDr6 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHEPu 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHFta 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHHLO 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHIpD 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHKGz 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHLkd 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHNCU 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHOR3 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHPkm 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHQzN 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHSGe 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHTVJ 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHUp9 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHW1e 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHXSj 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHYwN 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHaOD 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHbrq 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHdJi 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHenY 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHgFE 404 (Not Found)
index.js:125 Error: xhr poll error
at c.i.onError (index.js:19)
at l.<anonymous> (index.js:123)
at l.r.emit (index.js:1)
at l.onError (index.js:123)
at index.js:123
index.js:123 GET http://localhost:5059/socket.io/?EIO=3&transport=polling&t=NWxHhj1 404 (Not Found)

​

I’m using Rasa version 2.2.9 and it works for me with the above solution.

1 Like

would I have to start an action server seperately?

But also for the original script code?

Yes

Yes, maybe v 2.2.0 is not good. I tried yours v 2.2.9 and it works completely. This should be somewhere mentioned…

Seems I have not? Why or when do I need a action server actually?

@tide90 if this helps, can you mark it as a solution, so that it’s helpful for others, Thanks :slightly_smiling_face:

1 Like

@JiteshGaikwad Sometimes the model hangs? Why is it interrupting eg when saying hi and then bye… I get a message that something is deleted?

2021-03-16 15:51:09 DEBUG    rasa.core.policies.rule_policy  - There is a rule for the next action 'action_listen'.

2021-03-16 15:51:09 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_RulePolicy. 2021-03-16 15:51:09 DEBUG rasa.core.processor - Predicted next action ‘action_listen’ with confidence 1.00. 2021-03-16 15:51:09 DEBUG rasa.core.processor - Policy prediction ended with events ‘[]’. 2021-03-16 15:51:09 DEBUG rasa.core.processor - Action ‘action_listen’ ended with events ‘[]’. 2021-03-16 15:51:09 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘16669e0e13a442d8a80107ec3fe48713’.

It’s the conversation’s lock that gets deleted, you can check it out here