Skip to content

Commit

Permalink
Fixed passing creds to VertexAI LLM (langchain-ai#5297)
Browse files Browse the repository at this point in the history
# Fixed passing creds to VertexAI LLM

Fixes  langchain-ai#5279 

It looks like we should drop a type annotation for Credentials.

Co-authored-by: Leonid Kuligin <kuligin@google.com>
  • Loading branch information
2 people authored and Undertone0809 committed Jun 19, 2023
1 parent 2e32683 commit bb95fe6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions langchain/llms/vertexai.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
)

if TYPE_CHECKING:
from google.auth.credentials import Credentials
from vertexai.language_models._language_models import _LanguageModel


Expand All @@ -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]:
Expand Down

0 comments on commit bb95fe6

Please sign in to comment.