Class MessageResponse

All Implemented Interfaces:

public class MessageResponse
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.

      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.

      the intents
    • getEntities

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

      An array of entities identified in the user input.

      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.

      the alternateIntents
    • getContext

      public Context getContext()
      Gets the context.

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

      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.

      the output
    • getActions

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

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

      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.

      the userId