I have a RAG application built with Dialogflow that retrieves data from a bucket storage containing unstructured data in PDF format. I want to include relevant images in response to the user's question and send them in the output. How can I achieve this?
Is it possible this in a custom payload? The image will vary, of course. Can images be extracted directly from the PDF, or do they need to be pre-extracted and stored separately?
Additionally, if the response does not contain an image, how can I display only plain text without the rest of the custom payload structure?
Ex. User: Show me the diagram fof last month's report. AI Assistan: here's the image: {applicable image}
Hi @JossG,
Welcome to Google Cloud Community!
To achieve your goal of including relevant images in the response to user queries in your RAG (Retrieval-Augmented Generation) application built with Dialogflow, you can indeed use a custom payload. Here's how you can achieve this, addressing your questions:
You can read through this documentation regarding Dialogflow CX Messenger fulfillment.
I hope the above information is helpful.
How can we extract image from the html