Skip to content

Commit

Permalink
fix: [vertexai] make setApiEndpoint effective for LlmUtilityServiceCl…
Browse files Browse the repository at this point in the history
…ient.

PiperOrigin-RevId: 607113154
  • Loading branch information
ZhenyiQ authored and Copybara-Service committed Feb 14, 2024
1 parent 04d5f55 commit 64bce1f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public PredictionServiceClient getPredictionServiceRestClient() throws IOExcepti
public LlmUtilityServiceClient getLlmUtilityClient() throws IOException {
if (llmUtilityClient == null) {
LlmUtilityServiceSettings.Builder settingsBuilder = LlmUtilityServiceSettings.newBuilder();
settingsBuilder.setEndpoint(String.format("%s-aiplatform.googleapis.com:443", this.location));
settingsBuilder.setEndpoint(String.format("%s:443", this.apiEndpoint));
if (this.credentialsProvider != null) {
settingsBuilder.setCredentialsProvider(this.credentialsProvider);
}
Expand Down Expand Up @@ -370,7 +370,7 @@ public LlmUtilityServiceClient getLlmUtilityRestClient() throws IOException {
if (llmUtilityRestClient == null) {
LlmUtilityServiceSettings.Builder settingsBuilder =
LlmUtilityServiceSettings.newHttpJsonBuilder();
settingsBuilder.setEndpoint(String.format("%s-aiplatform.googleapis.com:443", this.location));
settingsBuilder.setEndpoint(String.format("%s:443", this.apiEndpoint));
if (this.credentialsProvider != null) {
settingsBuilder.setCredentialsProvider(this.credentialsProvider);
}
Expand Down

0 comments on commit 64bce1f

Please sign in to comment.