From aa3c7b32715ee22b29aebae763f6183c4609be22 Mon Sep 17 00:00:00 2001 From: Leonid Kuligin Date: Fri, 26 May 2023 17:31:02 +0200 Subject: [PATCH] Fixed passing creds to VertexAI LLM (#5297) # Fixed passing creds to VertexAI LLM Fixes #5279 It looks like we should drop a type annotation for Credentials. Co-authored-by: Leonid Kuligin --- langchain/llms/vertexai.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/langchain/llms/vertexai.py b/langchain/llms/vertexai.py index 3c006f4f..a7a9259c 100644 --- a/langchain/llms/vertexai.py +++ b/langchain/llms/vertexai.py @@ -12,7 +12,6 @@ from langchain.utilities.vertexai import ( ) if TYPE_CHECKING: - from google.auth.credentials import Credentials from vertexai.language_models._language_models import _LanguageModel @@ -34,9 +33,10 @@ class _VertexAICommon(BaseModel): "The default GCP project to use when making Vertex API calls." location: str = "us-central1" "The default location to use when making API calls." - credentials: Optional["Credentials"] = None - "The default custom credentials to use when making API calls. If not provided " - "credentials will be ascertained from the environment." "" + credentials: Any = None + "The default custom credentials (google.auth.credentials.Credentials) to use " + "when making API calls. If not provided, credentials will be ascertained from " + "the environment." @property def _default_params(self) -> Dict[str, Any]: