@@ -102,23 +102,23 @@ Use the SocketIOInput channel: See [instructions in the Rasa Core documentation]
102
102
#### Others
103
103
Your backend must expose a socket with [ socket.io] ( http://socket.io )
104
104
105
- ### Receiving messages from the chat
105
+ ##### Receiving messages from the chat
106
106
107
107
``` python
108
108
@socketio.on (' user_uttered' )
109
109
def handle_message (message ):
110
110
# do something
111
111
```
112
112
113
- ### Sending messages from the backend to the chat widget
113
+ ##### Sending messages from the backend to the chat widget
114
114
115
- ##### sending plain text
115
+ ###### sending plain text
116
116
117
117
``` python
118
118
emit(' bot_uttered' , {" text" : " hello" }, room = session_id)
119
119
```
120
120
121
- ##### sending quick replies
121
+ ###### sending quick replies
122
122
123
123
``` python
124
124
message = {
@@ -130,7 +130,7 @@ message = {
130
130
emit(' bot_uttered' , message, room = socket_id)
131
131
```
132
132
133
- ##### sending a link Snippet
133
+ ###### sending a link Snippet
134
134
135
135
Admittedly a bit far fetched, thinking that Snippets would evolve to carousels
136
136
of generic templates :)
@@ -157,7 +157,7 @@ message = {
157
157
emit(' bot_uttered' , message, room = socket_id)
158
158
```
159
159
160
- ##### sending a Video Message
160
+ ###### sending a Video Message
161
161
162
162
``` python
163
163
message = {
@@ -172,7 +172,7 @@ message = {
172
172
emit(' bot_uttered' , message, room = socket_id)
173
173
```
174
174
175
- ##### sending an Image Message
175
+ ###### sending an Image Message
176
176
177
177
``` python
178
178
message = {
0 commit comments