How can I add an image to the Chat? #560
-
I tried to put an image into the Chat as follows, but it didn't work... any ideas or suggestions? Thanks!
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I suppose we would need to change the transform function in labs/chat.py to handle images and not just text. So I guess it would be a feature request then. |
Beta Was this translation helpful? Give feedback.
-
A workaround is to return markdown from the handle_user_input() function, something like this, where filename is the url (or name) of the image file:
or with markup like this:
|
Beta Was this translation helpful? Give feedback.
-
I think doing the workaround by returning markdown with image tag is valid. I'd also recommend forking the code in chat.py - we intentionally wrote it all in Python so it's easy to customize for use cases like yours. Feel free to re-open this if you're still hitting issues. Thanks. |
Beta Was this translation helpful? Give feedback.
I think doing the workaround by returning markdown with image tag is valid. I'd also recommend forking the code in chat.py - we intentionally wrote it all in Python so it's easy to customize for use cases like yours. Feel free to re-open this if you're still hitting issues. Thanks.