Skip to content

Commit 27b4ccd

Browse files
committed
get cloud host from client builder
1 parent 7ee60e3 commit 27b4ccd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/ee/carlrobert/llm/client/watsonx/WatsonxClient.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@ public class WatsonxClient {
3030
private WatsonxClient(Builder builder, OkHttpClient.Builder httpClientBuilder) {
3131
this.httpClient = httpClientBuilder.build();
3232
this.apiVersion = builder.apiVersion;
33+
this.host = builder.host;
3334
if (builder.isOnPrem) {
34-
this.host = builder.host;
3535
if (builder.isZenApiKey)
3636
this.authenticator = new WatsonxAuthenticator(builder.username, builder.apiKey);
3737
else
3838
this.authenticator = new WatsonxAuthenticator(builder.username, builder.apiKey, builder.host);
3939
} else {
40-
this.host = PropertiesLoader.getValue("watsonx.baseUrl");
4140
this.authenticator = new WatsonxAuthenticator(builder.apiKey);
4241
}
4342
}

0 commit comments

Comments
 (0)