lib/ibm_watson/assistant_v1.rb
def message(workspace_id:, input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, nodes_visited_details: nil)
      raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "message")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version,
        "nodes_visited_details" => nodes_visited_details
      }

      data = {
        "input" => input,
        "intents" => intents,
        "entities" => entities,
        "alternate_intents" => alternate_intents,
        "context" => context,
        "output" => output
      }

      method_url = "/v1/workspaces/%s/message" % [ERB::Util.url_encode(workspace_id)]

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
def message(workspace_id:, input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, nodes_visited_details: nil)
      raise ArgumentError.new("workspace_id must be provided") if workspace_id.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("conversation", "V1", "message")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version,
        "nodes_visited_details" => nodes_visited_details
      }

      data = {
        "input" => input,
        "intents" => intents,
        "entities" => entities,
        "alternate_intents" => alternate_intents,
        "context" => context,
        "output" => output
      }

      method_url = "/v1/workspaces/%s/message" % [ERB::Util.url_encode(workspace_id)]

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
@!method initialize(args)
 Construct a new client for the Assistant service.

 @param args [Hash] The args to initialize with
 @option args version [String] The API version date to use with the service, in
   "YYYY-MM-DD" format. Whenever the API is changed in a backwards
   incompatible way, a new minor version of the API is released.
   The service uses the API version for the date you specify, or
   the most recent version before that date. Note that you should
   not programmatically specify the current date at runtime, in
   case the API has been updated since your application's release.
   Instead, specify a version date that is compatible with your
   application, and don't change it until your application is
   ready for a later version.
 @option args url [String] The base url to use when contacting the service (e.g.
   "https://gateway.watsonplatform.net/assistant/api").
   The base url may differ between Bluemix regions.
 @option args username [String] The username used to authenticate with the service.
   Username and password credentials are only required to run your
   application locally or outside of Bluemix. When running on
   Bluemix, the credentials will be automatically loaded from the
   `VCAP_SERVICES` environment variable.
 @option args password [String] The password used to authenticate with the service.
   Username and password credentials are only required to run your
   application locally or outside of Bluemix. When running on
   Bluemix, the credentials will be automatically loaded from the
   `VCAP_SERVICES` environment variable.
 @option args iam_apikey [String] An API key that can be used to request IAM tokens. If
   this API key is provided, the SDK will manage the token and handle the
   refreshing.
 @option args iam_access_token [String] An IAM access token is fully managed by the application.
   Responsibility falls on the application to refresh the token, either before
   it expires or reactively upon receiving a 401 from the service as any requests
   made with an expired token will fail.
 @option args iam_url [String] An optional URL for the IAM service API. Defaults to
   'https://iam.ng.bluemix.net/identity/token'.

 Message


 @!method message(workspace_id:, input: nil, intents: nil, entities: nil, alternate_intents: nil, context: nil, output: nil, nodes_visited_details: nil)
 Get response to user input.
 Send user input to a workspace and receive a response.

   There is no rate limit for this operation.
 @param workspace_id [String] Unique identifier of the workspace.
 @param input [MessageInput] An input object that includes the input text.
 @param intents [Array[RuntimeIntent]] Intents to use when evaluating the user input. Include intents from the previous
   response to continue using those intents rather than trying to recognize intents
   in the new input.
 @param entities [Array[RuntimeEntity]] Entities to use when evaluating the message. Include entities from the previous
   response to continue using those entities rather than detecting entities in the
   new input.
 @param alternate_intents [Boolean] Whether to return more than one intent. A value of `true` indicates that all
   matching intents are returned.
 @param context [Context] State information for the conversation. To maintain state, include the context
   from the previous response.
 @param output [OutputData] An output object that includes the response to the user, the dialog nodes that
   were triggered, and messages from the log.
 @param nodes_visited_details [Boolean] Whether to include additional diagnostic information about the dialog nodes that
   were visited during processing of the message.
 @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.