chainlit
chainlit copied to clipboard
Copying values from excel
When I copy paste some cells from excel, the message seems to have an attached image.png
which is a picture of the specific cells. My chatbot cannot process png
files, so this causes some problems. Is it intended behaviour to auto attach these images? Is there a way for me to check this that would be more robust than filtering on the name image.png
?
Thanks for the help.
@willydouhard I am also having this issue. It's a common use-case for my users to copy/paste from excel.
Being able to paste images is an intended behaviour. I am surprised that excel put this data as an image in the clipboard though
I don't think Excel is doing this. Copying cells and pasting into anything else (email, notes, etc) maintains the data. In Chainlit I can browse to excel and it correctly adds the Excel file. The problem is it adds the entire file.
It seems like pasting Excel data from clipboard for some reason is converted to image in Chainlit.
This is the code handling the paste event. Curious to know why the file check is true in that case.
Hey @willydouhard,
I just upgraded to the latest version and this seems to have made the problem worse.
In version 0.7.603
of chainlit
, both the plain text and the image were copied.
Now, I only get the excel content as an image. I guess that's also the behavior observed by @hayescode, given his screenshots.
I am not very familiar with React. You linked to a part of the chainlit front-end. Would you like me to go on a debugging session, or are you aware of any recent changes that could have changed this behavior?
@willydouhard @tpatel does this happen for you as well when you copy cells from a spreadsheet into chainlit? I know you guys are on Mac so I wonder if it's an OS issue?
Just to add to the thread, we also had this raised by a user today, who was copying and pasting from a word doc to Chainlit. It's quite easy to replicate actually - just drop some text in to MS Word (I am on Mac) and then have two Chrome windows open - one is Chainlit and then the other is ChatGPT. You will find that if you paste the text into Chainlit it is captured as an image file, if you paste the text in to ChatGPT it appears as plain text.
Interestingly, MS Word (Mac) to Chainlit (Safari) works ok - the text comes across as plain text!