Module Values.PutSessionResponseSource

Creates a new session or modifies an existing session with an Amazon Lex bot. Use this operation to enable your application to set the state of the bot. For more information, see Managing Sessions.

Sourcetype nonrec t = {
  1. contentType : HttpContentType.t option;
    (*

    Content type as specified in the Accept HTTP header in the request.

    *)
  2. intentName : IntentName.t option;
    (*

    The name of the current intent.

    *)
  3. slots : String_.t option;
    (*

    Map of zero or more intent slots Amazon Lex detected from the user input during the conversation. Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined by the valueSelectionStrategy selected when the slot type was created or updated. If valueSelectionStrategy is set to ORIGINAL_VALUE, the value provided by the user is returned, if the user value is similar to the slot values. If valueSelectionStrategy is set to TOP_RESOLUTION Amazon Lex returns the first value in the resolution list or, if there is no resolution list, null. If you don't specify a valueSelectionStrategy the default is ORIGINAL_VALUE.

    *)
  4. sessionAttributes : String_.t option;
    (*

    Map of key/value pairs representing session-specific context information.

    *)
  5. message : Text.t option;
    (*

    The next message that should be presented to the user. You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the message field is null. You should use the encodedMessage field instead.

    *)
  6. encodedMessage : SensitiveString.t option;
    (*

    The next message that should be presented to the user. The encodedMessage field is base-64 encoded. You must decode the field before you can use the value.

    *)
  7. messageFormat : MessageFormatType.t option;
    (*

    The format of the response message. One of the following values: PlainText - The message contains plain UTF-8 text. CustomPayload - The message is a custom format for the client. SSML - The message contains text formatted for voice output. Composite - The message contains an escaped JSON object containing one or more messages from the groups that messages were assigned to when the intent was created.

    *)
  8. dialogState : DialogState.t option;
    (*

    ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response to confirm the intent before fulfilling an intent. ElicitIntent - Amazon Lex wants to elicit the user's intent. ElicitSlot - Amazon Lex is expecting the value of a slot for the current intent. Failed - Conveys that the conversation with the user has failed. This can happen for various reasons, including the user does not provide an appropriate response to prompts from the service, or if the Lambda function fails to fulfill the intent. Fulfilled - Conveys that the Lambda function has sucessfully fulfilled the intent. ReadyForFulfillment - Conveys that the client has to fulfill the intent.

    *)
  9. slotToElicit : String_.t option;
    (*

    If the dialogState is ElicitSlot, returns the name of the slot for which Amazon Lex is eliciting a value.

    *)
  10. audioStream : BlobStream.t option;
    (*

    The audio version of the message to convey to the user.

    *)
  11. sessionId : String_.t option;
    (*

    A unique identifier for the session.

    *)
  12. activeContexts : ActiveContextsString.t option;
    (*

    A list of active contexts for the session.

    *)
}
Sourcetype nonrec error = [
  1. | `BadGatewayException of BadGatewayException.t
  2. | `BadRequestException of BadRequestException.t
  3. | `ConflictException of ConflictException.t
  4. | `DependencyFailedException of DependencyFailedException.t
  5. | `InternalFailureException of InternalFailureException.t
  6. | `LimitExceededException of LimitExceededException.t
  7. | `NotAcceptableException of NotAcceptableException.t
  8. | `NotFoundException of NotFoundException.t
  9. | `Unknown_operation_error of string * string option
]
Sourceval make : ?contentType:??? -> ?intentName:??? -> ?slots:??? -> ?sessionAttributes:??? -> ?message:??? -> ?encodedMessage:??? -> ?messageFormat:??? -> ?dialogState:??? -> ?slotToElicit:??? -> ?audioStream:??? -> ?sessionId:??? -> ?activeContexts:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `BadGatewayException of BadGatewayException.t | `BadRequestException of BadRequestException.t | `ConflictException of ConflictException.t | `DependencyFailedException of DependencyFailedException.t | `InternalFailureException of InternalFailureException.t | `LimitExceededException of LimitExceededException.t | `NotAcceptableException of NotAcceptableException.t | `NotFoundException of NotFoundException.t | `Unknown_operation_error of string * string option ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `BadGatewayException of BadGatewayException.t | `BadRequestException of BadRequestException.t | `ConflictException of ConflictException.t | `DependencyFailedException of DependencyFailedException.t | `InternalFailureException of InternalFailureException.t | `LimitExceededException of LimitExceededException.t | `NotAcceptableException of NotAcceptableException.t | `NotFoundException of NotFoundException.t | `Unknown_operation_error of string * string option ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval of_header_and_body : ((string, HttpContentType.t) Awso.Import.List.Assoc.t * BlobStream.t) -> t
Sourceval to_value : t -> [> `Structure of (string * [> `Blob of BlobStream.t | `Enum of string | `String of HttpContentType.t ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t