Skip to content

Commit

Permalink
Merge pull request #43 from mindvalley/feat/parse-google-spreadsheet
Browse files Browse the repository at this point in the history
Update the logic to parse Google Spreadsheet in Gdrive connector
  • Loading branch information
onimsha authored Jun 20, 2024
2 parents 5757a58 + 6e69ffb commit 04b86b3
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 04b86b3

Please sign in to comment.