1

Hello so I'm using AIML in JAVA using an ALice bot (program ab) and I'm having a problem with diplaying images as an answer to a question asked by a user.

I tried < img > inside an < html > but it doesn't seem to work.

Anyone has an idea on how to deal with it? Thank you ! :)

Snowzee
  • 11
  • 2

1 Answers1

0

You can use the <image> tag of AIML 2.0 to do this:

    <category>
        <pattern>SHOW ME A PICTURE OF ALAN TURING</pattern>
        <template>
            Here you go        
<image>https://upload.wikimedia.org/wikipedia/commons/a/a1/Alan_Turing_Aged_16.jpg</image>
        </template>
    </category>

This will give the following result:

enter image description here

Steve Worswick
  • 880
  • 2
  • 5
  • 11
  • It doesn't work for me.. I have the right AIML version.. it dsiplays thsi : " Here you go https://upload.wikimedia.org/wikipedia/commons/a/a1/Alan_Turing_Aged_16.jpg" – Snowzee Aug 26 '21 at 13:32
  • Unfortunately, your interpreter doesn't seem to support the image tag, as that is perfectly valid AIML – Steve Worswick Aug 26 '21 at 19:08