Skip to content

Commit 499c7c1

Browse files
feat: allow "url" source_type for pdf in google memory adapter (#108)
1 parent b11dd37 commit 499c7c1

File tree

1 file changed

+5
-0
lines changed
  • datapizza-ai-clients/datapizza-ai-clients-google/datapizza/clients/google

1 file changed

+5
-0
lines changed

datapizza-ai-clients/datapizza-ai-clients-google/datapizza/clients/google/memory_adapter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ def _process_pdf_block(self, block: MediaBlock) -> types.Part | dict:
102102
"data": pdf_bytes,
103103
}
104104
}
105+
case "url":
106+
return types.Part.from_uri(
107+
file_uri=block.media.source,
108+
mime_type="application/pdf",
109+
)
105110

106111
case _:
107112
raise NotImplementedError(

0 commit comments

Comments
 (0)