From 9993269927267e00cd5d576e4b9f53ff734d1290 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Fri, 23 May 2025 16:12:36 -0500 Subject: [PATCH 1/3] fix(wa-v2): add missing turn events This commit updates missing turn event discriminators that, when returned from the server, were breaking the java sdk with deserialization errors. --- .../assistant/v2/model/ClientAction.java | 89 ++++++++++++ .../v2/model/ClientActionParameters.java | 56 ++++++++ .../assistant/v2/model/GenerativeAITask.java | 120 +++++++++++++++++ .../GenerativeAITaskConfidenceScores.java | 74 ++++++++++ ...erativeAITaskContentGroundedAnswering.java | 20 +++ ...nerativeAITaskGeneralPurposeAnswering.java | 20 +++ .../v2/model/MessageOutputDebugTurnEvent.java | 105 ++++++++++++++- ...TurnEventTurnEventActionRoutingDenied.java | 48 +++++++ ...eOutputDebugTurnEventTurnEventCallout.java | 10 ++ ...tDebugTurnEventTurnEventClientActions.java | 31 +++++ ...EventTurnEventConversationalSearchEnd.java | 36 ++--- ...gTurnEventTurnEventGenerativeAICalled.java | 43 ++++++ ...putDebugTurnEventTurnEventManualRoute.java | 41 ++++++ ...EventTurnEventSuggestionIntentsDenied.java | 21 +++ ...ugTurnEventTurnEventTopicSwitchDenied.java | 48 +++++++ .../v2/model/ResponseGenericCitation.java | 89 ++++++++++++ .../ResponseGenericCitationRangesItem.java | 47 +++++++ .../ResponseGenericConfidenceScores.java | 84 ++++++++++++ .../v2/model/RuntimeResponseGeneric.java | 102 +++++++++++++- ...ntimeResponseTypeConversationalSearch.java | 21 +++ .../assistant/v2/model/SearchResults.java | 74 ++++++++++ .../v2/model/SearchResultsResultMetadata.java | 50 +++++++ .../TurnEventGenerativeAICalledCallout.java | 80 +++++++++++ ...TurnEventGenerativeAICalledCalloutLlm.java | 114 ++++++++++++++++ ...tGenerativeAICalledCalloutLlmResponse.java | 58 ++++++++ ...EventGenerativeAICalledCalloutRequest.java | 127 ++++++++++++++++++ ...ventGenerativeAICalledCalloutResponse.java | 51 +++++++ ...nEventGenerativeAICalledCalloutSearch.java | 73 ++++++++++ .../TurnEventGenerativeAICalledMetrics.java | 59 ++++++++ .../v2/model/TurnEventStepSource.java | 105 +++++++++++++++ .../v2/model/ClientActionParametersTest.java | 38 ++++++ .../assistant/v2/model/ClientActionTest.java | 40 ++++++ .../GenerativeAITaskConfidenceScoresTest.java | 40 ++++++ ...iveAITaskContentGroundedAnsweringTest.java | 42 ++++++ ...tiveAITaskGeneralPurposeAnsweringTest.java | 39 ++++++ .../v2/model/GenerativeAITaskTest.java | 37 +++++ ...EventTurnEventActionRoutingDeniedTest.java | 41 ++++++ ...ugTurnEventTurnEventClientActionsTest.java | 40 ++++++ ...tTurnEventConversationalSearchEndTest.java | 53 ++++---- ...nEventTurnEventGenerativeAICalledTest.java | 44 ++++++ ...ebugTurnEventTurnEventManualRouteTest.java | 42 ++++++ ...tTurnEventSuggestionIntentsDeniedTest.java | 39 ++++++ ...rnEventTurnEventTopicSwitchDeniedTest.java | 41 ++++++ ...ResponseGenericCitationRangesItemTest.java | 38 ++++++ .../v2/model/ResponseGenericCitationTest.java | 40 ++++++ .../ResponseGenericConfidenceScoresTest.java | 40 ++++++ ...eResponseTypeConversationalSearchTest.java | 47 +++++++ .../SearchResultsResultMetadataTest.java | 38 ++++++ .../assistant/v2/model/SearchResultsTest.java | 39 ++++++ ...erativeAICalledCalloutLlmResponseTest.java | 40 ++++++ ...EventGenerativeAICalledCalloutLlmTest.java | 44 ++++++ ...tGenerativeAICalledCalloutRequestTest.java | 43 ++++++ ...GenerativeAICalledCalloutResponseTest.java | 38 ++++++ ...ntGenerativeAICalledCalloutSearchTest.java | 41 ++++++ ...urnEventGenerativeAICalledCalloutTest.java | 41 ++++++ ...urnEventGenerativeAICalledMetricsTest.java | 39 ++++++ .../v2/model/TurnEventStepSourceTest.java | 41 ++++++ 57 files changed, 2943 insertions(+), 58 deletions(-) create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ClientAction.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ClientActionParameters.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITask.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScores.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnswering.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnswering.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionRoutingDenied.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventClientActions.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalled.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventManualRoute.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventTopicSwitchDenied.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitation.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationRangesItem.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericConfidenceScores.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConversationalSearch.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResults.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultsResultMetadata.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCallout.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlm.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequest.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponse.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearch.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetrics.java create mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventStepSource.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ClientActionParametersTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ClientActionTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScoresTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnsweringTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnsweringTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionRoutingDeniedTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventClientActionsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventManualRouteTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSuggestionIntentsDeniedTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventTopicSwitchDeniedTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationRangesItemTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericConfidenceScoresTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConversationalSearchTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchResultsResultMetadataTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchResultsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequestTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponseTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearchTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetricsTest.java create mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventStepSourceTest.java diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ClientAction.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ClientAction.java new file mode 100644 index 00000000000..7cc15720f46 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ClientAction.java @@ -0,0 +1,89 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** ClientAction. */ +public class ClientAction extends GenericModel { + + /** The skill that is requesting the action. Included only if **type**=`client`. */ + public interface Skill { + /** main skill. */ + String MAIN_SKILL = "main skill"; + /** actions skill. */ + String ACTIONS_SKILL = "actions skill"; + } + + protected String name; + + @SerializedName("result_variable") + protected String resultVariable; + + protected String type; + protected String skill; + protected ClientActionParameters parameters; + + protected ClientAction() {} + + /** + * Gets the name. + * + *

The name of the client action. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Gets the resultVariable. + * + * @return the resultVariable + */ + public String getResultVariable() { + return resultVariable; + } + + /** + * Gets the type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the skill. + * + *

The skill that is requesting the action. Included only if **type**=`client`. + * + * @return the skill + */ + public String getSkill() { + return skill; + } + + /** + * Gets the parameters. + * + * @return the parameters + */ + public ClientActionParameters getParameters() { + return parameters; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ClientActionParameters.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ClientActionParameters.java new file mode 100644 index 00000000000..26d01270d8b --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ClientActionParameters.java @@ -0,0 +1,56 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** ClientActionParameters. */ +public class ClientActionParameters extends GenericModel { + + @SerializedName("account_id") + protected String accountId; + + protected String hash; + protected String alias; + + protected ClientActionParameters() {} + + /** + * Gets the accountId. + * + * @return the accountId + */ + public String getAccountId() { + return accountId; + } + + /** + * Gets the hash. + * + * @return the hash + */ + public String getHash() { + return hash; + } + + /** + * Gets the alias. + * + * @return the alias + */ + public String getAlias() { + return alias; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITask.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITask.java new file mode 100644 index 00000000000..6079e9da8de --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITask.java @@ -0,0 +1,120 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * GenerativeAITask. + * + *

Classes which extend this class: - GenerativeAITaskContentGroundedAnswering - + * GenerativeAITaskGeneralPurposeAnswering + */ +public class GenerativeAITask extends GenericModel { + @SuppressWarnings("unused") + protected static String discriminatorPropertyName = "task"; + + protected static java.util.Map> discriminatorMapping; + + static { + discriminatorMapping = new java.util.HashMap<>(); + discriminatorMapping.put( + "content_grounded_answering", GenerativeAITaskContentGroundedAnswering.class); + discriminatorMapping.put( + "general_purpose_answering", GenerativeAITaskGeneralPurposeAnswering.class); + } + + protected String task; + + @SerializedName("is_idk_response") + protected Boolean isIdkResponse; + + @SerializedName("is_hap_detected") + protected Boolean isHapDetected; + + @SerializedName("confidence_scores") + protected GenerativeAITaskConfidenceScores confidenceScores; + + @SerializedName("original_response") + protected String originalResponse; + + @SerializedName("inferred_query") + protected String inferredQuery; + + protected GenerativeAITask() {} + + /** + * Gets the task. + * + *

The type of generative ai task. + * + * @return the task + */ + public String getTask() { + return task; + } + + /** + * Gets the isIdkResponse. + * + *

Whether response was an idk response. + * + * @return the isIdkResponse + */ + public Boolean isIsIdkResponse() { + return isIdkResponse; + } + + /** + * Gets the isHapDetected. + * + *

Whether response was a hap response. + * + * @return the isHapDetected + */ + public Boolean isIsHapDetected() { + return isHapDetected; + } + + /** + * Gets the confidenceScores. + * + *

The confidence scores for determining whether to show the generated response or an “I don't + * know” response. + * + * @return the confidenceScores + */ + public GenerativeAITaskConfidenceScores getConfidenceScores() { + return confidenceScores; + } + + /** + * Gets the originalResponse. + * + * @return the originalResponse + */ + public String getOriginalResponse() { + return originalResponse; + } + + /** + * Gets the inferredQuery. + * + * @return the inferredQuery + */ + public String getInferredQuery() { + return inferredQuery; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScores.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScores.java new file mode 100644 index 00000000000..c0ddfabaaf2 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScores.java @@ -0,0 +1,74 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The confidence scores for determining whether to show the generated response or an “I don't know” + * response. + */ +public class GenerativeAITaskConfidenceScores extends GenericModel { + + @SerializedName("pre_gen") + protected Double preGen; + + @SerializedName("pre_gen_threshold") + protected Double preGenThreshold; + + @SerializedName("post_gen") + protected Double postGen; + + @SerializedName("post_gen_threshold") + protected Double postGenThreshold; + + protected GenerativeAITaskConfidenceScores() {} + + /** + * Gets the preGen. + * + * @return the preGen + */ + public Double getPreGen() { + return preGen; + } + + /** + * Gets the preGenThreshold. + * + * @return the preGenThreshold + */ + public Double getPreGenThreshold() { + return preGenThreshold; + } + + /** + * Gets the postGen. + * + * @return the postGen + */ + public Double getPostGen() { + return postGen; + } + + /** + * Gets the postGenThreshold. + * + * @return the postGenThreshold + */ + public Double getPostGenThreshold() { + return postGenThreshold; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnswering.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnswering.java new file mode 100644 index 00000000000..4c96b78743c --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnswering.java @@ -0,0 +1,20 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** GenerativeAITaskContentGroundedAnswering. */ +public class GenerativeAITaskContentGroundedAnswering extends GenerativeAITask { + + protected GenerativeAITaskContentGroundedAnswering() {} +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnswering.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnswering.java new file mode 100644 index 00000000000..08be88ad80f --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnswering.java @@ -0,0 +1,20 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** GenerativeAITaskGeneralPurposeAnswering. */ +public class GenerativeAITaskGeneralPurposeAnswering extends GenerativeAITask { + + protected GenerativeAITaskGeneralPurposeAnswering() {} +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java index e79f14db2de..dafe4b2dca4 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java @@ -15,6 +15,7 @@ import com.google.gson.annotations.SerializedName; import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; import java.util.Map; /** @@ -25,7 +26,14 @@ * MessageOutputDebugTurnEventTurnEventStepVisited - * MessageOutputDebugTurnEventTurnEventStepAnswered - * MessageOutputDebugTurnEventTurnEventHandlerVisited - MessageOutputDebugTurnEventTurnEventCallout - * - MessageOutputDebugTurnEventTurnEventSearch - MessageOutputDebugTurnEventTurnEventNodeVisited + * - MessageOutputDebugTurnEventTurnEventSearch - MessageOutputDebugTurnEventTurnEventNodeVisited - + * MessageOutputDebugTurnEventTurnEventConversationalSearchEnd - + * MessageOutputDebugTurnEventTurnEventManualRoute - + * MessageOutputDebugTurnEventTurnEventTopicSwitchDenied - + * MessageOutputDebugTurnEventTurnEventActionRoutingDenied - + * MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied - + * MessageOutputDebugTurnEventTurnEventGenerativeAICalled - + * MessageOutputDebugTurnEventTurnEventClientActions */ public class MessageOutputDebugTurnEvent extends GenericModel { @SuppressWarnings("unused") @@ -47,7 +55,21 @@ public class MessageOutputDebugTurnEvent extends GenericModel { discriminatorMapping.put("callout", MessageOutputDebugTurnEventTurnEventCallout.class); discriminatorMapping.put("search", MessageOutputDebugTurnEventTurnEventSearch.class); discriminatorMapping.put("node_visited", MessageOutputDebugTurnEventTurnEventNodeVisited.class); - discriminatorMapping.put("conversational_search_end", MessageOutputDebugTurnEventTurnEventConversationalSearchEnd.class); + discriminatorMapping.put( + "conversational_search_end", + MessageOutputDebugTurnEventTurnEventConversationalSearchEnd.class); + discriminatorMapping.put("manual_route", MessageOutputDebugTurnEventTurnEventManualRoute.class); + discriminatorMapping.put( + "topic_switch_denied", MessageOutputDebugTurnEventTurnEventTopicSwitchDenied.class); + discriminatorMapping.put( + "action_routing_denied", MessageOutputDebugTurnEventTurnEventActionRoutingDenied.class); + discriminatorMapping.put( + "suggestion_intents_denied", + MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied.class); + discriminatorMapping.put( + "generative_ai_called", MessageOutputDebugTurnEventTurnEventGenerativeAICalled.class); + discriminatorMapping.put( + "client_actions", MessageOutputDebugTurnEventTurnEventClientActions.class); } /** The type of condition (if any) that is defined for the action. */ public interface ConditionType { @@ -101,7 +123,23 @@ public interface Reason { protected Boolean hasQuestion; protected Boolean prompted; - protected TurnEventCalloutCallout callout; + + @SerializedName("route_name") + protected String routeName; + + @SerializedName("intents_denied") + protected List intentsDenied; + + @SerializedName("generative_ai_start_time") + protected String generativeAiStartTime; + + @SerializedName("generative_ai") + protected GenerativeAITask generativeAi; + + protected TurnEventGenerativeAICalledMetrics metrics; + + @SerializedName("client_actions") + protected List clientActions; protected MessageOutputDebugTurnEvent() {} @@ -196,11 +234,64 @@ public Boolean isPrompted() { } /** - * Gets the callout. + * Gets the routeName. + * + *

The name of the route. + * + * @return the routeName + */ + public String getRouteName() { + return routeName; + } + + /** + * Gets the intentsDenied. + * + *

An array of denied intents. + * + * @return the intentsDenied + */ + public List getIntentsDenied() { + return intentsDenied; + } + + /** + * Gets the generativeAiStartTime. + * + *

The time when generative ai started processing the message. + * + * @return the generativeAiStartTime + */ + public String getGenerativeAiStartTime() { + return generativeAiStartTime; + } + + /** + * Gets the generativeAi. + * + * @return the generativeAi + */ + public GenerativeAITask getGenerativeAi() { + return generativeAi; + } + + /** + * Gets the metrics. + * + * @return the metrics + */ + public TurnEventGenerativeAICalledMetrics getMetrics() { + return metrics; + } + + /** + * Gets the clientActions. + * + *

An array of client actions. * - * @return the callout + * @return the clientActions */ - public TurnEventCalloutCallout getCallout() { - return callout; + public List getClientActions() { + return clientActions; } } diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionRoutingDenied.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionRoutingDenied.java new file mode 100644 index 00000000000..df58e6350b8 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionRoutingDenied.java @@ -0,0 +1,48 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** MessageOutputDebugTurnEventTurnEventActionRoutingDenied. */ +public class MessageOutputDebugTurnEventTurnEventActionRoutingDenied + extends MessageOutputDebugTurnEvent { + + /** The type of condition (if any) that is defined for the action. */ + public interface ConditionType { + /** user_defined. */ + String USER_DEFINED = "user_defined"; + /** welcome. */ + String WELCOME = "welcome"; + /** anything_else. */ + String ANYTHING_ELSE = "anything_else"; + } + + /** The reason the action was visited. */ + public interface Reason { + /** action_conditions_failed. */ + String ACTION_CONDITIONS_FAILED = "action_conditions_failed"; + } + + protected TurnEventActionSource source; + + protected MessageOutputDebugTurnEventTurnEventActionRoutingDenied() {} + + /** + * Gets the source. + * + * @return the source + */ + public TurnEventActionSource getSource() { + return source; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java index d4ec6acead8..c37d5730795 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java @@ -18,6 +18,7 @@ public class MessageOutputDebugTurnEventTurnEventCallout extends MessageOutputDe protected TurnEventActionSource source; protected TurnEventCalloutError error; + protected TurnEventCalloutCallout callout; protected MessageOutputDebugTurnEventTurnEventCallout() {} @@ -38,4 +39,13 @@ public TurnEventActionSource getSource() { public TurnEventCalloutError getError() { return error; } + + /** + * Gets the callout. + * + * @return the callout + */ + public TurnEventCalloutCallout getCallout() { + return callout; + } } diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventClientActions.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventClientActions.java new file mode 100644 index 00000000000..7432c84b9a2 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventClientActions.java @@ -0,0 +1,31 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** MessageOutputDebugTurnEventTurnEventClientActions. */ +public class MessageOutputDebugTurnEventTurnEventClientActions extends MessageOutputDebugTurnEvent { + + protected TurnEventStepSource source; + + protected MessageOutputDebugTurnEventTurnEventClientActions() {} + + /** + * Gets the source. + * + * @return the source + */ + public TurnEventStepSource getSource() { + return source; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventConversationalSearchEnd.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventConversationalSearchEnd.java index 6ae60e14193..3841b581a19 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventConversationalSearchEnd.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventConversationalSearchEnd.java @@ -11,24 +11,25 @@ * specific language governing permissions and limitations under the License. */ - package com.ibm.watson.assistant.v2.model; +package com.ibm.watson.assistant.v2.model; - /** MessageOutputDebugTurnEventTurnEventActionVisited. */ - public class MessageOutputDebugTurnEventTurnEventConversationalSearchEnd extends MessageOutputDebugTurnEvent { - - /** The type of condition (if any) that is defined for the action. */ - public interface ConditionType { - /** user_defined. */ - String USER_DEFINED = "user_defined"; - /** welcome. */ - String WELCOME = "welcome"; - /** anything_else. */ - String ANYTHING_ELSE = "anything_else"; - } - - protected TurnEventActionSource source; +/** MessageOutputDebugTurnEventTurnEventConversationalSearchEnd. */ +public class MessageOutputDebugTurnEventTurnEventConversationalSearchEnd + extends MessageOutputDebugTurnEvent { + + /** The type of condition (if any) that is defined for the action. */ + public interface ConditionType { + /** user_defined. */ + String USER_DEFINED = "user_defined"; + /** welcome. */ + String WELCOME = "welcome"; + /** anything_else. */ + String ANYTHING_ELSE = "anything_else"; + } - protected MessageOutputDebugTurnEventTurnEventConversationalSearchEnd() {} + protected TurnEventActionSource source; + + protected MessageOutputDebugTurnEventTurnEventConversationalSearchEnd() {} /** * Gets the source. @@ -38,5 +39,4 @@ protected MessageOutputDebugTurnEventTurnEventConversationalSearchEnd() {} public TurnEventActionSource getSource() { return source; } - } - \ No newline at end of file +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalled.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalled.java new file mode 100644 index 00000000000..456cefcd0cc --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalled.java @@ -0,0 +1,43 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** MessageOutputDebugTurnEventTurnEventGenerativeAICalled. */ +public class MessageOutputDebugTurnEventTurnEventGenerativeAICalled + extends MessageOutputDebugTurnEvent { + + protected Object source; + + protected TurnEventGenerativeAICalledCallout callout; + + protected MessageOutputDebugTurnEventTurnEventGenerativeAICalled() {} + + /** + * Gets the source. + * + * @return the source + */ + public Object getSource() { + return source; + } + + /** + * Gets the callout. + * + * @return the callout + */ + public TurnEventGenerativeAICalledCallout getCallout() { + return callout; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventManualRoute.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventManualRoute.java new file mode 100644 index 00000000000..ec139078b2e --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventManualRoute.java @@ -0,0 +1,41 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** MessageOutputDebugTurnEventTurnEventManualRoute. */ +public class MessageOutputDebugTurnEventTurnEventManualRoute extends MessageOutputDebugTurnEvent { + + /** The type of condition (if any) that is defined for the action. */ + public interface ConditionType { + /** user_defined. */ + String USER_DEFINED = "user_defined"; + /** welcome. */ + String WELCOME = "welcome"; + /** anything_else. */ + String ANYTHING_ELSE = "anything_else"; + } + + protected TurnEventStepSource source; + + protected MessageOutputDebugTurnEventTurnEventManualRoute() {} + + /** + * Gets the source. + * + * @return the source + */ + public TurnEventStepSource getSource() { + return source; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied.java new file mode 100644 index 00000000000..3f6b9753dab --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied.java @@ -0,0 +1,21 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied. */ +public class MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied + extends MessageOutputDebugTurnEvent { + + protected MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied() {} +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventTopicSwitchDenied.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventTopicSwitchDenied.java new file mode 100644 index 00000000000..813d028a09a --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventTopicSwitchDenied.java @@ -0,0 +1,48 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** MessageOutputDebugTurnEventTurnEventTopicSwitchDenied. */ +public class MessageOutputDebugTurnEventTurnEventTopicSwitchDenied + extends MessageOutputDebugTurnEvent { + + /** The type of condition (if any) that is defined for the action. */ + public interface ConditionType { + /** user_defined. */ + String USER_DEFINED = "user_defined"; + /** welcome. */ + String WELCOME = "welcome"; + /** anything_else. */ + String ANYTHING_ELSE = "anything_else"; + } + + /** The reason the action was visited. */ + public interface Reason { + /** action_conditions_failed. */ + String ACTION_CONDITIONS_FAILED = "action_conditions_failed"; + } + + protected TurnEventActionSource source; + + protected MessageOutputDebugTurnEventTurnEventTopicSwitchDenied() {} + + /** + * Gets the source. + * + * @return the source + */ + public TurnEventActionSource getSource() { + return source; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitation.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitation.java new file mode 100644 index 00000000000..766852067a1 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitation.java @@ -0,0 +1,89 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; + +/** ResponseGenericCitation. */ +public class ResponseGenericCitation extends GenericModel { + + protected String title; + protected String text; + protected String body; + + @SerializedName("search_result_index") + protected Long searchResultIndex; + + protected List ranges; + + protected ResponseGenericCitation() {} + + /** + * Gets the title. + * + *

The title of the citation text. + * + * @return the title + */ + public String getTitle() { + return title; + } + + /** + * Gets the text. + * + *

The text of the citation. + * + * @return the text + */ + public String getText() { + return text; + } + + /** + * Gets the body. + * + *

The body content of the citation. + * + * @return the body + */ + public String getBody() { + return body; + } + + /** + * Gets the searchResultIndex. + * + *

The index of the search_result where the citation is generated. + * + * @return the searchResultIndex + */ + public Long getSearchResultIndex() { + return searchResultIndex; + } + + /** + * Gets the ranges. + * + *

The offsets of the start and end of the citation in the generated response. For example, + * `ranges:[ { start:0, end:5 }, ...]`. + * + * @return the ranges + */ + public List getRanges() { + return ranges; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationRangesItem.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationRangesItem.java new file mode 100644 index 00000000000..1e0cd874afe --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationRangesItem.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** ResponseGenericCitationRangesItem. */ +public class ResponseGenericCitationRangesItem extends GenericModel { + + protected Long start; + protected Long end; + + protected ResponseGenericCitationRangesItem() {} + + /** + * Gets the start. + * + *

The offset of the start of the citation in the generated response. + * + * @return the start + */ + public Long getStart() { + return start; + } + + /** + * Gets the end. + * + *

The offset of the end of the citation in the generated response. + * + * @return the end + */ + public Long getEnd() { + return end; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericConfidenceScores.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericConfidenceScores.java new file mode 100644 index 00000000000..3a4adbfe48b --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/ResponseGenericConfidenceScores.java @@ -0,0 +1,84 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** + * The confidence scores for determining whether to show the generated response or an “I don't know” + * response. + */ +public class ResponseGenericConfidenceScores extends GenericModel { + + protected Double threshold; + + @SerializedName("pre_gen") + protected Double preGen; + + @SerializedName("post_gen") + protected Double postGen; + + protected Double extractiveness; + + protected ResponseGenericConfidenceScores() {} + + /** + * Gets the threshold. + * + *

The confidence score threshold. If either the pre_gen or post_gen score is below this + * threshold, an “I don't know” response will be shown to replace the generated text. It can be + * configured either in the user interface or through the Update skill API. For more information, + * see the [watsonx Assistant documentation]( + * https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-conversational-search#behavioral-tuning-conversational-search). + * + * @return the threshold + */ + public Double getThreshold() { + return threshold; + } + + /** + * Gets the preGen. + * + *

The confidence score based on user query and search results. + * + * @return the preGen + */ + public Double getPreGen() { + return preGen; + } + + /** + * Gets the postGen. + * + *

The confidence score based on user query, search results, and the generated response. + * + * @return the postGen + */ + public Double getPostGen() { + return postGen; + } + + /** + * Gets the extractiveness. + * + *

It indicates how extractive the generated response is from the search results. + * + * @return the extractiveness + */ + public Double getExtractiveness() { + return extractiveness; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java index a4d74921f52..1bd2e700f48 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGeneric.java @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 2019, 2024. + * (C) Copyright IBM Corp. 2019, 2025. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -21,10 +21,11 @@ /** * RuntimeResponseGeneric. * - *

Classes which extend this class: - RuntimeResponseGenericRuntimeResponseTypeText - - * RuntimeResponseGenericRuntimeResponseTypePause - RuntimeResponseGenericRuntimeResponseTypeImage - - * RuntimeResponseGenericRuntimeResponseTypeOption - - * RuntimeResponseGenericRuntimeResponseTypeConnectToAgent - + *

Classes which extend this class: - + * RuntimeResponseGenericRuntimeResponseTypeConversationalSearch - + * RuntimeResponseGenericRuntimeResponseTypeText - RuntimeResponseGenericRuntimeResponseTypePause - + * RuntimeResponseGenericRuntimeResponseTypeImage - RuntimeResponseGenericRuntimeResponseTypeOption + * - RuntimeResponseGenericRuntimeResponseTypeConnectToAgent - * RuntimeResponseGenericRuntimeResponseTypeSuggestion - * RuntimeResponseGenericRuntimeResponseTypeChannelTransfer - * RuntimeResponseGenericRuntimeResponseTypeSearch - @@ -40,6 +41,8 @@ public class RuntimeResponseGeneric extends GenericModel { static { discriminatorMapping = new java.util.HashMap<>(); + discriminatorMapping.put( + "conversation_search", RuntimeResponseGenericRuntimeResponseTypeConversationalSearch.class); discriminatorMapping.put("audio", RuntimeResponseGenericRuntimeResponseTypeAudio.class); discriminatorMapping.put( "channel_transfer", RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.class); @@ -70,6 +73,22 @@ public interface Preference { protected String responseType; protected String text; + + @SerializedName("citations_title") + protected String citationsTitle; + + protected List citations; + + @SerializedName("confidence_scores") + protected ResponseGenericConfidenceScores confidenceScores; + + @SerializedName("response_length_option") + protected String responseLengthOption; + + @SerializedName("search_results") + protected List searchResults; + + protected String disclaimer; protected List channels; protected Long time; protected Boolean typing; @@ -132,7 +151,7 @@ public String responseType() { /** * Gets the text. * - *

The text of the response. + *

The text of the conversational search response. * * @return the text */ @@ -140,6 +159,77 @@ public String text() { return text; } + /** + * Gets the citationsTitle. + * + *

The title of the citations. The default is “How do we know?”. It can be updated in the + * conversational search user interface. + * + * @return the citationsTitle + */ + public String citationsTitle() { + return citationsTitle; + } + + /** + * Gets the citations. + * + *

The citations for the generated response. + * + * @return the citations + */ + public List citations() { + return citations; + } + + /** + * Gets the confidenceScores. + * + *

The confidence scores for determining whether to show the generated response or an “I don't + * know” response. + * + * @return the confidenceScores + */ + public ResponseGenericConfidenceScores confidenceScores() { + return confidenceScores; + } + + /** + * Gets the responseLengthOption. + * + *

The response length option. It is used to control the length of the generated response. It + * is configured either in the user interface or through the Update skill API. For more + * information, see [watsonx Assistant documentation]( + * https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-conversational-search#tuning-the-generated-response-length-in-conversational-search). + * + * @return the responseLengthOption + */ + public String responseLengthOption() { + return responseLengthOption; + } + + /** + * Gets the searchResults. + * + *

An array of objects containing the search results. + * + * @return the searchResults + */ + public List searchResults() { + return searchResults; + } + + /** + * Gets the disclaimer. + * + *

A disclaimer for the conversational search response. + * + * @return the disclaimer + */ + public String disclaimer() { + return disclaimer; + } + /** * Gets the channels. * diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConversationalSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConversationalSearch.java new file mode 100644 index 00000000000..8de4a9e5e23 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConversationalSearch.java @@ -0,0 +1,21 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +/** RuntimeResponseGenericRuntimeResponseTypeConversationalSearch. */ +public class RuntimeResponseGenericRuntimeResponseTypeConversationalSearch + extends RuntimeResponseGeneric { + + protected RuntimeResponseGenericRuntimeResponseTypeConversationalSearch() {} +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResults.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResults.java new file mode 100644 index 00000000000..063d995c9ea --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResults.java @@ -0,0 +1,74 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** SearchResults. */ +public class SearchResults extends GenericModel { + + @SerializedName("result_metadata") + protected SearchResultsResultMetadata resultMetadata; + + protected String id; + protected String title; + protected String body; + + protected SearchResults() {} + + /** + * Gets the resultMetadata. + * + *

The metadata of the search result. + * + * @return the resultMetadata + */ + public SearchResultsResultMetadata getResultMetadata() { + return resultMetadata; + } + + /** + * Gets the id. + * + *

The ID of the search result. It may not be unique. + * + * @return the id + */ + public String getId() { + return id; + } + + /** + * Gets the title. + * + *

The title of the search result. + * + * @return the title + */ + public String getTitle() { + return title; + } + + /** + * Gets the body. + * + *

The body content of the search result. + * + * @return the body + */ + public String getBody() { + return body; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultsResultMetadata.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultsResultMetadata.java new file mode 100644 index 00000000000..2a5873b51c0 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/SearchResultsResultMetadata.java @@ -0,0 +1,50 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** The metadata of the search result. */ +public class SearchResultsResultMetadata extends GenericModel { + + @SerializedName("document_retrieval_source") + protected String documentRetrievalSource; + + protected Long score; + + protected SearchResultsResultMetadata() {} + + /** + * Gets the documentRetrievalSource. + * + *

The source of the search result. + * + * @return the documentRetrievalSource + */ + public String getDocumentRetrievalSource() { + return documentRetrievalSource; + } + + /** + * Gets the score. + * + *

The relevance score of the search result to the user query. + * + * @return the score + */ + public Long getScore() { + return score; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCallout.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCallout.java new file mode 100644 index 00000000000..58e2976aa00 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCallout.java @@ -0,0 +1,80 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** TurnEventGenerativeAICalledCallout. */ +public class TurnEventGenerativeAICalledCallout extends GenericModel { + + @SerializedName("search_called") + protected Boolean searchCalled; + + @SerializedName("llm_called") + protected Boolean llmCalled; + + protected TurnEventGenerativeAICalledCalloutSearch search; + protected TurnEventGenerativeAICalledCalloutLlm llm; + + @SerializedName("idk_reason_code") + protected String idkReasonCode; + + protected TurnEventGenerativeAICalledCallout() {} + + /** + * Gets the searchCalled. + * + * @return the searchCalled + */ + public Boolean isSearchCalled() { + return searchCalled; + } + + /** + * Gets the llmCalled. + * + * @return the llmCalled + */ + public Boolean isLlmCalled() { + return llmCalled; + } + + /** + * Gets the search. + * + * @return the search + */ + public TurnEventGenerativeAICalledCalloutSearch getSearch() { + return search; + } + + /** + * Gets the llm. + * + * @return the llm + */ + public TurnEventGenerativeAICalledCalloutLlm getLlm() { + return llm; + } + + /** + * Gets the idkReasonCode. + * + * @return the idkReasonCode + */ + public String getIdkReasonCode() { + return idkReasonCode; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlm.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlm.java new file mode 100644 index 00000000000..e449783b143 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlm.java @@ -0,0 +1,114 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.List; + +/** TurnEventGenerativeAICalledCalloutLlm. */ +public class TurnEventGenerativeAICalledCalloutLlm extends GenericModel { + + protected String type; + + @SerializedName("model_id") + protected String modelId; + + @SerializedName("model_class_id") + protected String modelClassId; + + @SerializedName("generated_token_count") + protected Long generatedTokenCount; + + @SerializedName("input_token_count") + protected Long inputTokenCount; + + protected Boolean success; + protected TurnEventGenerativeAICalledCalloutLlmResponse response; + protected List request; + + protected TurnEventGenerativeAICalledCalloutLlm() {} + + /** + * Gets the type. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the modelId. + * + * @return the modelId + */ + public String getModelId() { + return modelId; + } + + /** + * Gets the modelClassId. + * + * @return the modelClassId + */ + public String getModelClassId() { + return modelClassId; + } + + /** + * Gets the generatedTokenCount. + * + * @return the generatedTokenCount + */ + public Long getGeneratedTokenCount() { + return generatedTokenCount; + } + + /** + * Gets the inputTokenCount. + * + * @return the inputTokenCount + */ + public Long getInputTokenCount() { + return inputTokenCount; + } + + /** + * Gets the success. + * + * @return the success + */ + public Boolean isSuccess() { + return success; + } + + /** + * Gets the response. + * + * @return the response + */ + public TurnEventGenerativeAICalledCalloutLlmResponse getResponse() { + return response; + } + + /** + * Gets the request. + * + * @return the request + */ + public List getRequest() { + return request; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponse.java new file mode 100644 index 00000000000..0b6b4b396e9 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponse.java @@ -0,0 +1,58 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** */ +public class TurnEventGenerativeAICalledCalloutLlmResponse extends GenericModel { + + protected String text; + + @SerializedName("response_type") + protected String responseType; + + @SerializedName("is_idk_response") + protected Boolean isIdkResponse; + + protected TurnEventGenerativeAICalledCalloutLlmResponse() {} + + /** + * Gets the text. + * + * @return the text + */ + public String getText() { + return text; + } + + /** + * Gets the responseType. + * + * @return the responseType + */ + public String getResponseType() { + return responseType; + } + + /** + * Gets the isIdkResponse. + * + * @return the isIdkResponse + */ + public Boolean isIsIdkResponse() { + return isIdkResponse; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequest.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequest.java new file mode 100644 index 00000000000..06d6a2fb81a --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequest.java @@ -0,0 +1,127 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; +import java.util.Map; + +/** TurnEventGenerativeAICalledCalloutRequest. */ +public class TurnEventGenerativeAICalledCalloutRequest extends GenericModel { + + /** The REST method of the request. */ + public interface Method { + /** GET. */ + String GET = "GET"; + /** POST. */ + String POST = "POST"; + /** PUT. */ + String PUT = "PUT"; + /** DELETE. */ + String DELETE = "DELETE"; + /** PATCH. */ + String PATCH = "PATCH"; + } + + protected String method; + protected String url; + protected String port; + protected String path; + + @SerializedName("query_parameters") + protected String queryParameters; + + protected Map headers; + protected Map body; + + protected TurnEventGenerativeAICalledCalloutRequest() {} + + /** + * Gets the method. + * + *

The REST method of the request. + * + * @return the method + */ + public String getMethod() { + return method; + } + + /** + * Gets the url. + * + *

The host URL of the request call. + * + * @return the url + */ + public String getUrl() { + return url; + } + + /** + * Gets the port. + * + *

The host port of the request call. + * + * @return the port + */ + public String getPort() { + return port; + } + + /** + * Gets the path. + * + *

The URL path of the request call. + * + * @return the path + */ + public String getPath() { + return path; + } + + /** + * Gets the queryParameters. + * + *

Any query parameters appended to the URL of the request call. + * + * @return the queryParameters + */ + public String getQueryParameters() { + return queryParameters; + } + + /** + * Gets the headers. + * + *

Any headers included in the request call. + * + * @return the headers + */ + public Map getHeaders() { + return headers; + } + + /** + * Gets the body. + * + *

Contains the response of the external server or an object. In cases like timeouts or + * connections errors, it will contain details of why the callout to the external server failed. + * + * @return the body + */ + public Map getBody() { + return body; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponse.java new file mode 100644 index 00000000000..8202916b42b --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponse.java @@ -0,0 +1,51 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** TurnEventGenerativeAICalledCalloutResponse. */ +public class TurnEventGenerativeAICalledCalloutResponse extends GenericModel { + + protected String body; + + @SerializedName("status_code") + protected Long statusCode; + + protected TurnEventGenerativeAICalledCalloutResponse() {} + + /** + * Gets the body. + * + *

The final response string. This response is a composition of every partial chunk received + * from the stream. + * + * @return the body + */ + public String getBody() { + return body; + } + + /** + * Gets the statusCode. + * + *

The final status code of the response. + * + * @return the statusCode + */ + public Long getStatusCode() { + return statusCode; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearch.java new file mode 100644 index 00000000000..ce03cc2beba --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearch.java @@ -0,0 +1,73 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** TurnEventGenerativeAICalledCalloutSearch. */ +public class TurnEventGenerativeAICalledCalloutSearch extends GenericModel { + + protected String engine; + protected String index; + protected String query; + protected TurnEventGenerativeAICalledCalloutRequest request; + protected TurnEventGenerativeAICalledCalloutResponse response; + + protected TurnEventGenerativeAICalledCalloutSearch() {} + + /** + * Gets the engine. + * + * @return the engine + */ + public String getEngine() { + return engine; + } + + /** + * Gets the index. + * + * @return the index + */ + public String getIndex() { + return index; + } + + /** + * Gets the query. + * + * @return the query + */ + public String getQuery() { + return query; + } + + /** + * Gets the request. + * + * @return the request + */ + public TurnEventGenerativeAICalledCalloutRequest getRequest() { + return request; + } + + /** + * Gets the response. + * + * @return the response + */ + public TurnEventGenerativeAICalledCalloutResponse getResponse() { + return response; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetrics.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetrics.java new file mode 100644 index 00000000000..cb3bb31154a --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetrics.java @@ -0,0 +1,59 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** TurnEventGenerativeAICalledMetrics. */ +public class TurnEventGenerativeAICalledMetrics extends GenericModel { + + @SerializedName("search_time_ms") + protected Double searchTimeMs; + + @SerializedName("answer_generation_time_ms") + protected Double answerGenerationTimeMs; + + @SerializedName("total_time_ms") + protected Double totalTimeMs; + + protected TurnEventGenerativeAICalledMetrics() {} + + /** + * Gets the searchTimeMs. + * + * @return the searchTimeMs + */ + public Double getSearchTimeMs() { + return searchTimeMs; + } + + /** + * Gets the answerGenerationTimeMs. + * + * @return the answerGenerationTimeMs + */ + public Double getAnswerGenerationTimeMs() { + return answerGenerationTimeMs; + } + + /** + * Gets the totalTimeMs. + * + * @return the totalTimeMs + */ + public Double getTotalTimeMs() { + return totalTimeMs; + } +} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventStepSource.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventStepSource.java new file mode 100644 index 00000000000..a38957d75c5 --- /dev/null +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventStepSource.java @@ -0,0 +1,105 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import com.google.gson.annotations.SerializedName; +import com.ibm.cloud.sdk.core.service.model.GenericModel; + +/** TurnEventStepSource. */ +public class TurnEventStepSource extends GenericModel { + + /** The type of turn event. */ + public interface Type { + /** step. */ + String STEP = "step"; + } + + protected String type; + protected String action; + + @SerializedName("action_title") + protected String actionTitle; + + protected String step; + + @SerializedName("is_ai_guided") + protected Boolean isAiGuided; + + @SerializedName("is_skill_based") + protected Boolean isSkillBased; + + protected TurnEventStepSource() {} + + /** + * Gets the type. + * + *

The type of turn event. + * + * @return the type + */ + public String getType() { + return type; + } + + /** + * Gets the action. + * + *

An action that was visited during processing of the message. + * + * @return the action + */ + public String getAction() { + return action; + } + + /** + * Gets the actionTitle. + * + *

The title of the action. + * + * @return the actionTitle + */ + public String getActionTitle() { + return actionTitle; + } + + /** + * Gets the step. + * + *

A step that was visited during processing of the message. + * + * @return the step + */ + public String getStep() { + return step; + } + + /** + * Gets the isAiGuided. + * + * @return the isAiGuided + */ + public Boolean isIsAiGuided() { + return isAiGuided; + } + + /** + * Gets the isSkillBased. + * + * @return the isSkillBased + */ + public Boolean isIsSkillBased() { + return isSkillBased; + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ClientActionParametersTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ClientActionParametersTest.java new file mode 100644 index 00000000000..f785d5c0cf5 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ClientActionParametersTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ClientActionParameters model. */ +public class ClientActionParametersTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testClientActionParameters() throws Throwable { + ClientActionParameters clientActionParametersModel = new ClientActionParameters(); + assertNull(clientActionParametersModel.getAccountId()); + assertNull(clientActionParametersModel.getHash()); + assertNull(clientActionParametersModel.getAlias()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ClientActionTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ClientActionTest.java new file mode 100644 index 00000000000..cb55edf5a1c --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ClientActionTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ClientAction model. */ +public class ClientActionTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testClientAction() throws Throwable { + ClientAction clientActionModel = new ClientAction(); + assertNull(clientActionModel.getName()); + assertNull(clientActionModel.getResultVariable()); + assertNull(clientActionModel.getType()); + assertNull(clientActionModel.getSkill()); + assertNull(clientActionModel.getParameters()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScoresTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScoresTest.java new file mode 100644 index 00000000000..316b7dceacb --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScoresTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the GenerativeAITaskConfidenceScores model. */ +public class GenerativeAITaskConfidenceScoresTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testGenerativeAITaskConfidenceScores() throws Throwable { + GenerativeAITaskConfidenceScores generativeAiTaskConfidenceScoresModel = + new GenerativeAITaskConfidenceScores(); + assertNull(generativeAiTaskConfidenceScoresModel.getPreGen()); + assertNull(generativeAiTaskConfidenceScoresModel.getPreGenThreshold()); + assertNull(generativeAiTaskConfidenceScoresModel.getPostGen()); + assertNull(generativeAiTaskConfidenceScoresModel.getPostGenThreshold()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnsweringTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnsweringTest.java new file mode 100644 index 00000000000..aea5012576b --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnsweringTest.java @@ -0,0 +1,42 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the GenerativeAITaskContentGroundedAnswering model. */ +public class GenerativeAITaskContentGroundedAnsweringTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testGenerativeAITaskContentGroundedAnswering() throws Throwable { + GenerativeAITaskContentGroundedAnswering generativeAiTaskContentGroundedAnsweringModel = + new GenerativeAITaskContentGroundedAnswering(); + assertNull(generativeAiTaskContentGroundedAnsweringModel.getTask()); + assertNull(generativeAiTaskContentGroundedAnsweringModel.isIsIdkResponse()); + assertNull(generativeAiTaskContentGroundedAnsweringModel.isIsHapDetected()); + assertNull(generativeAiTaskContentGroundedAnsweringModel.getConfidenceScores()); + assertNull(generativeAiTaskContentGroundedAnsweringModel.getOriginalResponse()); + assertNull(generativeAiTaskContentGroundedAnsweringModel.getInferredQuery()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnsweringTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnsweringTest.java new file mode 100644 index 00000000000..f1475bab523 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnsweringTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the GenerativeAITaskGeneralPurposeAnswering model. */ +public class GenerativeAITaskGeneralPurposeAnsweringTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testGenerativeAITaskGeneralPurposeAnswering() throws Throwable { + GenerativeAITaskGeneralPurposeAnswering generativeAiTaskGeneralPurposeAnsweringModel = + new GenerativeAITaskGeneralPurposeAnswering(); + assertNull(generativeAiTaskGeneralPurposeAnsweringModel.getTask()); + assertNull(generativeAiTaskGeneralPurposeAnsweringModel.isIsIdkResponse()); + assertNull(generativeAiTaskGeneralPurposeAnsweringModel.isIsHapDetected()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskTest.java new file mode 100644 index 00000000000..534205cdf50 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskTest.java @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the GenerativeAITask model. */ +public class GenerativeAITaskTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + // TODO: Add tests for models that are abstract + @Test + public void testGenerativeAITask() throws Throwable { + GenerativeAITask generativeAiTaskModel = new GenerativeAITask(); + assertNotNull(generativeAiTaskModel); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionRoutingDeniedTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionRoutingDeniedTest.java new file mode 100644 index 00000000000..6f0f42bbabc --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventActionRoutingDeniedTest.java @@ -0,0 +1,41 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageOutputDebugTurnEventTurnEventActionRoutingDenied model. */ +public class MessageOutputDebugTurnEventTurnEventActionRoutingDeniedTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageOutputDebugTurnEventTurnEventActionRoutingDenied() throws Throwable { + MessageOutputDebugTurnEventTurnEventActionRoutingDenied + messageOutputDebugTurnEventTurnEventActionRoutingDeniedModel = + new MessageOutputDebugTurnEventTurnEventActionRoutingDenied(); + assertNull(messageOutputDebugTurnEventTurnEventActionRoutingDeniedModel.getEvent()); + assertNull(messageOutputDebugTurnEventTurnEventActionRoutingDeniedModel.getSource()); + assertNull(messageOutputDebugTurnEventTurnEventActionRoutingDeniedModel.getConditionType()); + assertNull(messageOutputDebugTurnEventTurnEventActionRoutingDeniedModel.getReason()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventClientActionsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventClientActionsTest.java new file mode 100644 index 00000000000..e49a835884f --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventClientActionsTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageOutputDebugTurnEventTurnEventClientActions model. */ +public class MessageOutputDebugTurnEventTurnEventClientActionsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageOutputDebugTurnEventTurnEventClientActions() throws Throwable { + MessageOutputDebugTurnEventTurnEventClientActions + messageOutputDebugTurnEventTurnEventClientActionsModel = + new MessageOutputDebugTurnEventTurnEventClientActions(); + assertNull(messageOutputDebugTurnEventTurnEventClientActionsModel.getEvent()); + assertNull(messageOutputDebugTurnEventTurnEventClientActionsModel.getSource()); + assertNull(messageOutputDebugTurnEventTurnEventClientActionsModel.getClientActions()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventConversationalSearchEndTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventConversationalSearchEndTest.java index beaba9cdca5..d2a25ea2a94 100644 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventConversationalSearchEndTest.java +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventConversationalSearchEndTest.java @@ -11,31 +11,30 @@ * specific language governing permissions and limitations under the License. */ - package com.ibm.watson.assistant.v2.model; +package com.ibm.watson.assistant.v2.model; - import static org.testng.Assert.*; - - import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; - import com.ibm.watson.assistant.v2.utils.TestUtilities; - import java.io.InputStream; - import java.util.HashMap; - import java.util.List; - import org.testng.annotations.Test; - - /** Unit test class for the MessageOutputDebugTurnEventTurnEventConversationalSearchEnd model. */ - public class MessageOutputDebugTurnEventTurnEventConversationalSearchEndTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testMessageOutputDebugTurnEventTurnEventConversationalSearchEnd() throws Throwable { - MessageOutputDebugTurnEventTurnEventConversationalSearchEnd - messageOutputDebugTurnEventTurnEventConversationalSearchEndModel = - new MessageOutputDebugTurnEventTurnEventConversationalSearchEnd(); - assertNull(messageOutputDebugTurnEventTurnEventConversationalSearchEndModel.getEvent()); - assertNull(messageOutputDebugTurnEventTurnEventConversationalSearchEndModel.getSource()); - assertNull(messageOutputDebugTurnEventTurnEventConversationalSearchEndModel.getConditionType()); - } - } - \ No newline at end of file +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageOutputDebugTurnEventTurnEventConversationalSearchEnd model. */ +public class MessageOutputDebugTurnEventTurnEventConversationalSearchEndTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageOutputDebugTurnEventTurnEventConversationalSearchEnd() throws Throwable { + MessageOutputDebugTurnEventTurnEventConversationalSearchEnd + messageOutputDebugTurnEventTurnEventConversationalSearchEndModel = + new MessageOutputDebugTurnEventTurnEventConversationalSearchEnd(); + assertNull(messageOutputDebugTurnEventTurnEventConversationalSearchEndModel.getEvent()); + assertNull(messageOutputDebugTurnEventTurnEventConversationalSearchEndModel.getSource()); + assertNull(messageOutputDebugTurnEventTurnEventConversationalSearchEndModel.getConditionType()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest.java new file mode 100644 index 00000000000..9d9868529a1 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest.java @@ -0,0 +1,44 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageOutputDebugTurnEventTurnEventGenerativeAICalled model. */ +public class MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageOutputDebugTurnEventTurnEventGenerativeAICalled() throws Throwable { + MessageOutputDebugTurnEventTurnEventGenerativeAICalled + messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel = + new MessageOutputDebugTurnEventTurnEventGenerativeAICalled(); + assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getEvent()); + assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getSource()); + assertNull( + messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getGenerativeAiStartTime()); + assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getGenerativeAi()); + assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getCallout()); + assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getMetrics()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventManualRouteTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventManualRouteTest.java new file mode 100644 index 00000000000..f81328abd60 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventManualRouteTest.java @@ -0,0 +1,42 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageOutputDebugTurnEventTurnEventManualRoute model. */ +public class MessageOutputDebugTurnEventTurnEventManualRouteTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageOutputDebugTurnEventTurnEventManualRoute() throws Throwable { + MessageOutputDebugTurnEventTurnEventManualRoute + messageOutputDebugTurnEventTurnEventManualRouteModel = + new MessageOutputDebugTurnEventTurnEventManualRoute(); + assertNull(messageOutputDebugTurnEventTurnEventManualRouteModel.getEvent()); + assertNull(messageOutputDebugTurnEventTurnEventManualRouteModel.getSource()); + assertNull(messageOutputDebugTurnEventTurnEventManualRouteModel.getConditionType()); + assertNull(messageOutputDebugTurnEventTurnEventManualRouteModel.getActionStartTime()); + assertNull(messageOutputDebugTurnEventTurnEventManualRouteModel.getRouteName()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSuggestionIntentsDeniedTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSuggestionIntentsDeniedTest.java new file mode 100644 index 00000000000..5bdd7225a96 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventSuggestionIntentsDeniedTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied model. */ +public class MessageOutputDebugTurnEventTurnEventSuggestionIntentsDeniedTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied() throws Throwable { + MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied + messageOutputDebugTurnEventTurnEventSuggestionIntentsDeniedModel = + new MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied(); + assertNull(messageOutputDebugTurnEventTurnEventSuggestionIntentsDeniedModel.getEvent()); + assertNull(messageOutputDebugTurnEventTurnEventSuggestionIntentsDeniedModel.getIntentsDenied()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventTopicSwitchDeniedTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventTopicSwitchDeniedTest.java new file mode 100644 index 00000000000..3d075dd9f46 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventTopicSwitchDeniedTest.java @@ -0,0 +1,41 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the MessageOutputDebugTurnEventTurnEventTopicSwitchDenied model. */ +public class MessageOutputDebugTurnEventTurnEventTopicSwitchDeniedTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testMessageOutputDebugTurnEventTurnEventTopicSwitchDenied() throws Throwable { + MessageOutputDebugTurnEventTurnEventTopicSwitchDenied + messageOutputDebugTurnEventTurnEventTopicSwitchDeniedModel = + new MessageOutputDebugTurnEventTurnEventTopicSwitchDenied(); + assertNull(messageOutputDebugTurnEventTurnEventTopicSwitchDeniedModel.getEvent()); + assertNull(messageOutputDebugTurnEventTurnEventTopicSwitchDeniedModel.getSource()); + assertNull(messageOutputDebugTurnEventTurnEventTopicSwitchDeniedModel.getConditionType()); + assertNull(messageOutputDebugTurnEventTurnEventTopicSwitchDeniedModel.getReason()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationRangesItemTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationRangesItemTest.java new file mode 100644 index 00000000000..f1a05fe8348 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationRangesItemTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ResponseGenericCitationRangesItem model. */ +public class ResponseGenericCitationRangesItemTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testResponseGenericCitationRangesItem() throws Throwable { + ResponseGenericCitationRangesItem responseGenericCitationRangesItemModel = + new ResponseGenericCitationRangesItem(); + assertNull(responseGenericCitationRangesItemModel.getStart()); + assertNull(responseGenericCitationRangesItemModel.getEnd()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationTest.java new file mode 100644 index 00000000000..3aa758a41de --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericCitationTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ResponseGenericCitation model. */ +public class ResponseGenericCitationTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testResponseGenericCitation() throws Throwable { + ResponseGenericCitation responseGenericCitationModel = new ResponseGenericCitation(); + assertNull(responseGenericCitationModel.getTitle()); + assertNull(responseGenericCitationModel.getText()); + assertNull(responseGenericCitationModel.getBody()); + assertNull(responseGenericCitationModel.getSearchResultIndex()); + assertNull(responseGenericCitationModel.getRanges()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericConfidenceScoresTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericConfidenceScoresTest.java new file mode 100644 index 00000000000..8a494ec5583 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/ResponseGenericConfidenceScoresTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the ResponseGenericConfidenceScores model. */ +public class ResponseGenericConfidenceScoresTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testResponseGenericConfidenceScores() throws Throwable { + ResponseGenericConfidenceScores responseGenericConfidenceScoresModel = + new ResponseGenericConfidenceScores(); + assertNull(responseGenericConfidenceScoresModel.getThreshold()); + assertNull(responseGenericConfidenceScoresModel.getPreGen()); + assertNull(responseGenericConfidenceScoresModel.getPostGen()); + assertNull(responseGenericConfidenceScoresModel.getExtractiveness()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConversationalSearchTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConversationalSearchTest.java new file mode 100644 index 00000000000..9d65bbbb50c --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/RuntimeResponseGenericRuntimeResponseTypeConversationalSearchTest.java @@ -0,0 +1,47 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the RuntimeResponseGenericRuntimeResponseTypeConversationalSearch model. */ +public class RuntimeResponseGenericRuntimeResponseTypeConversationalSearchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testRuntimeResponseGenericRuntimeResponseTypeConversationalSearch() throws Throwable { + RuntimeResponseGenericRuntimeResponseTypeConversationalSearch + runtimeResponseGenericRuntimeResponseTypeConversationalSearchModel = + new RuntimeResponseGenericRuntimeResponseTypeConversationalSearch(); + assertNull(runtimeResponseGenericRuntimeResponseTypeConversationalSearchModel.responseType()); + assertNull(runtimeResponseGenericRuntimeResponseTypeConversationalSearchModel.text()); + assertNull(runtimeResponseGenericRuntimeResponseTypeConversationalSearchModel.citationsTitle()); + assertNull(runtimeResponseGenericRuntimeResponseTypeConversationalSearchModel.citations()); + assertNull( + runtimeResponseGenericRuntimeResponseTypeConversationalSearchModel.confidenceScores()); + assertNull( + runtimeResponseGenericRuntimeResponseTypeConversationalSearchModel.responseLengthOption()); + assertNull(runtimeResponseGenericRuntimeResponseTypeConversationalSearchModel.searchResults()); + assertNull(runtimeResponseGenericRuntimeResponseTypeConversationalSearchModel.disclaimer()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchResultsResultMetadataTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchResultsResultMetadataTest.java new file mode 100644 index 00000000000..8ffd9742a15 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchResultsResultMetadataTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the SearchResultsResultMetadata model. */ +public class SearchResultsResultMetadataTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSearchResultsResultMetadata() throws Throwable { + SearchResultsResultMetadata searchResultsResultMetadataModel = + new SearchResultsResultMetadata(); + assertNull(searchResultsResultMetadataModel.getDocumentRetrievalSource()); + assertNull(searchResultsResultMetadataModel.getScore()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchResultsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchResultsTest.java new file mode 100644 index 00000000000..8723aa25f39 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/SearchResultsTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the SearchResults model. */ +public class SearchResultsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testSearchResults() throws Throwable { + SearchResults searchResultsModel = new SearchResults(); + assertNull(searchResultsModel.getResultMetadata()); + assertNull(searchResultsModel.getId()); + assertNull(searchResultsModel.getTitle()); + assertNull(searchResultsModel.getBody()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponseTest.java new file mode 100644 index 00000000000..306a90a8e37 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponseTest.java @@ -0,0 +1,40 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventGenerativeAICalledCalloutLlmResponse model. */ +public class TurnEventGenerativeAICalledCalloutLlmResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventGenerativeAICalledCalloutLlmResponse() throws Throwable { + TurnEventGenerativeAICalledCalloutLlmResponse + turnEventGenerativeAiCalledCalloutLlmResponseModel = + new TurnEventGenerativeAICalledCalloutLlmResponse(); + assertNull(turnEventGenerativeAiCalledCalloutLlmResponseModel.getText()); + assertNull(turnEventGenerativeAiCalledCalloutLlmResponseModel.getResponseType()); + assertNull(turnEventGenerativeAiCalledCalloutLlmResponseModel.isIsIdkResponse()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmTest.java new file mode 100644 index 00000000000..c61732e31b9 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmTest.java @@ -0,0 +1,44 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventGenerativeAICalledCalloutLlm model. */ +public class TurnEventGenerativeAICalledCalloutLlmTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventGenerativeAICalledCalloutLlm() throws Throwable { + TurnEventGenerativeAICalledCalloutLlm turnEventGenerativeAiCalledCalloutLlmModel = + new TurnEventGenerativeAICalledCalloutLlm(); + assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getType()); + assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getModelId()); + assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getModelClassId()); + assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getGeneratedTokenCount()); + assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getInputTokenCount()); + assertNull(turnEventGenerativeAiCalledCalloutLlmModel.isSuccess()); + assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getResponse()); + assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getRequest()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequestTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequestTest.java new file mode 100644 index 00000000000..9ee92bf2dd3 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequestTest.java @@ -0,0 +1,43 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventGenerativeAICalledCalloutRequest model. */ +public class TurnEventGenerativeAICalledCalloutRequestTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventGenerativeAICalledCalloutRequest() throws Throwable { + TurnEventGenerativeAICalledCalloutRequest turnEventGenerativeAiCalledCalloutRequestModel = + new TurnEventGenerativeAICalledCalloutRequest(); + assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getMethod()); + assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getUrl()); + assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getPort()); + assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getPath()); + assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getQueryParameters()); + assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getHeaders()); + assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getBody()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponseTest.java new file mode 100644 index 00000000000..9104deb2454 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponseTest.java @@ -0,0 +1,38 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventGenerativeAICalledCalloutResponse model. */ +public class TurnEventGenerativeAICalledCalloutResponseTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventGenerativeAICalledCalloutResponse() throws Throwable { + TurnEventGenerativeAICalledCalloutResponse turnEventGenerativeAiCalledCalloutResponseModel = + new TurnEventGenerativeAICalledCalloutResponse(); + assertNull(turnEventGenerativeAiCalledCalloutResponseModel.getBody()); + assertNull(turnEventGenerativeAiCalledCalloutResponseModel.getStatusCode()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearchTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearchTest.java new file mode 100644 index 00000000000..cc2f49b478a --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearchTest.java @@ -0,0 +1,41 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventGenerativeAICalledCalloutSearch model. */ +public class TurnEventGenerativeAICalledCalloutSearchTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventGenerativeAICalledCalloutSearch() throws Throwable { + TurnEventGenerativeAICalledCalloutSearch turnEventGenerativeAiCalledCalloutSearchModel = + new TurnEventGenerativeAICalledCalloutSearch(); + assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getEngine()); + assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getIndex()); + assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getQuery()); + assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getRequest()); + assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getResponse()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutTest.java new file mode 100644 index 00000000000..977db8b13a0 --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutTest.java @@ -0,0 +1,41 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventGenerativeAICalledCallout model. */ +public class TurnEventGenerativeAICalledCalloutTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventGenerativeAICalledCallout() throws Throwable { + TurnEventGenerativeAICalledCallout turnEventGenerativeAiCalledCalloutModel = + new TurnEventGenerativeAICalledCallout(); + assertNull(turnEventGenerativeAiCalledCalloutModel.isSearchCalled()); + assertNull(turnEventGenerativeAiCalledCalloutModel.isLlmCalled()); + assertNull(turnEventGenerativeAiCalledCalloutModel.getSearch()); + assertNull(turnEventGenerativeAiCalledCalloutModel.getLlm()); + assertNull(turnEventGenerativeAiCalledCalloutModel.getIdkReasonCode()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetricsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetricsTest.java new file mode 100644 index 00000000000..338f770024c --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetricsTest.java @@ -0,0 +1,39 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventGenerativeAICalledMetrics model. */ +public class TurnEventGenerativeAICalledMetricsTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventGenerativeAICalledMetrics() throws Throwable { + TurnEventGenerativeAICalledMetrics turnEventGenerativeAiCalledMetricsModel = + new TurnEventGenerativeAICalledMetrics(); + assertNull(turnEventGenerativeAiCalledMetricsModel.getSearchTimeMs()); + assertNull(turnEventGenerativeAiCalledMetricsModel.getAnswerGenerationTimeMs()); + assertNull(turnEventGenerativeAiCalledMetricsModel.getTotalTimeMs()); + } +} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventStepSourceTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventStepSourceTest.java new file mode 100644 index 00000000000..2a16316e37f --- /dev/null +++ b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventStepSourceTest.java @@ -0,0 +1,41 @@ +/* + * (C) Copyright IBM Corp. 2025. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.ibm.watson.assistant.v2.model; + +import static org.testng.Assert.*; + +import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; +import com.ibm.watson.assistant.v2.utils.TestUtilities; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import org.testng.annotations.Test; + +/** Unit test class for the TurnEventStepSource model. */ +public class TurnEventStepSourceTest { + final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); + final List mockListFileWithMetadata = + TestUtilities.creatMockListFileWithMetadata(); + + @Test + public void testTurnEventStepSource() throws Throwable { + TurnEventStepSource turnEventStepSourceModel = new TurnEventStepSource(); + assertNull(turnEventStepSourceModel.getType()); + assertNull(turnEventStepSourceModel.getAction()); + assertNull(turnEventStepSourceModel.getActionTitle()); + assertNull(turnEventStepSourceModel.getStep()); + assertNull(turnEventStepSourceModel.isIsAiGuided()); + assertNull(turnEventStepSourceModel.isIsSkillBased()); + } +} From 83120486b3404441f3fe4d357ebf48c0c63ed510 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Tue, 27 May 2025 11:03:48 -0500 Subject: [PATCH 2/3] build(gha): update tag version --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 405f9027379..cafc11429da 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -85,7 +85,7 @@ jobs: - name: Publish to Maven Central env: - GHA_TAG: "refs/tags/v14.0.1" # for setMavenVersion_gha + GHA_TAG: "refs/tags/v14.0.2" # for setMavenVersion_gha OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} # for .travis.settings.xml OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} GPG_KEYNAME: ${{ secrets.SIGNING_KEY }} @@ -109,7 +109,7 @@ jobs: GHA_BUILD_NUMBER: ${{ github.run_number }} GHA_JOB_NUMBER: ${{ github.job_number }} GHA_COMMIT: ${{ github.sha }} - GHA_TAG: "refs/tags/v14.0.1" # for setMavenVersion_gha + GHA_TAG: "refs/tags/v14.0.2" # for setMavenVersion_gha run: | build/setMavenVersion_gha.sh mvn clean javadoc:aggregate $MVN_ARGS From ad5041772725906beafc6324d72929b5f112bca5 Mon Sep 17 00:00:00 2001 From: Angelo Paparazzi Date: Tue, 27 May 2025 13:43:42 -0500 Subject: [PATCH 3/3] chore: remove all uses of generative_ai turn_event The generative_ai turn_event must be removed because it introduces a breaking change to the MessageOutputDebugTurnEvent callout property which is not in-scope for this patch release --- .../assistant/v2/model/GenerativeAITask.java | 120 ----------------- .../GenerativeAITaskConfidenceScores.java | 74 ---------- ...erativeAITaskContentGroundedAnswering.java | 20 --- ...nerativeAITaskGeneralPurposeAnswering.java | 20 --- .../v2/model/MessageOutputDebugTurnEvent.java | 51 ++----- ...eOutputDebugTurnEventTurnEventCallout.java | 10 -- ...gTurnEventTurnEventGenerativeAICalled.java | 43 ------ .../TurnEventGenerativeAICalledCallout.java | 80 ----------- ...TurnEventGenerativeAICalledCalloutLlm.java | 114 ---------------- ...tGenerativeAICalledCalloutLlmResponse.java | 58 -------- ...EventGenerativeAICalledCalloutRequest.java | 127 ------------------ ...ventGenerativeAICalledCalloutResponse.java | 51 ------- ...nEventGenerativeAICalledCalloutSearch.java | 73 ---------- .../TurnEventGenerativeAICalledMetrics.java | 59 -------- .../GenerativeAITaskConfidenceScoresTest.java | 40 ------ ...iveAITaskContentGroundedAnsweringTest.java | 42 ------ ...tiveAITaskGeneralPurposeAnsweringTest.java | 39 ------ .../v2/model/GenerativeAITaskTest.java | 37 ----- ...nEventTurnEventGenerativeAICalledTest.java | 44 ------ ...erativeAICalledCalloutLlmResponseTest.java | 40 ------ ...EventGenerativeAICalledCalloutLlmTest.java | 44 ------ ...tGenerativeAICalledCalloutRequestTest.java | 43 ------ ...GenerativeAICalledCalloutResponseTest.java | 38 ------ ...ntGenerativeAICalledCalloutSearchTest.java | 41 ------ ...urnEventGenerativeAICalledCalloutTest.java | 41 ------ ...urnEventGenerativeAICalledMetricsTest.java | 39 ------ 26 files changed, 10 insertions(+), 1378 deletions(-) delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITask.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScores.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnswering.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnswering.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalled.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCallout.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlm.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponse.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequest.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponse.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearch.java delete mode 100644 assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetrics.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScoresTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnsweringTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnsweringTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponseTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequestTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponseTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearchTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutTest.java delete mode 100644 assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetricsTest.java diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITask.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITask.java deleted file mode 100644 index 6079e9da8de..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITask.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * GenerativeAITask. - * - *

Classes which extend this class: - GenerativeAITaskContentGroundedAnswering - - * GenerativeAITaskGeneralPurposeAnswering - */ -public class GenerativeAITask extends GenericModel { - @SuppressWarnings("unused") - protected static String discriminatorPropertyName = "task"; - - protected static java.util.Map> discriminatorMapping; - - static { - discriminatorMapping = new java.util.HashMap<>(); - discriminatorMapping.put( - "content_grounded_answering", GenerativeAITaskContentGroundedAnswering.class); - discriminatorMapping.put( - "general_purpose_answering", GenerativeAITaskGeneralPurposeAnswering.class); - } - - protected String task; - - @SerializedName("is_idk_response") - protected Boolean isIdkResponse; - - @SerializedName("is_hap_detected") - protected Boolean isHapDetected; - - @SerializedName("confidence_scores") - protected GenerativeAITaskConfidenceScores confidenceScores; - - @SerializedName("original_response") - protected String originalResponse; - - @SerializedName("inferred_query") - protected String inferredQuery; - - protected GenerativeAITask() {} - - /** - * Gets the task. - * - *

The type of generative ai task. - * - * @return the task - */ - public String getTask() { - return task; - } - - /** - * Gets the isIdkResponse. - * - *

Whether response was an idk response. - * - * @return the isIdkResponse - */ - public Boolean isIsIdkResponse() { - return isIdkResponse; - } - - /** - * Gets the isHapDetected. - * - *

Whether response was a hap response. - * - * @return the isHapDetected - */ - public Boolean isIsHapDetected() { - return isHapDetected; - } - - /** - * Gets the confidenceScores. - * - *

The confidence scores for determining whether to show the generated response or an “I don't - * know” response. - * - * @return the confidenceScores - */ - public GenerativeAITaskConfidenceScores getConfidenceScores() { - return confidenceScores; - } - - /** - * Gets the originalResponse. - * - * @return the originalResponse - */ - public String getOriginalResponse() { - return originalResponse; - } - - /** - * Gets the inferredQuery. - * - * @return the inferredQuery - */ - public String getInferredQuery() { - return inferredQuery; - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScores.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScores.java deleted file mode 100644 index c0ddfabaaf2..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScores.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** - * The confidence scores for determining whether to show the generated response or an “I don't know” - * response. - */ -public class GenerativeAITaskConfidenceScores extends GenericModel { - - @SerializedName("pre_gen") - protected Double preGen; - - @SerializedName("pre_gen_threshold") - protected Double preGenThreshold; - - @SerializedName("post_gen") - protected Double postGen; - - @SerializedName("post_gen_threshold") - protected Double postGenThreshold; - - protected GenerativeAITaskConfidenceScores() {} - - /** - * Gets the preGen. - * - * @return the preGen - */ - public Double getPreGen() { - return preGen; - } - - /** - * Gets the preGenThreshold. - * - * @return the preGenThreshold - */ - public Double getPreGenThreshold() { - return preGenThreshold; - } - - /** - * Gets the postGen. - * - * @return the postGen - */ - public Double getPostGen() { - return postGen; - } - - /** - * Gets the postGenThreshold. - * - * @return the postGenThreshold - */ - public Double getPostGenThreshold() { - return postGenThreshold; - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnswering.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnswering.java deleted file mode 100644 index 4c96b78743c..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnswering.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -/** GenerativeAITaskContentGroundedAnswering. */ -public class GenerativeAITaskContentGroundedAnswering extends GenerativeAITask { - - protected GenerativeAITaskContentGroundedAnswering() {} -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnswering.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnswering.java deleted file mode 100644 index 08be88ad80f..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnswering.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -/** GenerativeAITaskGeneralPurposeAnswering. */ -public class GenerativeAITaskGeneralPurposeAnswering extends GenerativeAITask { - - protected GenerativeAITaskGeneralPurposeAnswering() {} -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java index dafe4b2dca4..be13a89f0e1 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEvent.java @@ -32,7 +32,6 @@ * MessageOutputDebugTurnEventTurnEventTopicSwitchDenied - * MessageOutputDebugTurnEventTurnEventActionRoutingDenied - * MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied - - * MessageOutputDebugTurnEventTurnEventGenerativeAICalled - * MessageOutputDebugTurnEventTurnEventClientActions */ public class MessageOutputDebugTurnEvent extends GenericModel { @@ -66,8 +65,6 @@ public class MessageOutputDebugTurnEvent extends GenericModel { discriminatorMapping.put( "suggestion_intents_denied", MessageOutputDebugTurnEventTurnEventSuggestionIntentsDenied.class); - discriminatorMapping.put( - "generative_ai_called", MessageOutputDebugTurnEventTurnEventGenerativeAICalled.class); discriminatorMapping.put( "client_actions", MessageOutputDebugTurnEventTurnEventClientActions.class); } @@ -123,21 +120,13 @@ public interface Reason { protected Boolean hasQuestion; protected Boolean prompted; - + protected TurnEventCalloutCallout callout; @SerializedName("route_name") protected String routeName; @SerializedName("intents_denied") protected List intentsDenied; - @SerializedName("generative_ai_start_time") - protected String generativeAiStartTime; - - @SerializedName("generative_ai") - protected GenerativeAITask generativeAi; - - protected TurnEventGenerativeAICalledMetrics metrics; - @SerializedName("client_actions") protected List clientActions; @@ -233,6 +222,15 @@ public Boolean isPrompted() { return prompted; } + /** + * Gets the callout. + * + * @return the callout + */ + public TurnEventCalloutCallout getCallout() { + return callout; + } + /** * Gets the routeName. * @@ -255,35 +253,6 @@ public List getIntentsDenied() { return intentsDenied; } - /** - * Gets the generativeAiStartTime. - * - *

The time when generative ai started processing the message. - * - * @return the generativeAiStartTime - */ - public String getGenerativeAiStartTime() { - return generativeAiStartTime; - } - - /** - * Gets the generativeAi. - * - * @return the generativeAi - */ - public GenerativeAITask getGenerativeAi() { - return generativeAi; - } - - /** - * Gets the metrics. - * - * @return the metrics - */ - public TurnEventGenerativeAICalledMetrics getMetrics() { - return metrics; - } - /** * Gets the clientActions. * diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java index c37d5730795..d4ec6acead8 100644 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java +++ b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventCallout.java @@ -18,7 +18,6 @@ public class MessageOutputDebugTurnEventTurnEventCallout extends MessageOutputDe protected TurnEventActionSource source; protected TurnEventCalloutError error; - protected TurnEventCalloutCallout callout; protected MessageOutputDebugTurnEventTurnEventCallout() {} @@ -39,13 +38,4 @@ public TurnEventActionSource getSource() { public TurnEventCalloutError getError() { return error; } - - /** - * Gets the callout. - * - * @return the callout - */ - public TurnEventCalloutCallout getCallout() { - return callout; - } } diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalled.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalled.java deleted file mode 100644 index 456cefcd0cc..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalled.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -/** MessageOutputDebugTurnEventTurnEventGenerativeAICalled. */ -public class MessageOutputDebugTurnEventTurnEventGenerativeAICalled - extends MessageOutputDebugTurnEvent { - - protected Object source; - - protected TurnEventGenerativeAICalledCallout callout; - - protected MessageOutputDebugTurnEventTurnEventGenerativeAICalled() {} - - /** - * Gets the source. - * - * @return the source - */ - public Object getSource() { - return source; - } - - /** - * Gets the callout. - * - * @return the callout - */ - public TurnEventGenerativeAICalledCallout getCallout() { - return callout; - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCallout.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCallout.java deleted file mode 100644 index 58e2976aa00..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCallout.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** TurnEventGenerativeAICalledCallout. */ -public class TurnEventGenerativeAICalledCallout extends GenericModel { - - @SerializedName("search_called") - protected Boolean searchCalled; - - @SerializedName("llm_called") - protected Boolean llmCalled; - - protected TurnEventGenerativeAICalledCalloutSearch search; - protected TurnEventGenerativeAICalledCalloutLlm llm; - - @SerializedName("idk_reason_code") - protected String idkReasonCode; - - protected TurnEventGenerativeAICalledCallout() {} - - /** - * Gets the searchCalled. - * - * @return the searchCalled - */ - public Boolean isSearchCalled() { - return searchCalled; - } - - /** - * Gets the llmCalled. - * - * @return the llmCalled - */ - public Boolean isLlmCalled() { - return llmCalled; - } - - /** - * Gets the search. - * - * @return the search - */ - public TurnEventGenerativeAICalledCalloutSearch getSearch() { - return search; - } - - /** - * Gets the llm. - * - * @return the llm - */ - public TurnEventGenerativeAICalledCalloutLlm getLlm() { - return llm; - } - - /** - * Gets the idkReasonCode. - * - * @return the idkReasonCode - */ - public String getIdkReasonCode() { - return idkReasonCode; - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlm.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlm.java deleted file mode 100644 index e449783b143..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlm.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.List; - -/** TurnEventGenerativeAICalledCalloutLlm. */ -public class TurnEventGenerativeAICalledCalloutLlm extends GenericModel { - - protected String type; - - @SerializedName("model_id") - protected String modelId; - - @SerializedName("model_class_id") - protected String modelClassId; - - @SerializedName("generated_token_count") - protected Long generatedTokenCount; - - @SerializedName("input_token_count") - protected Long inputTokenCount; - - protected Boolean success; - protected TurnEventGenerativeAICalledCalloutLlmResponse response; - protected List request; - - protected TurnEventGenerativeAICalledCalloutLlm() {} - - /** - * Gets the type. - * - * @return the type - */ - public String getType() { - return type; - } - - /** - * Gets the modelId. - * - * @return the modelId - */ - public String getModelId() { - return modelId; - } - - /** - * Gets the modelClassId. - * - * @return the modelClassId - */ - public String getModelClassId() { - return modelClassId; - } - - /** - * Gets the generatedTokenCount. - * - * @return the generatedTokenCount - */ - public Long getGeneratedTokenCount() { - return generatedTokenCount; - } - - /** - * Gets the inputTokenCount. - * - * @return the inputTokenCount - */ - public Long getInputTokenCount() { - return inputTokenCount; - } - - /** - * Gets the success. - * - * @return the success - */ - public Boolean isSuccess() { - return success; - } - - /** - * Gets the response. - * - * @return the response - */ - public TurnEventGenerativeAICalledCalloutLlmResponse getResponse() { - return response; - } - - /** - * Gets the request. - * - * @return the request - */ - public List getRequest() { - return request; - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponse.java deleted file mode 100644 index 0b6b4b396e9..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponse.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** */ -public class TurnEventGenerativeAICalledCalloutLlmResponse extends GenericModel { - - protected String text; - - @SerializedName("response_type") - protected String responseType; - - @SerializedName("is_idk_response") - protected Boolean isIdkResponse; - - protected TurnEventGenerativeAICalledCalloutLlmResponse() {} - - /** - * Gets the text. - * - * @return the text - */ - public String getText() { - return text; - } - - /** - * Gets the responseType. - * - * @return the responseType - */ - public String getResponseType() { - return responseType; - } - - /** - * Gets the isIdkResponse. - * - * @return the isIdkResponse - */ - public Boolean isIsIdkResponse() { - return isIdkResponse; - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequest.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequest.java deleted file mode 100644 index 06d6a2fb81a..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; -import java.util.Map; - -/** TurnEventGenerativeAICalledCalloutRequest. */ -public class TurnEventGenerativeAICalledCalloutRequest extends GenericModel { - - /** The REST method of the request. */ - public interface Method { - /** GET. */ - String GET = "GET"; - /** POST. */ - String POST = "POST"; - /** PUT. */ - String PUT = "PUT"; - /** DELETE. */ - String DELETE = "DELETE"; - /** PATCH. */ - String PATCH = "PATCH"; - } - - protected String method; - protected String url; - protected String port; - protected String path; - - @SerializedName("query_parameters") - protected String queryParameters; - - protected Map headers; - protected Map body; - - protected TurnEventGenerativeAICalledCalloutRequest() {} - - /** - * Gets the method. - * - *

The REST method of the request. - * - * @return the method - */ - public String getMethod() { - return method; - } - - /** - * Gets the url. - * - *

The host URL of the request call. - * - * @return the url - */ - public String getUrl() { - return url; - } - - /** - * Gets the port. - * - *

The host port of the request call. - * - * @return the port - */ - public String getPort() { - return port; - } - - /** - * Gets the path. - * - *

The URL path of the request call. - * - * @return the path - */ - public String getPath() { - return path; - } - - /** - * Gets the queryParameters. - * - *

Any query parameters appended to the URL of the request call. - * - * @return the queryParameters - */ - public String getQueryParameters() { - return queryParameters; - } - - /** - * Gets the headers. - * - *

Any headers included in the request call. - * - * @return the headers - */ - public Map getHeaders() { - return headers; - } - - /** - * Gets the body. - * - *

Contains the response of the external server or an object. In cases like timeouts or - * connections errors, it will contain details of why the callout to the external server failed. - * - * @return the body - */ - public Map getBody() { - return body; - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponse.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponse.java deleted file mode 100644 index 8202916b42b..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponse.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** TurnEventGenerativeAICalledCalloutResponse. */ -public class TurnEventGenerativeAICalledCalloutResponse extends GenericModel { - - protected String body; - - @SerializedName("status_code") - protected Long statusCode; - - protected TurnEventGenerativeAICalledCalloutResponse() {} - - /** - * Gets the body. - * - *

The final response string. This response is a composition of every partial chunk received - * from the stream. - * - * @return the body - */ - public String getBody() { - return body; - } - - /** - * Gets the statusCode. - * - *

The final status code of the response. - * - * @return the statusCode - */ - public Long getStatusCode() { - return statusCode; - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearch.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearch.java deleted file mode 100644 index ce03cc2beba..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearch.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** TurnEventGenerativeAICalledCalloutSearch. */ -public class TurnEventGenerativeAICalledCalloutSearch extends GenericModel { - - protected String engine; - protected String index; - protected String query; - protected TurnEventGenerativeAICalledCalloutRequest request; - protected TurnEventGenerativeAICalledCalloutResponse response; - - protected TurnEventGenerativeAICalledCalloutSearch() {} - - /** - * Gets the engine. - * - * @return the engine - */ - public String getEngine() { - return engine; - } - - /** - * Gets the index. - * - * @return the index - */ - public String getIndex() { - return index; - } - - /** - * Gets the query. - * - * @return the query - */ - public String getQuery() { - return query; - } - - /** - * Gets the request. - * - * @return the request - */ - public TurnEventGenerativeAICalledCalloutRequest getRequest() { - return request; - } - - /** - * Gets the response. - * - * @return the response - */ - public TurnEventGenerativeAICalledCalloutResponse getResponse() { - return response; - } -} diff --git a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetrics.java b/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetrics.java deleted file mode 100644 index cb3bb31154a..00000000000 --- a/assistant/src/main/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetrics.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import com.google.gson.annotations.SerializedName; -import com.ibm.cloud.sdk.core.service.model.GenericModel; - -/** TurnEventGenerativeAICalledMetrics. */ -public class TurnEventGenerativeAICalledMetrics extends GenericModel { - - @SerializedName("search_time_ms") - protected Double searchTimeMs; - - @SerializedName("answer_generation_time_ms") - protected Double answerGenerationTimeMs; - - @SerializedName("total_time_ms") - protected Double totalTimeMs; - - protected TurnEventGenerativeAICalledMetrics() {} - - /** - * Gets the searchTimeMs. - * - * @return the searchTimeMs - */ - public Double getSearchTimeMs() { - return searchTimeMs; - } - - /** - * Gets the answerGenerationTimeMs. - * - * @return the answerGenerationTimeMs - */ - public Double getAnswerGenerationTimeMs() { - return answerGenerationTimeMs; - } - - /** - * Gets the totalTimeMs. - * - * @return the totalTimeMs - */ - public Double getTotalTimeMs() { - return totalTimeMs; - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScoresTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScoresTest.java deleted file mode 100644 index 316b7dceacb..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskConfidenceScoresTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GenerativeAITaskConfidenceScores model. */ -public class GenerativeAITaskConfidenceScoresTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGenerativeAITaskConfidenceScores() throws Throwable { - GenerativeAITaskConfidenceScores generativeAiTaskConfidenceScoresModel = - new GenerativeAITaskConfidenceScores(); - assertNull(generativeAiTaskConfidenceScoresModel.getPreGen()); - assertNull(generativeAiTaskConfidenceScoresModel.getPreGenThreshold()); - assertNull(generativeAiTaskConfidenceScoresModel.getPostGen()); - assertNull(generativeAiTaskConfidenceScoresModel.getPostGenThreshold()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnsweringTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnsweringTest.java deleted file mode 100644 index aea5012576b..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskContentGroundedAnsweringTest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GenerativeAITaskContentGroundedAnswering model. */ -public class GenerativeAITaskContentGroundedAnsweringTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGenerativeAITaskContentGroundedAnswering() throws Throwable { - GenerativeAITaskContentGroundedAnswering generativeAiTaskContentGroundedAnsweringModel = - new GenerativeAITaskContentGroundedAnswering(); - assertNull(generativeAiTaskContentGroundedAnsweringModel.getTask()); - assertNull(generativeAiTaskContentGroundedAnsweringModel.isIsIdkResponse()); - assertNull(generativeAiTaskContentGroundedAnsweringModel.isIsHapDetected()); - assertNull(generativeAiTaskContentGroundedAnsweringModel.getConfidenceScores()); - assertNull(generativeAiTaskContentGroundedAnsweringModel.getOriginalResponse()); - assertNull(generativeAiTaskContentGroundedAnsweringModel.getInferredQuery()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnsweringTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnsweringTest.java deleted file mode 100644 index f1475bab523..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskGeneralPurposeAnsweringTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GenerativeAITaskGeneralPurposeAnswering model. */ -public class GenerativeAITaskGeneralPurposeAnsweringTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testGenerativeAITaskGeneralPurposeAnswering() throws Throwable { - GenerativeAITaskGeneralPurposeAnswering generativeAiTaskGeneralPurposeAnsweringModel = - new GenerativeAITaskGeneralPurposeAnswering(); - assertNull(generativeAiTaskGeneralPurposeAnsweringModel.getTask()); - assertNull(generativeAiTaskGeneralPurposeAnsweringModel.isIsIdkResponse()); - assertNull(generativeAiTaskGeneralPurposeAnsweringModel.isIsHapDetected()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskTest.java deleted file mode 100644 index 534205cdf50..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/GenerativeAITaskTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the GenerativeAITask model. */ -public class GenerativeAITaskTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - // TODO: Add tests for models that are abstract - @Test - public void testGenerativeAITask() throws Throwable { - GenerativeAITask generativeAiTaskModel = new GenerativeAITask(); - assertNotNull(generativeAiTaskModel); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest.java deleted file mode 100644 index 9d9868529a1..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the MessageOutputDebugTurnEventTurnEventGenerativeAICalled model. */ -public class MessageOutputDebugTurnEventTurnEventGenerativeAICalledTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testMessageOutputDebugTurnEventTurnEventGenerativeAICalled() throws Throwable { - MessageOutputDebugTurnEventTurnEventGenerativeAICalled - messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel = - new MessageOutputDebugTurnEventTurnEventGenerativeAICalled(); - assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getEvent()); - assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getSource()); - assertNull( - messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getGenerativeAiStartTime()); - assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getGenerativeAi()); - assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getCallout()); - assertNull(messageOutputDebugTurnEventTurnEventGenerativeAiCalledModel.getMetrics()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponseTest.java deleted file mode 100644 index 306a90a8e37..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmResponseTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TurnEventGenerativeAICalledCalloutLlmResponse model. */ -public class TurnEventGenerativeAICalledCalloutLlmResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTurnEventGenerativeAICalledCalloutLlmResponse() throws Throwable { - TurnEventGenerativeAICalledCalloutLlmResponse - turnEventGenerativeAiCalledCalloutLlmResponseModel = - new TurnEventGenerativeAICalledCalloutLlmResponse(); - assertNull(turnEventGenerativeAiCalledCalloutLlmResponseModel.getText()); - assertNull(turnEventGenerativeAiCalledCalloutLlmResponseModel.getResponseType()); - assertNull(turnEventGenerativeAiCalledCalloutLlmResponseModel.isIsIdkResponse()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmTest.java deleted file mode 100644 index c61732e31b9..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutLlmTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TurnEventGenerativeAICalledCalloutLlm model. */ -public class TurnEventGenerativeAICalledCalloutLlmTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTurnEventGenerativeAICalledCalloutLlm() throws Throwable { - TurnEventGenerativeAICalledCalloutLlm turnEventGenerativeAiCalledCalloutLlmModel = - new TurnEventGenerativeAICalledCalloutLlm(); - assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getType()); - assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getModelId()); - assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getModelClassId()); - assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getGeneratedTokenCount()); - assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getInputTokenCount()); - assertNull(turnEventGenerativeAiCalledCalloutLlmModel.isSuccess()); - assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getResponse()); - assertNull(turnEventGenerativeAiCalledCalloutLlmModel.getRequest()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequestTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequestTest.java deleted file mode 100644 index 9ee92bf2dd3..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutRequestTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TurnEventGenerativeAICalledCalloutRequest model. */ -public class TurnEventGenerativeAICalledCalloutRequestTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTurnEventGenerativeAICalledCalloutRequest() throws Throwable { - TurnEventGenerativeAICalledCalloutRequest turnEventGenerativeAiCalledCalloutRequestModel = - new TurnEventGenerativeAICalledCalloutRequest(); - assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getMethod()); - assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getUrl()); - assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getPort()); - assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getPath()); - assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getQueryParameters()); - assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getHeaders()); - assertNull(turnEventGenerativeAiCalledCalloutRequestModel.getBody()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponseTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponseTest.java deleted file mode 100644 index 9104deb2454..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutResponseTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TurnEventGenerativeAICalledCalloutResponse model. */ -public class TurnEventGenerativeAICalledCalloutResponseTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTurnEventGenerativeAICalledCalloutResponse() throws Throwable { - TurnEventGenerativeAICalledCalloutResponse turnEventGenerativeAiCalledCalloutResponseModel = - new TurnEventGenerativeAICalledCalloutResponse(); - assertNull(turnEventGenerativeAiCalledCalloutResponseModel.getBody()); - assertNull(turnEventGenerativeAiCalledCalloutResponseModel.getStatusCode()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearchTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearchTest.java deleted file mode 100644 index cc2f49b478a..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutSearchTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TurnEventGenerativeAICalledCalloutSearch model. */ -public class TurnEventGenerativeAICalledCalloutSearchTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTurnEventGenerativeAICalledCalloutSearch() throws Throwable { - TurnEventGenerativeAICalledCalloutSearch turnEventGenerativeAiCalledCalloutSearchModel = - new TurnEventGenerativeAICalledCalloutSearch(); - assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getEngine()); - assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getIndex()); - assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getQuery()); - assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getRequest()); - assertNull(turnEventGenerativeAiCalledCalloutSearchModel.getResponse()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutTest.java deleted file mode 100644 index 977db8b13a0..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledCalloutTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TurnEventGenerativeAICalledCallout model. */ -public class TurnEventGenerativeAICalledCalloutTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTurnEventGenerativeAICalledCallout() throws Throwable { - TurnEventGenerativeAICalledCallout turnEventGenerativeAiCalledCalloutModel = - new TurnEventGenerativeAICalledCallout(); - assertNull(turnEventGenerativeAiCalledCalloutModel.isSearchCalled()); - assertNull(turnEventGenerativeAiCalledCalloutModel.isLlmCalled()); - assertNull(turnEventGenerativeAiCalledCalloutModel.getSearch()); - assertNull(turnEventGenerativeAiCalledCalloutModel.getLlm()); - assertNull(turnEventGenerativeAiCalledCalloutModel.getIdkReasonCode()); - } -} diff --git a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetricsTest.java b/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetricsTest.java deleted file mode 100644 index 338f770024c..00000000000 --- a/assistant/src/test/java/com/ibm/watson/assistant/v2/model/TurnEventGenerativeAICalledMetricsTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * (C) Copyright IBM Corp. 2025. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.ibm.watson.assistant.v2.model; - -import static org.testng.Assert.*; - -import com.ibm.cloud.sdk.core.service.model.FileWithMetadata; -import com.ibm.watson.assistant.v2.utils.TestUtilities; -import java.io.InputStream; -import java.util.HashMap; -import java.util.List; -import org.testng.annotations.Test; - -/** Unit test class for the TurnEventGenerativeAICalledMetrics model. */ -public class TurnEventGenerativeAICalledMetricsTest { - final HashMap mockStreamMap = TestUtilities.createMockStreamMap(); - final List mockListFileWithMetadata = - TestUtilities.creatMockListFileWithMetadata(); - - @Test - public void testTurnEventGenerativeAICalledMetrics() throws Throwable { - TurnEventGenerativeAICalledMetrics turnEventGenerativeAiCalledMetricsModel = - new TurnEventGenerativeAICalledMetrics(); - assertNull(turnEventGenerativeAiCalledMetricsModel.getSearchTimeMs()); - assertNull(turnEventGenerativeAiCalledMetricsModel.getAnswerGenerationTimeMs()); - assertNull(turnEventGenerativeAiCalledMetricsModel.getTotalTimeMs()); - } -}