Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Use Google Auth credentials for login to GoogleDriveLoader #200

Open
bastienpo opened this issue Apr 27, 2024 · 0 comments

Comments

@bastienpo
Copy link

Description:

To align with other APIs such as VertexAI and VertexModelGarden, it may be useful in some cases to pass google.auth.Credentials directly to the GoogleDriveLoader constructor instead of passing the service account file.

It should provide more flexibility. It should not change the other log in features.

Proposed solution:
Instantiate the credentials in the GoogleDriveLoader attributes. Replace the credentials calls with an attribute reference.

I would be happy to contribute if you validate this feature.

from google.auth.credentials import Credentials

class GoogleDriveLoader(BaseLoader, BaseModel):
    """Load Google Docs from `Google Drive`."""
    credentials : Credentials | None

Reference:
https://github.com/langchain-ai/langchain-google/blob/3c9efa1741431e44b0a9b061ba18a4bc51e137a9/libs/community/langchain_google_community/drive.py#L21C7-L21C24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant