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

added image loader with Cloud Vision API #107

Merged
merged 2 commits into from
Apr 2, 2024
Merged

added image loader with Cloud Vision API #107

merged 2 commits into from
Apr 2, 2024

Conversation

lkuligin
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@holtskinner holtskinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

libs/community/langchain_google_community/vision.py Outdated Show resolved Hide resolved
libs/community/langchain_google_community/vision.py Outdated Show resolved Hide resolved
client_options = None
print(project)
if project:
client_options = {"quota_project_id": project}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to use the ClientOptions class from google.api_core.client_options?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? the client expect ClientOptions or a dict.

libs/community/langchain_google_community/vision.py Outdated Show resolved Hide resolved


class CloudImageLoader(BaseBlobParser):
def __init__(self, project: Optional[str] = None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with other connectors, can this variable be project_id

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, for LLM/ChatModels we use project, so I'd rather stick to project and eventually change everything else to follow the most frequently used integration, wdyt?

libs/community/langchain_google_community/vision.py Outdated Show resolved Hide resolved
@lkuligin lkuligin merged commit e5bc996 into main Apr 2, 2024
13 checks passed
@lkuligin lkuligin deleted the image_loader branch April 2, 2024 06:13
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

Successfully merging this pull request may close these issues.

2 participants