Skip to content

Commit

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

PiperOrigin-RevId: 607113154

Co-authored-by: Zhenyi Qi <zhenyiqi@google.com>
  • Loading branch information
copybara-service[bot] and ZhenyiQ committed Feb 15, 2024
1 parent 651ba65 commit b4ec244
Showing 1 changed file with 2 additions and 2 deletions.
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 b4ec244

Please sign in to comment.