Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
6.78k stars 881 forks source link

streaming image issue on a k8s service #494

Open monaxu1 opened 11 months ago

monaxu1 commented 11 months ago

I was using the method recommended here for sending image bytes to chainlit. It works fine in localhost, but when the application gets deployed in a k8s service and the service gets exposed to users, the image cannot be displayed (although it could be downloaded via the image icon). There is also a link or ID provided for the plot which cannot be used either.

Do you have any idea on how to display the image from a k8s service?

elements = [
            cl.Image(name="image1", display="inline", content=image_data)
        ]
await cl.Message(content=message, elements=elements).send()
Screenshot 2023-10-20 at 15 58 45 Screenshot 2023-10-20 at 16 01 40
willydouhard commented 11 months ago

Interesting, I wonder what is the difference between sending bytes from localhost and from a k8s cluster. Not obvious to me.