Moving to new line when writing reponse for retrieval actions

I want the bot to reponse in this format

  • Đối với các đơn hàng nội tỉnh: Phí trả hàng = 5.000đ/ đơn hàng (đã bao gồm VAT) Thời gian hoàn trả 3-5 ngày làm việc.
  • Các đơn hàng liên tỉnh: Phí trả hàng = 50% phí chuyển đi Thời gian hoàn trả 7-12 ngày làm việc

I tried adding \n, or - text: " TEXT", or just write in new line but nothing work

hi @TQuy,

Try the br tag instead of \n, if you have a UI

regards

@TQuy Can you please share the NLU pipeline config that you are using?

My NLU pipeline is below:

language: en

pipeline:

  • name: “WhitespaceTokenizer”
  • name: “RegexFeaturizer”
  • name: “CountVectorsFeaturizer” analyzer: ‘char’ min_df: 1 max_df: 1.0 min_ngram: 1 max_ngram: 5
  • name: “EmbeddingIntentClassifier” “epochs”: 30
  • name: “ResponseSelector”

policies:

  • name: “FallbackPolicy” nlu_threshold: 0.4 core_threshold: 0.3 fallback_action_name: “action_default_fallback”
  • name: MemoizationPolicy max_history: 5
  • name: FormPolicy
  • name: MappingPolicy
  • name: KerasPolicy “epochs”: 60 max_history: 5

I tried on telegram but
or \n both doesn’t work. I am talking about the retrieval response responses.md (3.4 KB)

Hi,

I am kind of the confused with response.md, based on the format it looks more like stories.md, i guess.If it is stories.md then

Instead of directly displaying your message like

chitchat greet

  • chitchat/greet
    • Kính chào quý khách! GHTK bot có thể hỗ trợ quý khách việc gì ạ ?

Do something like

chitchat greet

  • chitchat/greet
    • utter_greet

Inside the domain.yml add something like

templates:

utter_greet:

  • text : 'Kính chào quý khách! GHTK bot <br> có thể hỗ trợ quý khách việc gì ạ ?"

I guess this should work since i have tried it both in slack and web apps and was rendered correctly

I hope this helps

1 Like

The guide is in here Retrieval Actions . I tried what you suggested but it also failed

Hi @TQuy , Thanks for bringing this up. You are right, adding \n won’t work. Looking into this, will let you know once it’s fixed.

1 Like

oops sorry about that :blush:. I never thought it was with https://rasa.com/docs/rasa/core/retrieval-actions/?_ga=2.83800275.417652044.1570685003-1021956019.1562311146. My bad

Is there any progress with this issue, I think the retrieval function is really useful, especially when dealing with factoid question for custom services

Is this problem fixed? what alternative can you suggest me if I want to have newline in my utterance?

Hi @dakshvar22, has this been implemented? Is there a way around?

it is also not possible to use image-responses like in the domain.yml file.

domain.yml:

utter_iamabot:

with retrival actions in responses.md, those message types do not work. is there a workaround to display them anyways? (its only a markdown file. no keys work in there…)

Perhaps

- text: "i am a bot ![Image](https://giphy.com/gifs/iron-man-robert-downey-jr-g4sCZhKykg1z2)"

will work?

Thank you, it worked for me.

Hey @dakshvar22. Is this problem solved? Retrieval actions are just awesome and it reduces a lots of time and pain in writing the stories.

Please let us know if this issue has been resolved or not