Attachment Support
What are best practices for handling file attachment support and attachment processing?
Right now we have a separate component from Mastra to handle file upload to S3. In the input processor we are creating custom code to handle PDF, Word Doc that converts that into markdown and then into Mastra for processing. Is that the best approach if our goal is to be able to incorporate a file into a query with the LLM?
3 Replies
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8808
GitHub
[DISCORD:1427324623480950905] Attachment Support · Issue #8808 · ...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1427324623480950905 What are best practices for handling file attachment support and attachment processing...
Hi @magellan ! You could pass the document url directly to the LLM, for example
This assumes the LLM handles it already, which most do not. We transformation flow that OCR the PDF to feed into the LLM. Mastra integration with AI-SDK would be great, or an example.