feat: upload file and store embedding

This commit is contained in:
Abhishek Kumar 2026-01-16 17:06:01 +05:30
parent cac25879bf
commit ec1417da87
21 changed files with 2566 additions and 2 deletions

View file

@ -126,3 +126,16 @@ class S3FileSystem(BaseFileSystem):
return url
except ClientError:
return None
async def adownload_file(self, source_path: str, local_path: str) -> bool:
"""Download a file from S3 to local path."""
try:
async with self.session.client(
"s3", region_name=self.region_name
) as s3_client:
await s3_client.download_file(
self.bucket_name, source_path, local_path
)
return True
except ClientError:
return False