Skip to content

Commit b9a3427

Browse files
committed
feat(assistant-v2): add SEARCH as a type of the message to MessageInput & MessageInputStateless
1 parent 6cd0b2e commit b9a3427

File tree

2 files changed

+38
-6
lines changed

2 files changed

+38
-6
lines changed

assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInput.java

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2018, 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -20,10 +20,20 @@
2020
/** An input object that includes the input text. */
2121
public class MessageInput extends GenericModel {
2222

23-
/** The type of user input. Currently, only text input is supported. */
23+
/**
24+
* The type of the message:
25+
*
26+
* <p>- `text`: The user input is processed normally by the assistant. - `search`: Only search
27+
* results are returned. (Any dialog or actions skill is bypassed.)
28+
*
29+
* <p>**Note:** A `search` message results in an error if no search skill is configured for the
30+
* assistant.
31+
*/
2432
public interface MessageType {
2533
/** text. */
2634
String TEXT = "text";
35+
/** search. */
36+
String SEARCH = "search";
2737
}
2838

2939
@SerializedName("message_type")
@@ -186,7 +196,13 @@ public Builder newBuilder() {
186196
/**
187197
* Gets the messageType.
188198
*
189-
* <p>The type of user input. Currently, only text input is supported.
199+
* <p>The type of the message:
200+
*
201+
* <p>- `text`: The user input is processed normally by the assistant. - `search`: Only search
202+
* results are returned. (Any dialog or actions skill is bypassed.)
203+
*
204+
* <p>**Note:** A `search` message results in an error if no search skill is configured for the
205+
* assistant.
190206
*
191207
* @return the messageType
192208
*/

assistant/src/main/java/com/ibm/watson/assistant/v2/model/MessageInputStateless.java

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -20,10 +20,20 @@
2020
/** An input object that includes the input text. */
2121
public class MessageInputStateless extends GenericModel {
2222

23-
/** The type of user input. Currently, only text input is supported. */
23+
/**
24+
* The type of the message:
25+
*
26+
* <p>- `text`: The user input is processed normally by the assistant. - `search`: Only search
27+
* results are returned. (Any dialog or actions skill is bypassed.)
28+
*
29+
* <p>**Note:** A `search` message results in an error if no search skill is configured for the
30+
* assistant.
31+
*/
2432
public interface MessageType {
2533
/** text. */
2634
String TEXT = "text";
35+
/** search. */
36+
String SEARCH = "search";
2737
}
2838

2939
@SerializedName("message_type")
@@ -186,7 +196,13 @@ public Builder newBuilder() {
186196
/**
187197
* Gets the messageType.
188198
*
189-
* <p>The type of user input. Currently, only text input is supported.
199+
* <p>The type of the message:
200+
*
201+
* <p>- `text`: The user input is processed normally by the assistant. - `search`: Only search
202+
* results are returned. (Any dialog or actions skill is bypassed.)
203+
*
204+
* <p>**Note:** A `search` message results in an error if no search skill is configured for the
205+
* assistant.
190206
*
191207
* @return the messageType
192208
*/

0 commit comments

Comments
 (0)