🗂️ feat: Send Attachments Directly to Provider (Google) (#9100)

* feat: add validation for google PDFs and add google endpoint as a document supporting endpoint

* feat: add proper pdf formatting for google endpoints (requires PR #14 in agents)

* feat: add multimodal support for google endpoint attachments

* feat: add audio file svg

* fix: refactor attachments logic so multi-attachment messages work properly

* feat: add video file svg

* fix: allows for followup questions of uploaded multimodal attachments

* fix: remove incorrect final message filtering that was breaking Attachment component rendering
This commit is contained in:
Dustin Healy 2025-08-18 05:39:50 -07:00 committed by Dustin Healy
parent b5aadf1302
commit aae47e7b3f
13 changed files with 581 additions and 15 deletions

View file

@ -159,6 +159,13 @@ async function encodeAndFormatDocuments(req, files, endpoint) {
file_data: `data:application/pdf;base64,${content}`,
};
result.documents.push(documentPart);
} else if (endpoint === EModelEndpoint.google) {
const documentPart = {
type: 'document',
mimeType: 'application/pdf',
data: content,
};
result.documents.push(documentPart);
}
result.files.push(metadata);
@ -170,4 +177,5 @@ async function encodeAndFormatDocuments(req, files, endpoint) {
module.exports = {
encodeAndFormatDocuments,
streamToBuffer,
};