Yonom / assistant-ui

React Components for AI Chat 💬 🚀
https://www.assistant-ui.com
MIT License
1.66k stars 276 forks source link

Attachment of pdf or docs #1029

Closed SushekTamrakar closed 4 days ago

SushekTamrakar commented 5 days ago

`import { useEdgeRuntime } from "@assistant-ui/react"; import { CompositeAttachmentAdapter, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, } from "@assistant-ui/react";

const runtime = useEdgeRuntime({ api: "/api/chat", adapters: { attachments: new CompositeAttachmentAdapter([ new SimpleImageAttachmentAdapter(), new SimpleTextAttachmentAdapter(), ]), }, });`

I can't find a way to attach the pdf and docs, is there a possible way to do so? This above code just support images and text

Yonom commented 4 days ago

Hello! You will need to integrate with a service that handles parsing PDFs and docs. Native support for this is coming soon, in the meantime, you can look into implementing your own AttachmentAdapter and integrate with a service like LlamaParse

SushekTamrakar commented 4 days ago

sure thank you.