Multiple text and image response

We trying to develop a chatbot where it explains the steps on how to complete a certain task. However when we try it in this way, it does not work:

//codes

utter_scan_my_laptop_microsoft_defender_up_to_date:

-text: “Step 1: Search Windows Security. image: “https://i.imgur.com/nGF1K8f.jpg
-text: “Step 2: Click Virus & Threat Protection.” image: “https://i.imgur.com/nGF1K8f.jpg
-text: Step 3: Click “Quick Scan”” image: “https://i.imgur.com/nGF1K8f.jpg

@kumaraguru01 Hello, can you please format the code for better understanding?

image

What we are trying to achieve is get the bot give a response in steps. for example I ask the bot how to perform a quick scan using Microsoft defender

the response from the bot should be "

                                                        step : 1 xxxxxxxxxxxxxx
                                                        image 1
                                                        step : 2 xxxxxxxxxxxxxx
                                                        image 2
                                                        step : 3 xxxxxxxxxxxxxx
                                                        image 3"

i hope this helps to explain the issue

@kumaraguru01 What is your frontend?

the issue is more toward the formatting of response in domain.yml file. The frontend is just a simple flask blank page…

@kumaraguru01 Really? Ok. In context of rasa and in domain.yml what ever you should mention it will randomly pick only one response.

utter_cheer_up:
    - text: 'Here is something to cheer you up:'
      image: 'https://i.imgur.com/nGF1K8f.jpg'
    - text: 'Here is something to cheer you up more:'
      image: 'https://i.imgur.com/nGF1K8f.jpg'
    - text: 'Here is something to cheer you up more more more:'
      image: 'https://i.imgur.com/nGF1K8f.jpg'

pinging @ChrisRahme for suggestion please.

As Nik said, doing this will randomly pick one response (so, in your case, one step).

You can solve this by:

  • Using one text and one image:

    utter_scan_my_laptop_microsoft_defender_up_to_date:
    - text: "Step 1: Search Windows Security.\n\nStep 2: Click Virus & Threat Protection.\n\nStep 3: Click Quick Scan."
      image: "https://i.imgur.com/nGF1K8f.jpg"
    
  • Using three utterances and linking them by a rule or story:

    utter_scan_my_laptop_microsoft_defender_up_to_date_one:
    - text: "Step 1: Search Windows Security."
      image: "https://i.imgur.com/nGF1K8f.jpg"
    
    utter_scan_my_laptop_microsoft_defender_up_to_date_two:
    - text: "Step 2: Click Virus & Threat Protection"
      image: "https://i.imgur.com/nGF1K8f.jpg"
    
    utter_scan_my_laptop_microsoft_defender_up_to_date_three:
    - text: "Step 3: Click Quick Scan."
      image: "https://i.imgur.com/nGF1K8f.jpg"
    
    rules:
    - rule: scan_my_laptop_microsoft_defender_up_to_date
      steps:
      - intent: my_intent
      - action: utter_scan_my_laptop_microsoft_defender_up_to_date_one
      - action: utter_scan_my_laptop_microsoft_defender_up_to_date_two
      - action: utter_scan_my_laptop_microsoft_defender_up_to_date_three
    
1 Like

issue is resolved, thanks

1 Like

@kumaraguru01 Great :+1: Please can I request to close this thread as solution for other readers.

1 Like

yup please close this request

@kumaraguru01 you have to mark the solution infront of a suggestion and solution which helped you :slight_smile: as you are the owner of the thread!

1 Like