Comments (4)
By "rasa responses" are you referring to messages from user or Rasa chatbot?
There is parameter onSocketEvent
(see README) which allows one to listen and react to some of the socket events, including messages from the bot, but unfortunately that does not include messages from the user. (That event could also be exposed by would require changes to widget source code.)
from rasa-webchat.
Dear @rajalala thanks for your response.
Base on your expalnation onSocketEvent
should work for me. I need to listen to messages from rasabot.
for example:
user: "hi"
bot: "Hi there, How can i help you?"
I need use bot response "Hi there, How can i help you?" and send it to my mobile robot.
How could i use below code in my html file?
onSocketEvent={{
'bot_uttered': () => console.log('the bot said something'),
'connect': () => console.log('connection established'),
'disconnect': () => doSomeCleanup(),
}}
thanks in advance.
from rasa-webchat.
html code:
<html>
<body>
<script>!(function () {
sessionStorage.clear();// remove chats history
let e = document.createElement("script"),
t = document.head || document.getElementsByTagName("head")[0];
(e.src =
"https://cdn.jsdelivr.net/npm/[email protected]/lib/index.js"),
(e.async = !0),
(e.onload = () => {
window.WebChat.default(
{
intitpayload: '/greet',
customData: { language: "en" },
socketUrl: "http://0.0.0.0:5005",
params:{
storage: "session" // chats history location is "session", default is "local"
}
},
null
);
}),
t.insertBefore(e, t.firstChild);
})();
</script>
</body>
</html>
from rasa-webchat.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from rasa-webchat.
Related Issues (20)
- Link Image Address HOT 1
- ยฟCan I change the parameter language that goes in customData to the widget, without recharging the page? HOT 2
- Starting the conversation HOT 1
- how can i get response of socket.io HOT 1
- JWT authentication HOT 1
- Unable to connect to websocket getting handshake error and unable to customize the chat bot HOT 2
- How to use in Angular project HOT 1
- Table is not rendered HOT 1
- How can I change file and import it into my project? HOT 1
- I don't want the link in the button to open in a new tab. HOT 1
- Rasa 3? HOT 7
- Custom Button in the header HOT 4
- showFullScreenButton and displayUnreadCount HOT 1
- React integration HOT 1
- Not able to clone and run the code in my local HOT 3
- tooltipPayload overwrites initPayload HOT 2
- Not sure about what is the purpose of dispatch evalUrl function HOT 1
- Adding a custom component to RASA web-chat HOT 1
- Getting 'AsyncServer.enter_room' was never awaited error. HOT 2
- Bot does not respond HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rasa-webchat.