Comments (7)
Hello
this is despite my Lambda function (written in C#) having the \n line break in the output method. How can I get the bot to display each result on its own line, if that's possible?
This is due to the bot response content being ultimately incorporated as HTML. In HTML, the \n
character is not rendered as a line break. You normally use <br>
tags for line breaks in HTML.
However, the chatbot UI doesn't currently support HTML tags in messages. We are tracking a feature request to support rendering basic HTML tags or markdown in the bot responses. See item 3 in: #7. This is a feature we are considering to implement in the future.
Possible alternatives include:
- Break up the list into a dialog (e.g. [bot:] "You have 3 active events. Do you want details about these events?" > [user:] "yes" > [bot:] "The latest event, ID 32, is .... Do you want to change this event or hear about the next one?'" ). This is also useful if you want to avoid long responses when using speech. See Building Better Bots for some dialog design considerations
- Use Response Cards to visually organize the response data. You could render items as buttons or have a response card with multiple Generic Attachments
- Modify the Message.vue file to implement a custom rendering logic
I hope this helps
-- Oliver
from aws-lex-web-ui.
Hi Oliver, thanks for the prompt response. You said break up the list into a dialog. Would that be a ConfirmIntent? As far as I know, LexResponse can only be one of the following:
Delegate
ElicitIntent
ElicitSlot
ConfirmIntent
Close
Also, can you explain how to attach the ResponseCard to the message? Mine doesn't seem to show at all:
UPDATE:
I've managed to modify the Message.vue file so that the bot displays the HTML tags properly. The only issue now is that when I click a link in the message, the index.html that the iframe references is updated instead of the parent page. Can you provide any help to help me fix this?
from aws-lex-web-ui.
UPDATE:
Sorry to keep posting updates but I managed to fix the issue by changing the target of the link.
<br><a href=\"{link}\" target=\"_top\">Event: {evt.ID} - Status: {evt.Status}</a>
Thanks a lot for your help Oliver!
from aws-lex-web-ui.
Hi is this still open? Where do I find the Message.vue file?
Thanks.
from aws-lex-web-ui.
from aws-lex-web-ui.
Hi Oliver, thanks for the prompt response. You said break up the list into a dialog. Would that be a ConfirmIntent? As far as I know, LexResponse can only be one of the following:
Delegate
ElicitIntent
ElicitSlot
ConfirmIntent
CloseAlso, can you explain how to attach the ResponseCard to the message? Mine doesn't seem to show at all:
UPDATE:
I've managed to modify the Message.vue file so that the bot displays the HTML tags properly. The only issue now is that when I click a link in the message, the index.html that the iframe references is updated instead of the parent page. Can you provide any help to help me fix this?
How did you format your output,each on new line????
please show the sample code
from aws-lex-web-ui.
\n and br
both not working, please, anybody give a fix? thanks.
from aws-lex-web-ui.
Related Issues (20)
- lex-web-ui not loading in some Chrome Incognito browsers HOT 6
- Chat History HOT 2
- Failed to load resource S3 bucket error HOT 6
- Lex bot is not connecting to UI
- Auto pop up the chat window HOT 4
- I can see the resopnse in network tab when inspect the element. But on chat window it shows only some line HOT 1
- ImageResponseCard not working (with Voice Input) HOT 1
- Transferring to Agent HOT 2
- Lex Web Ui will not read back Custom Payload answers HOT 1
- Several problems with voice HOT 3
- Can we add a static message in bottom of chat window HOT 1
- How to add the Dropdownlist in the ui HOT 1
- Thumbs up and Thumbs down button disappeared after change Lex response to Lambda hook HOT 8
- toolbarLogo & avatarImageUrl in the v0.20.0 template is not working HOT 4
- Unable to create hyperlinks in intialText HOT 6
- How to remove console.log's when integrated as Iframe? HOT 9
- Move chatbot widget position and increase size within parent.html HOT 1
- initialText multilanguage and changing language dynamically without click button in the corners HOT 1
- Getting no response on lex Ui bot HOT 4
- Update npm package? HOT 2
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 aws-lex-web-ui.