ai icon indicating copy to clipboard operation
ai copied to clipboard

add more possible file types in attachments

Open MrHertal opened this issue 1 year ago • 0 comments

Currently you can only attach images to the prompt along with a text.

Some providers are handling more file types. This is the case for Bedrock Converse API which accept documents like pdf, docx etc.

In this PR, I created an additional part type called file which is more generic than the current image part type.

I didn't want to break anything so I duplicated the existing mechanism of image without replacing it. You can pass the file blob or a URL to the file, just like with the images.

For now I only updated Bedrock provider to handle this new part type. I wanted some feedbacks before working on the other providers.

MrHertal avatar Aug 09 '24 22:08 MrHertal