Class MessageResponse

java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.assistant.v1.model.MessageResponse
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class MessageResponse
extends com.ibm.cloud.sdk.core.service.model.GenericModel
The response sent by the workspace, including the output text, detected intents and entities, and context.
  • Constructor Details

    • MessageResponse

      public MessageResponse()
  • Method Details

    • getInput

      public MessageInput getInput()
      Gets the input.

      An input object that includes the input text.

      Returns:
      the input
    • getIntents

      public List<RuntimeIntent> getIntents()
      Gets the intents.

      An array of intents recognized in the user input, sorted in descending order of confidence.

      Returns:
      the intents
    • getEntities

      public List<RuntimeEntity> getEntities()
      Gets the entities.

      An array of entities identified in the user input.

      Returns:
      the entities
    • isAlternateIntents

      public Boolean isAlternateIntents()
      Gets the alternateIntents.

      Whether to return more than one intent. A value of `true` indicates that all matching intents are returned.

      Returns:
      the alternateIntents
    • getContext

      public Context getContext()
      Gets the context.

      State information for the conversation. To maintain state, include the context from the previous response.

      Returns:
      the context
    • getOutput

      public OutputData getOutput()
      Gets the output.

      An output object that includes the response to the user, the dialog nodes that were triggered, and messages from the log.

      Returns:
      the output
    • getActions

      public List<DialogNodeAction> getActions()
      Gets the actions.

      An array of objects describing any actions requested by the dialog node.

      Returns:
      the actions
    • getUserId

      public String getUserId()
      Gets the userId.

      A string value that identifies the user who is interacting with the workspace. The client must provide a unique identifier for each individual end user who accesses the application. For user-based plans, this user ID is used to identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters. If no value is specified in the input, **user_id** is automatically set to the value of **context.conversation_id**.

      **Note:** This property is the same as the **user_id** property in the context metadata. If **user_id** is specified in both locations in a message request, the value specified at the root is used.

      Returns:
      the userId