I encountered an issue when trying to initialize the VertexAI class with a custom API endpoint.
it is expected that users can pass a api_endpoint argument to customize the API endpoint.
However, when passing this argument as shown in the code snippet below, a KeyError is raised.
Environment:
Python 3.11 langchain 0.2.4 langchain-core 0.2.6 langchain-google-vertexai 1.0.5 google-cloud-aiplatform 1.54.1
Description:
I encountered an issue when trying to initialize the VertexAI class with a custom API endpoint. it is expected that users can pass a api_endpoint argument to customize the API endpoint. However, when passing this argument as shown in the code snippet below, a KeyError is raised.
error->
I've found following the work around to avoid the problem.
WorkAround: