You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def _blob_from_gcs(self, gcs_uri: str) -> storage.Blob:
"""Gets image Blob from a Google Cloud Storage uri.
Args:
gcs_uri: Valid gcs uri.
Raises:
ValueError if there are more than one blob matching the uri.
Returns:
storage.Blob
"""
gcs_client = storage.Client(project=self._project)
blob = storage.Blob.from_string(gcs_uri, gcs_client)
blob.reload(client=gcs_client)
return blob
It would make more sense to make client as a property of ImageBytesLoader
The text was updated successfully, but these errors were encountered:
The following code creates a client per function call at https://github.com/langchain-ai/langchain-google/blob/main/libs/vertexai/langchain_google_vertexai/_image_utils.py
It would make more sense to make client as a property of ImageBytesLoader
The text was updated successfully, but these errors were encountered: