forked from Archives/langchain
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 <kuligin@google.com>
This commit is contained in:
parent
a669abf16b
commit
aa3c7b3271
@ -12,7 +12,6 @@ from langchain.utilities.vertexai import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from google.auth.credentials import Credentials
|
|
||||||
from vertexai.language_models._language_models import _LanguageModel
|
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."
|
"The default GCP project to use when making Vertex API calls."
|
||||||
location: str = "us-central1"
|
location: str = "us-central1"
|
||||||
"The default location to use when making API calls."
|
"The default location to use when making API calls."
|
||||||
credentials: Optional["Credentials"] = None
|
credentials: Any = None
|
||||||
"The default custom credentials to use when making API calls. If not provided "
|
"The default custom credentials (google.auth.credentials.Credentials) to use "
|
||||||
"credentials will be ascertained from the environment." ""
|
"when making API calls. If not provided, credentials will be ascertained from "
|
||||||
|
"the environment."
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _default_params(self) -> Dict[str, Any]:
|
def _default_params(self) -> Dict[str, Any]:
|
||||||
|
Loading…
Reference in New Issue
Block a user