https://discord.gg/botpress logo
How to display image by the bot with the KB ?
# 🤝help
b
Hello, i want to display an image from a Knowledge Base, here my .pdf file with image in. If the user says "Hotel Ajaccio" the image of the hôtel display in the chat How to do that please https://cdn.discordapp.com/attachments/1361052492506595498/1361052492745674779/image.png?ex=67fd5a69&is=67fc08e9&hm=34e793f0bb25e81a3115a382aeb083a493dd54bbb6fb38edf1be7fe43383dd28&
l
Why do you want to make it so complicated, upload the file to Botpress files and based on the name display the correct image
b
After each hotel presentation by the bot, I want the image of the corresponding hotel to appear. The bot displays the hotel match based on the user's recommendation like this: Hôtel Bella Vista Ajaccio Enjoy a cozy stay at this charming 3-star hotel, featuring a refreshing pool and comfortable accommodations. Perfect for travelers seeking a relaxing atmosphere. Price: 60€/night Book here Insider Tip: Take a stroll to the nearby beach for stunning views and a lovely sunset. (Display image) Hôtel Panorama Ajaccio This elegant 5-star hotel offers a delightful experience with a pool and complimentary breakfast. Ideal for those looking for a touch of luxury. Price: 69€/night Book here Insider Tip: Don't miss the panoramic views from the rooftop terrace! (Display image) Hôtel Corsica Ajaccio A fantastic 4-star option with a spa and pool, perfect for relaxation after a day of exploring. Price: 111€/night Book here Insider Tip: The on-site restaurant serves delicious local cuisine that you shouldn't miss. (Display image)
r
Why not use carousel cards
n
It will not capture any images from the KB to send out. You can only use the image card, or if you are using the autonomous node, then prompt it to send the image link once you have uploaded the image file to Botpress file
l
Provide direct image links or files names for each hotel name and image in a table and ask to find the hotel and it's image and display from files
o
I would have a table where one column is the name and the other column is the link to the image. You can then find records based on what the user is asking for and the bot can send the image from the link.
n
Does this method work for Tables only? Because I tried Text and it didn't work
Here my table in botpress
@limited-pencil-78283
Ok it seems working, i changed the Knowledge Agent to GPT4o
It work sometimes but not everytime, mostly when the table contain multiple row.
Please can you develop an alternativ
n
Try with Claude Sonnet 3.7 Reasoning Mode, it costs more but if it works I won't complain
l
Hello @narrow-planet-91101 So I tried using and AI task to generate an image and added an image card right after but its not working. Can you kindly take a look? https://cdn.discordapp.com/attachments/1361052492506595498/1362501328064086208/image.png?ex=68029fbe&is=68014e3e&hm=f110737411e6492abf1875362fc742ab13783388f3edbd409c74c157c5e1809e&
4 Views