public class PostContentResult extends Object implements Serializable
| Constructor and Description |
|---|
PostContentResult() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
InputStream |
getAudioStream()
Prompt (or statement) to convey to the user.
|
String |
getContentType()
Content type as specified in the
Accept HTTP header in the
request. |
String |
getDialogState()
Represents the message type to be conveyed to the user.
|
String |
getIntentName()
Name of the intent.
|
String |
getMessage()
Based on the build-time application configuration, Amazon Lex determines
the prompt (or statement) to convey to the user.
|
Map<String,String> |
getSessionAttributes()
JSON serialized and then base64-encoded map of key value pairs
representing the session specific context information.
|
Map<String,String> |
getSlots()
Map of zero or more intent slots (name/value pairs) Amazon Lex detected
from the user input during the conversation.
|
String |
getSlotToElicit()
If
dialogState value is ElicitSlot, this
returns the name of the slot for which Amazon Lex is eliciting a value. |
int |
hashCode() |
void |
setAudioStream(InputStream audioStream)
Prompt (or statement) to convey to the user.
|
void |
setContentType(String contentType)
Content type as specified in the
Accept HTTP header in the
request. |
void |
setDialogState(DialogState dialogState)
Represents the message type to be conveyed to the user.
|
void |
setDialogState(String dialogState)
Represents the message type to be conveyed to the user.
|
void |
setIntentName(String intentName)
Name of the intent.
|
void |
setMessage(String message)
Based on the build-time application configuration, Amazon Lex determines
the prompt (or statement) to convey to the user.
|
void |
setSessionAttributes(Map<String,String> sessionAttributes)
JSON serialized and then base64-encoded map of key value pairs
representing the session specific context information.
|
void |
setSlots(Map<String,String> slots)
Map of zero or more intent slots (name/value pairs) Amazon Lex detected
from the user input during the conversation.
|
void |
setSlotToElicit(String slotToElicit)
If
dialogState value is ElicitSlot, this
returns the name of the slot for which Amazon Lex is eliciting a value. |
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PostContentResult |
withAudioStream(InputStream audioStream)
Prompt (or statement) to convey to the user.
|
PostContentResult |
withContentType(String contentType)
Content type as specified in the
Accept HTTP header in the
request. |
PostContentResult |
withDialogState(DialogState dialogState)
Represents the message type to be conveyed to the user.
|
PostContentResult |
withDialogState(String dialogState)
Represents the message type to be conveyed to the user.
|
PostContentResult |
withIntentName(String intentName)
Name of the intent.
|
PostContentResult |
withMessage(String message)
Based on the build-time application configuration, Amazon Lex determines
the prompt (or statement) to convey to the user.
|
PostContentResult |
withSessionAttributes(Map<String,String> sessionAttributes)
JSON serialized and then base64-encoded map of key value pairs
representing the session specific context information.
|
PostContentResult |
withSlots(Map<String,String> slots)
Map of zero or more intent slots (name/value pairs) Amazon Lex detected
from the user input during the conversation.
|
PostContentResult |
withSlotToElicit(String slotToElicit)
If
dialogState value is ElicitSlot, this
returns the name of the slot for which Amazon Lex is eliciting a value. |
public String getContentType()
Content type as specified in the Accept HTTP header in the
request.
Content type as specified in the Accept HTTP header
in the request.
public void setContentType(String contentType)
Content type as specified in the Accept HTTP header in the
request.
contentType -
Content type as specified in the Accept HTTP
header in the request.
public PostContentResult withContentType(String contentType)
Content type as specified in the Accept HTTP header in the
request.
Returns a reference to this object so that method calls can be chained together.
contentType -
Content type as specified in the Accept HTTP
header in the request.
public String getIntentName()
Name of the intent.
Name of the intent.
public void setIntentName(String intentName)
Name of the intent.
intentName - Name of the intent.
public PostContentResult withIntentName(String intentName)
Name of the intent.
Returns a reference to this object so that method calls can be chained together.
intentName - Name of the intent.
public Map<String,String> getSlots()
Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation.
Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation.
public void setSlots(Map<String,String> slots)
Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation.
slots - Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation.
public PostContentResult withSlots(Map<String,String> slots)
Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation.
Returns a reference to this object so that method calls can be chained together.
slots - Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation.
public Map<String,String> getSessionAttributes()
JSON serialized and then base64-encoded map of key value pairs representing the session specific context information.
JSON serialized and then base64-encoded map of key value pairs representing the session specific context information.
public void setSessionAttributes(Map<String,String> sessionAttributes)
JSON serialized and then base64-encoded map of key value pairs representing the session specific context information.
sessionAttributes - JSON serialized and then base64-encoded map of key value pairs representing the session specific context information.
public PostContentResult withSessionAttributes(Map<String,String> sessionAttributes)
JSON serialized and then base64-encoded map of key value pairs representing the session specific context information.
Returns a reference to this object so that method calls can be chained together.
sessionAttributes - JSON serialized and then base64-encoded map of key value pairs representing the session specific context information.
public String getMessage()
Based on the build-time application configuration, Amazon Lex determines the prompt (or statement) to convey to the user. If your application uses a Lambda function, then it can determine what prompt (or statement) to convey to the user.
Constraints:
Length: 1 - 1024
Based on the build-time application configuration, Amazon Lex determines the prompt (or statement) to convey to the user. If your application uses a Lambda function, then it can determine what prompt (or statement) to convey to the user.
public void setMessage(String message)
Based on the build-time application configuration, Amazon Lex determines the prompt (or statement) to convey to the user. If your application uses a Lambda function, then it can determine what prompt (or statement) to convey to the user.
Constraints:
Length: 1 - 1024
message - Based on the build-time application configuration, Amazon Lex determines the prompt (or statement) to convey to the user. If your application uses a Lambda function, then it can determine what prompt (or statement) to convey to the user.
public PostContentResult withMessage(String message)
Based on the build-time application configuration, Amazon Lex determines the prompt (or statement) to convey to the user. If your application uses a Lambda function, then it can determine what prompt (or statement) to convey to the user.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 1024
message - Based on the build-time application configuration, Amazon Lex determines the prompt (or statement) to convey to the user. If your application uses a Lambda function, then it can determine what prompt (or statement) to convey to the user.
public String getDialogState()
Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the user's intent.
Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no response
from the user indicating whether to go ahead and fulfill the intent (for
example, OK to go ahead and order the pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a slot for
the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with "Medium" or
"Medium pepperoni pizza". Amazon Lex recognizes the size and the topping
as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns a
statement/message to convey the fulfillment result, Amazon Lex passes
this string to the client. If not, Amazon Lex looks for
conclusionStatement that you configured for the intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex throws a bad
request exception.
ReadyForFulfillment – Conveys that the client has to do the
fulfillment work for the intent (this is the case when the current intent
has the fulfillmentActivity configured as
ReturnIntent).
Failed – Conversation with the user failed. Some of the
reasons for this dialog state are: the user did not provide appropriate
response after the preconfigured number of attempts, or the Lambda
function failed to fulfill an intent.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the user's
intent. Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no
response from the user indicating whether to go ahead and fulfill
the intent (for example, OK to go ahead and order the pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a
slot for the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with
"Medium" or "Medium pepperoni pizza". Amazon Lex recognizes the
size and the topping as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns a
statement/message to convey the fulfillment result, Amazon Lex
passes this string to the client. If not, Amazon Lex looks for
conclusionStatement that you configured for the
intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex throws a
bad request exception.
ReadyForFulfillment – Conveys that the client has to
do the fulfillment work for the intent (this is the case when the
current intent has the fulfillmentActivity
configured as ReturnIntent).
Failed – Conversation with the user failed. Some of
the reasons for this dialog state are: the user did not provide
appropriate response after the preconfigured number of attempts,
or the Lambda function failed to fulfill an intent.
DialogStatepublic void setDialogState(String dialogState)
Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the user's intent.
Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no response
from the user indicating whether to go ahead and fulfill the intent (for
example, OK to go ahead and order the pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a slot for
the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with "Medium" or
"Medium pepperoni pizza". Amazon Lex recognizes the size and the topping
as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns a
statement/message to convey the fulfillment result, Amazon Lex passes
this string to the client. If not, Amazon Lex looks for
conclusionStatement that you configured for the intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex throws a bad
request exception.
ReadyForFulfillment – Conveys that the client has to do the
fulfillment work for the intent (this is the case when the current intent
has the fulfillmentActivity configured as
ReturnIntent).
Failed – Conversation with the user failed. Some of the
reasons for this dialog state are: the user did not provide appropriate
response after the preconfigured number of attempts, or the Lambda
function failed to fulfill an intent.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
dialogState - Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the
user's intent. Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no
response from the user indicating whether to go ahead and
fulfill the intent (for example, OK to go ahead and order the
pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a
slot for the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with
"Medium" or "Medium pepperoni pizza". Amazon Lex recognizes
the size and the topping as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns
a statement/message to convey the fulfillment result, Amazon
Lex passes this string to the client. If not, Amazon Lex looks
for conclusionStatement that you configured for
the intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex
throws a bad request exception.
ReadyForFulfillment – Conveys that the client has
to do the fulfillment work for the intent (this is the case
when the current intent has the
fulfillmentActivity configured as
ReturnIntent).
Failed – Conversation with the user failed. Some
of the reasons for this dialog state are: the user did not
provide appropriate response after the preconfigured number of
attempts, or the Lambda function failed to fulfill an intent.
DialogStatepublic PostContentResult withDialogState(String dialogState)
Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the user's intent.
Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no response
from the user indicating whether to go ahead and fulfill the intent (for
example, OK to go ahead and order the pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a slot for
the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with "Medium" or
"Medium pepperoni pizza". Amazon Lex recognizes the size and the topping
as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns a
statement/message to convey the fulfillment result, Amazon Lex passes
this string to the client. If not, Amazon Lex looks for
conclusionStatement that you configured for the intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex throws a bad
request exception.
ReadyForFulfillment – Conveys that the client has to do the
fulfillment work for the intent (this is the case when the current intent
has the fulfillmentActivity configured as
ReturnIntent).
Failed – Conversation with the user failed. Some of the
reasons for this dialog state are: the user did not provide appropriate
response after the preconfigured number of attempts, or the Lambda
function failed to fulfill an intent.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
dialogState - Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the
user's intent. Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no
response from the user indicating whether to go ahead and
fulfill the intent (for example, OK to go ahead and order the
pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a
slot for the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with
"Medium" or "Medium pepperoni pizza". Amazon Lex recognizes
the size and the topping as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns
a statement/message to convey the fulfillment result, Amazon
Lex passes this string to the client. If not, Amazon Lex looks
for conclusionStatement that you configured for
the intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex
throws a bad request exception.
ReadyForFulfillment – Conveys that the client has
to do the fulfillment work for the intent (this is the case
when the current intent has the
fulfillmentActivity configured as
ReturnIntent).
Failed – Conversation with the user failed. Some
of the reasons for this dialog state are: the user did not
provide appropriate response after the preconfigured number of
attempts, or the Lambda function failed to fulfill an intent.
DialogStatepublic void setDialogState(DialogState dialogState)
Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the user's intent.
Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no response
from the user indicating whether to go ahead and fulfill the intent (for
example, OK to go ahead and order the pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a slot for
the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with "Medium" or
"Medium pepperoni pizza". Amazon Lex recognizes the size and the topping
as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns a
statement/message to convey the fulfillment result, Amazon Lex passes
this string to the client. If not, Amazon Lex looks for
conclusionStatement that you configured for the intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex throws a bad
request exception.
ReadyForFulfillment – Conveys that the client has to do the
fulfillment work for the intent (this is the case when the current intent
has the fulfillmentActivity configured as
ReturnIntent).
Failed – Conversation with the user failed. Some of the
reasons for this dialog state are: the user did not provide appropriate
response after the preconfigured number of attempts, or the Lambda
function failed to fulfill an intent.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
dialogState - Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the
user's intent. Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no
response from the user indicating whether to go ahead and
fulfill the intent (for example, OK to go ahead and order the
pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a
slot for the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with
"Medium" or "Medium pepperoni pizza". Amazon Lex recognizes
the size and the topping as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns
a statement/message to convey the fulfillment result, Amazon
Lex passes this string to the client. If not, Amazon Lex looks
for conclusionStatement that you configured for
the intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex
throws a bad request exception.
ReadyForFulfillment – Conveys that the client has
to do the fulfillment work for the intent (this is the case
when the current intent has the
fulfillmentActivity configured as
ReturnIntent).
Failed – Conversation with the user failed. Some
of the reasons for this dialog state are: the user did not
provide appropriate response after the preconfigured number of
attempts, or the Lambda function failed to fulfill an intent.
DialogStatepublic PostContentResult withDialogState(DialogState dialogState)
Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the user's intent.
Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no response
from the user indicating whether to go ahead and fulfill the intent (for
example, OK to go ahead and order the pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a slot for
the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with "Medium" or
"Medium pepperoni pizza". Amazon Lex recognizes the size and the topping
as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns a
statement/message to convey the fulfillment result, Amazon Lex passes
this string to the client. If not, Amazon Lex looks for
conclusionStatement that you configured for the intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex throws a bad
request exception.
ReadyForFulfillment – Conveys that the client has to do the
fulfillment work for the intent (this is the case when the current intent
has the fulfillmentActivity configured as
ReturnIntent).
Failed – Conversation with the user failed. Some of the
reasons for this dialog state are: the user did not provide appropriate
response after the preconfigured number of attempts, or the Lambda
function failed to fulfill an intent.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot,
Fulfilled, ReadyForFulfillment, Failed
dialogState - Represents the message type to be conveyed to the user. For example:
ElicitIntent – Amazon Lex wants to elicit the
user's intent. Consider the following examples:
Suppose Amazon Lex did not understand the first utterances. For example, "I want to order pizza" (indicating OrderPizza intent). If Amazon Lex doesn't understand the user's input to determine the intent, the service returns this dialog state.
Suppose the intent is configured with a follow up prompt. For example, after the OrderPizza intent is fulfilled, the intent might have a follow up prompt such as "Do you want to order a drink or desert?" In this case, Amazon Lex returns this dialog state.
ConfirmIntent – Amazon Lex is expecting a yes/no
response from the user indicating whether to go ahead and
fulfill the intent (for example, OK to go ahead and order the
pizza).
In addition to yes/no reply, user might provide respond with additional slot information. It can be a new slot information or change in existing slot value. For example, the user might reply with "Yes, but change the crust to thick crust." Amazon Lex can understand the additional information and update the intent slots accordingly.
Consider another example. Before fulfilling an order, your application might prompt for confirmation such as "OK to place this pizza order?" A user might reply with "No, I want to order a drink." In this case, Amazon Lex recognizes the new OrderDrink intent.
ElicitSlot – Amazon Lex is expecting a value of a
slot for the current intent. Suppose Amazon Lex asks
"What size pizza would you like?" A user might reply with
"Medium" or "Medium pepperoni pizza". Amazon Lex recognizes
the size and the topping as the two separate slot values.
Fulfilled – Conveys that the Lambda function has
successfully fulfilled the intent. If Lambda function returns
a statement/message to convey the fulfillment result, Amazon
Lex passes this string to the client. If not, Amazon Lex looks
for conclusionStatement that you configured for
the intent.
If both the Lambda function statement and the
conclusionStatement are missing, Amazon Lex
throws a bad request exception.
ReadyForFulfillment – Conveys that the client has
to do the fulfillment work for the intent (this is the case
when the current intent has the
fulfillmentActivity configured as
ReturnIntent).
Failed – Conversation with the user failed. Some
of the reasons for this dialog state are: the user did not
provide appropriate response after the preconfigured number of
attempts, or the Lambda function failed to fulfill an intent.
DialogStatepublic String getSlotToElicit()
If dialogState value is ElicitSlot, this
returns the name of the slot for which Amazon Lex is eliciting a value.
If dialogState value is ElicitSlot,
this returns the name of the slot for which Amazon Lex is
eliciting a value.
public void setSlotToElicit(String slotToElicit)
If dialogState value is ElicitSlot, this
returns the name of the slot for which Amazon Lex is eliciting a value.
slotToElicit -
If dialogState value is ElicitSlot,
this returns the name of the slot for which Amazon Lex is
eliciting a value.
public PostContentResult withSlotToElicit(String slotToElicit)
If dialogState value is ElicitSlot, this
returns the name of the slot for which Amazon Lex is eliciting a value.
Returns a reference to this object so that method calls can be chained together.
slotToElicit -
If dialogState value is ElicitSlot,
this returns the name of the slot for which Amazon Lex is
eliciting a value.
public InputStream getAudioStream()
Prompt (or statement) to convey to the user. This is based on the
application configuration and context. For example, if Amazon Lex did not
understand the user intent, it sends the clarificationPrompt
configured for the application. If the intent requires confirmation
before taking the fulfillment action, it sends the
confirmationPrompt. Here is another example, suppose the
Lambda function successfully fulfilled the intent, and sent a message to
convey to the user. Then Amazon Lex sends that message in the response.
Prompt (or statement) to convey to the user. This is based on the
application configuration and context. For example, if Amazon Lex
did not understand the user intent, it sends the
clarificationPrompt configured for the application.
If the intent requires confirmation before taking the fulfillment
action, it sends the confirmationPrompt. Here is
another example, suppose the Lambda function successfully
fulfilled the intent, and sent a message to convey to the user.
Then Amazon Lex sends that message in the response.
public void setAudioStream(InputStream audioStream)
Prompt (or statement) to convey to the user. This is based on the
application configuration and context. For example, if Amazon Lex did not
understand the user intent, it sends the clarificationPrompt
configured for the application. If the intent requires confirmation
before taking the fulfillment action, it sends the
confirmationPrompt. Here is another example, suppose the
Lambda function successfully fulfilled the intent, and sent a message to
convey to the user. Then Amazon Lex sends that message in the response.
audioStream -
Prompt (or statement) to convey to the user. This is based on
the application configuration and context. For example, if
Amazon Lex did not understand the user intent, it sends the
clarificationPrompt configured for the
application. If the intent requires confirmation before taking
the fulfillment action, it sends the
confirmationPrompt. Here is another example,
suppose the Lambda function successfully fulfilled the intent,
and sent a message to convey to the user. Then Amazon Lex
sends that message in the response.
public PostContentResult withAudioStream(InputStream audioStream)
Prompt (or statement) to convey to the user. This is based on the
application configuration and context. For example, if Amazon Lex did not
understand the user intent, it sends the clarificationPrompt
configured for the application. If the intent requires confirmation
before taking the fulfillment action, it sends the
confirmationPrompt. Here is another example, suppose the
Lambda function successfully fulfilled the intent, and sent a message to
convey to the user. Then Amazon Lex sends that message in the response.
Returns a reference to this object so that method calls can be chained together.
audioStream -
Prompt (or statement) to convey to the user. This is based on
the application configuration and context. For example, if
Amazon Lex did not understand the user intent, it sends the
clarificationPrompt configured for the
application. If the intent requires confirmation before taking
the fulfillment action, it sends the
confirmationPrompt. Here is another example,
suppose the Lambda function successfully fulfilled the intent,
and sent a message to convey to the user. Then Amazon Lex
sends that message in the response.
public String toString()
toString in class ObjectObject.toString()Copyright © 2017. All rights reserved.