Skip to content

Commit

Permalink
Update the logic to parse Google Spreadsheet in Gdrive connector
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Co <alex.tuan@mindvalley.com>
  • Loading branch information
onimsha committed Jun 20, 2024
1 parent 5757a58 commit 6e69ffb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/danswer/connectors/google_drive/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,10 @@ def extract_text(file: dict[str, str], service: discovery.Resource) -> str:
response = service.files().get_media(fileId=file["id"]).execute()
return pptx_to_text(file=io.BytesIO(response))
elif mime_type == GDriveMimeType.PPT.value:
response = service.files().get_media(fileId=file["id"]).execute()
response = service.files().export(
fileId=file["id"],
mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation"
).execute()
return pptx_to_text(file=io.BytesIO(response))

return UNSUPPORTED_FILE_TYPE_CONTENT
Expand Down

0 comments on commit 6e69ffb

Please sign in to comment.