Comments (6)
@znat I think I have something working, for sending simple text messages (which is all my particular use case requires right now). But.. I'm struggling to figure out how to implement any tests (I can't actually even get the existing ones to run successfully), but the project builds, and it works at least as an embedded <script> in a test page (a temporary test page is at http://35.178.228.52/rasa-webchat). Is that sufficient to submit a PR, or would you want me to add tests also?
from rasa-webchat.
For anyone looking through this issue, the webchat react component now exposes a sendMessage(payload: string, text?: string)
function through its ref. You can then call this method whenever you want from your front end.
from rasa-webchat.
from rasa-webchat.
@znat thanks, I'll take a look! Sadly not super familiar with React, but may be able to gather enough from looking through source :)
from rasa-webchat.
@znat I think I have something working, for sending simple text messages (which is all my particular use case requires right now). But.. I'm struggling to figure out how to implement any tests (I can't actually even get the existing ones to run successfully), but the project builds, and it works at least as an embedded <script> in a test page (a temporary test page is at http://35.178.228.52/rasa-webchat). Is that sufficient to submit a PR, or would you want me to add tests also?
Got error of your example code:
Uncaught TypeError: WebChat.sendMessage is not a function
at sendMessageToWidget (test-rasawebchat:56)
at HTMLAnchorElement.onclick
Please help: How to define the function "WebChat.sendMessage"?
thanks!
from rasa-webchat.
For anyone looking through this issue, the webchat react component now exposes a
sendMessage(payload: string, text?: string)
function through its ref. You can then call this method whenever you want from your front end.
dose it must send a message to rasa first? and then put the response to chatbox window?
can I directly put some text or element to the window?
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.