@@ -8,6 +8,7 @@ public class WatsonxSettingsState {
88 private String username ;
99 private boolean isOnPrem = false ;
1010 private boolean isZenApiKey = false ;
11+ private String region = "us-south" ;
1112 private String apiVersion = "2024-03-14" ;
1213 // use this model as default
1314 private String model = "ibm/granite-3b-code-instruct" ;
@@ -57,6 +58,12 @@ public void setUsername(String username) {
5758 this .username = username ;
5859 }
5960
61+ public String getRegion () {return region ;}
62+
63+ public void setRegion (String region ) {
64+ this .region = region ;
65+ }
66+
6067 public String getApiVersion () {
6168 return apiVersion ;
6269 }
@@ -170,12 +177,10 @@ public boolean equals(Object o) {
170177 return false ;
171178 }
172179 ee .carlrobert .codegpt .settings .service .watsonx .WatsonxSettingsState that = (ee .carlrobert .codegpt .settings .service .watsonx .WatsonxSettingsState ) o ;
173- return Objects .equals (apiVersion , that .apiVersion ) && Objects .equals (spaceId , that .spaceId ) && Objects .equals (projectId , that .projectId ) && Objects .equals (model , that .model ) && Objects .equals (temperature ,that .temperature ) && Objects .equals (topP ,that .topP ) && Objects .equals (topK ,that .topK ) && Objects .equals (randomSeed ,that .randomSeed ) && Objects .equals (repetitionPenalty ,that .repetitionPenalty ) && Objects .equals (maxNewTokens , that .maxNewTokens ) && Objects .equals (minNewTokens ,that .minNewTokens ) && Objects .equals (isGreedyDecoding ,that .isGreedyDecoding ) && Objects .equals (isOnPrem ,that .isOnPrem ) && Objects .equals (isZenApiKey ,that .isZenApiKey );
174-
180+ return Objects .equals (apiVersion , that .apiVersion ) && Objects .equals (region , that .region ) && Objects .equals (spaceId , that .spaceId ) && Objects .equals (projectId , that .projectId ) && Objects .equals (model , that .model ) && Objects .equals (temperature ,that .temperature ) && Objects .equals (topP ,that .topP ) && Objects .equals (topK ,that .topK ) && Objects .equals (randomSeed ,that .randomSeed ) && Objects .equals (repetitionPenalty ,that .repetitionPenalty ) && Objects .equals (maxNewTokens , that .maxNewTokens ) && Objects .equals (minNewTokens ,that .minNewTokens ) && Objects .equals (isGreedyDecoding ,that .isGreedyDecoding ) && Objects .equals (isOnPrem ,that .isOnPrem ) && Objects .equals (isZenApiKey ,that .isZenApiKey );
175181 }
176182
177183 @ Override
178184 public int hashCode () {
179- return Objects .hash (apiVersion , model , apiVersion , projectId , spaceId ,temperature ,topP ,topK ,randomSeed ,includeStopSequence ,stopSequences ,repetitionPenalty , maxNewTokens ,minNewTokens ,isGreedyDecoding ,isOnPrem ,isZenApiKey );
180- }
185+ return Objects .hash (apiVersion , region , model , apiVersion , projectId , spaceId ,temperature ,topP ,topK ,randomSeed ,includeStopSequence ,stopSequences ,repetitionPenalty , maxNewTokens ,minNewTokens ,isGreedyDecoding ,isOnPrem ,isZenApiKey ); }
181186}
0 commit comments