Skip to content

Commit

Permalink
feat(assistant-v2): add SEARCH as a type of the message to MessageInp…
Browse files Browse the repository at this point in the history
…ut & MessageInputStateless
  • Loading branch information
kevinkowa committed Sep 9, 2021
1 parent 6cd0b2e commit b9a3427
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2018, 2020.
* (C) Copyright IBM Corp. 2021.
*
* 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
Expand All @@ -20,10 +20,20 @@
/** An input object that includes the input text. */
public class MessageInput extends GenericModel {

/** The type of user input. Currently, only text input is supported. */
/**
* The type of the message:
*
* <p>- `text`: The user input is processed normally by the assistant. - `search`: Only search
* results are returned. (Any dialog or actions skill is bypassed.)
*
* <p>**Note:** A `search` message results in an error if no search skill is configured for the
* assistant.
*/
public interface MessageType {
/** text. */
String TEXT = "text";
/** search. */
String SEARCH = "search";
}

@SerializedName("message_type")
Expand Down Expand Up @@ -186,7 +196,13 @@ public Builder newBuilder() {
/**
* Gets the messageType.
*
* <p>The type of user input. Currently, only text input is supported.
* <p>The type of the message:
*
* <p>- `text`: The user input is processed normally by the assistant. - `search`: Only search
* results are returned. (Any dialog or actions skill is bypassed.)
*
* <p>**Note:** A `search` message results in an error if no search skill is configured for the
* assistant.
*
* @return the messageType
*/
Expand Down
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2020.
* (C) Copyright IBM Corp. 2021.
*
* 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
Expand All @@ -20,10 +20,20 @@
/** An input object that includes the input text. */
public class MessageInputStateless extends GenericModel {

/** The type of user input. Currently, only text input is supported. */
/**
* The type of the message:
*
* <p>- `text`: The user input is processed normally by the assistant. - `search`: Only search
* results are returned. (Any dialog or actions skill is bypassed.)
*
* <p>**Note:** A `search` message results in an error if no search skill is configured for the
* assistant.
*/
public interface MessageType {
/** text. */
String TEXT = "text";
/** search. */
String SEARCH = "search";
}

@SerializedName("message_type")
Expand Down Expand Up @@ -186,7 +196,13 @@ public Builder newBuilder() {
/**
* Gets the messageType.
*
* <p>The type of user input. Currently, only text input is supported.
* <p>The type of the message:
*
* <p>- `text`: The user input is processed normally by the assistant. - `search`: Only search
* results are returned. (Any dialog or actions skill is bypassed.)
*
* <p>**Note:** A `search` message results in an error if no search skill is configured for the
* assistant.
*
* @return the messageType
*/
Expand Down

0 comments on commit b9a3427

Please sign in to comment.