0% found this document useful (0 votes)
14 views11 pages

Lex Bot Response

Uploaded by

lakoxen587
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views11 pages

Lex Bot Response

Uploaded by

lakoxen587
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 11

request json should incluce

{
"sessionId": "947837829218625",
"inputTranscript": "hello",
"interpretations": [
{
"intent": [
null
],
"nluConfidence": 1
},
{
"intent": [
null
],
"nluConfidence": 0.54
},
{
"intent": [
null
]
},
{
"intent": [
null
],
"nluConfidence": 0.44
}
],
"bot": {
"aliasId": "TSTALIASID",
"aliasName": "TestBotAlias",
"name": "LeslosBot",
"version": "DRAFT",
"localeId": "en_IN",
"id": "Y2WQNQ5GWW"
},
"responseContentType": "text/plain; charset=utf-8",
"sessionState": {
"sessionAttributes": {},
"intent": {
"confirmationState": "None",
"name": "WelcomeIntent",
"slots": {},
"state": "InProgress"
},
"originatingRequestId": "11725589-e6f5-4387-bce7-ade81b06305c"
},
"messageVersion": "1.0",
"invocationSource": "DialogCodeHook",
"inputMode": "Text"
}

stock list

{
"messages": [
{
"content": "Okay , i help you with that",
"contentType": "PlainText"
},
{
"content": "{\r\n \"type\": \"card\",\r\n \"title\": \"Trending
Stocks\",\r\n \"content\": \"Here are the top 5 trending stocks today:\",\r\
n \"items\": [\r\n {\r\n \"title\": \"Apple\",\r\
n \"symbol\": \"AAPL\",\r\n \"price\": \"140.00\",\r\
n \"change\": \"+1.00\"\r\n },\r\n {\r\n \"title\": \"Microsoft\",\
r\n \"symbol\": \"MSFT\",\r\n \"price\": \"120.00\",\r\n \"change\":
\"+2.00\"\r\n },\r\n {\r\n \"title\": \"Amazon\",\r\
n \"symbol\": \"AMZN\",\r\n \"price\": \"100.00\",\r\
n \"change\": \"+3.00\"\r\n },\r\n {\r\n \"title\": \"Alphabet\",\
r\n \"symbol\": \"GOOG\",\r\n \"price\": \"90.00\",\r\
n \"change\": \"+4.00\"\r\n },\r\n {\r\n \"title\": \"Tesla\",\r\n
\"symbol\": \"TSLA\",\r\n \"price\": \"70.00\",\r\
n \"change\": \"+5.00\"\r\n }\r\n ]\r\n}",
"contentType": "CustomPayload"
}
],
"sessionState": {
"dialogAction": {
"type": "Close"
},
"intent": {
"name": "stockListIntent",
"slots": {},
"state": "ReadyForFulfillment",
"confirmationState": "None"
},
"sessionAttributes": {},
"originatingRequestId": "d8de74e3-62f0-4baa-88e6-c3c86ff3443f"
},
"interpretations": [
{
"nluConfidence": {
"score": 1
},
"intent": {
"name": "stockListIntent",
"slots": {},
"state": "ReadyForFulfillment",
"confirmationState": "None"
}
},
{
"nluConfidence": {
"score": 0.53
},
"intent": {
"name": "WelcomeIntent",
"slots": {}
}
},
{
"intent": {
"name": "FallbackIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.28
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": null,
"stockname": null
}
}
}
],
"sessionId": "947837829218116"
}

stock detail

{
"messages": [
{
"content": "Sure",
"contentType": "PlainText"
},
{
"content": "Please identify stock name for detail?",
"contentType": "PlainText"
}
],
"sessionState": {
"dialogAction": {
"type": "ElicitSlot",
"slotToElicit": "stockname"
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": null,
"stockname": null
},
"state": "InProgress",
"confirmationState": "None"
},
"sessionAttributes": {},
"originatingRequestId": "5f33a836-c9e7-4591-aa7f-1fb41665157a"
},
"interpretations": [
{
"nluConfidence": {
"score": 1
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": null,
"stockname": null
},
"state": "InProgress",
"confirmationState": "None"
}
},
{
"nluConfidence": {
"score": 0.5
},
"intent": {
"name": "WelcomeIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.47
},
"intent": {
"name": "stockListIntent",
"slots": {}
}
},
{
"intent": {
"name": "FallbackIntent",
"slots": {}
}
}
],
"sessionId": "947837829218116"
}

amazon

{
"messages": [
{
"content": "Okay",
"contentType": "PlainText"
},
{
"contentType": "ImageResponseCard",
"imageResponseCard": {
"title": "which market detail do you want ?",
"buttons": [
{
"text": "NSE",
"value": "nse"
},
{
"text": "BSE",
"value": "bse"
}
]
}
}
],
"sessionState": {
"dialogAction": {
"type": "ElicitSlot",
"slotToElicit": "markettype"
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": null,
"stockname": {
"value": {
"originalValue": "amozon",
"interpretedValue": "amozon",
"resolvedValues": []
}
}
},
"state": "InProgress",
"confirmationState": "None"
},
"sessionAttributes": {},
"originatingRequestId": "5f33a836-c9e7-4591-aa7f-1fb41665157a"
},
"interpretations": [
{
"nluConfidence": {
"score": 1
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": null,
"stockname": {
"value": {
"originalValue": "amozon",
"interpretedValue": "amozon",
"resolvedValues": []
}
}
},
"state": "InProgress",
"confirmationState": "None"
}
},
{
"intent": {
"name": "FallbackIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.46
},
"intent": {
"name": "WelcomeIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.43
},
"intent": {
"name": "stockListIntent",
"slots": {}
}
}
],
"sessionId": "947837829218116"
}

nse

{
"messages": [
{
"content": "The price for tcs nse is 117.03 . Is this is correct yes/no
",
"contentType": "PlainText"
}
],
"sessionState": {
"dialogAction": {
"type": "ConfirmIntent"
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": {
"value": {
"originalValue": "nse",
"interpretedValue": "nse",
"resolvedValues": [
"nse"
]
}
},
"stockname": {
"value": {
"originalValue": "tcs",
"interpretedValue": "tcs",
"resolvedValues": []
}
}
},
"state": "InProgress",
"confirmationState": "None"
},
"sessionAttributes": {},
"originatingRequestId": "d8de74e3-62f0-4baa-88e6-c3c86ff3443f"
},
"interpretations": [
{
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": {
"value": {
"originalValue": "nse",
"interpretedValue": "nse",
"resolvedValues": [
"nse"
]
}
},
"stockname": {
"value": {
"originalValue": "tcs",
"interpretedValue": "tcs",
"resolvedValues": []
}
}
},
"state": "InProgress",
"confirmationState": "None"
}
},
{
"intent": {
"name": "FallbackIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.57
},
"intent": {
"name": "WelcomeIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.4
},
"intent": {
"name": "stockListIntent",
"slots": {}
}
}
],
"sessionId": "947837829218116"
}

information is wrong

{
"messages": [
{
"content": "Okay , Our team look onto it",
"contentType": "PlainText"
}
],
"sessionState": {
"dialogAction": {
"type": "Close"
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": {
"value": {
"originalValue": "nse",
"interpretedValue": "nse",
"resolvedValues": [
"nse"
]
}
},
"stockname": {
"value": {
"originalValue": "tcs",
"interpretedValue": "tcs",
"resolvedValues": []
}
}
},
"state": "Failed",
"confirmationState": "Denied"
},
"sessionAttributes": {},
"originatingRequestId": "d8de74e3-62f0-4baa-88e6-c3c86ff3443f"
},
"interpretations": [
{
"nluConfidence": {
"score": 1
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": {
"value": {
"originalValue": "nse",
"interpretedValue": "nse",
"resolvedValues": [
"nse"
]
}
},
"stockname": {
"value": {
"originalValue": "tcs",
"interpretedValue": "tcs",
"resolvedValues": []
}
}
},
"state": "Failed",
"confirmationState": "Denied"
}
},
{
"intent": {
"name": "FallbackIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.45
},
"intent": {
"name": "stockListIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.35
},
"intent": {
"name": "WelcomeIntent",
"slots": {}
}
}
],
"sessionId": "947837829218116"
}

informations is right

{
"messages": [
{
"content": "Query resolve successfull",
"contentType": "PlainText"
},
{
"content": "It was pleasure to talk to you",
"contentType": "PlainText"
}
],
"sessionState": {
"dialogAction": {
"type": "Close"
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": {
"value": {
"originalValue": "bse",
"interpretedValue": "bse",
"resolvedValues": [
"bse"
]
}
},
"stockname": {
"value": {
"originalValue": "tcs",
"interpretedValue": "tcs",
"resolvedValues": []
}
}
},
"state": "Fulfilled",
"confirmationState": "Confirmed"
},
"sessionAttributes": {},
"originatingRequestId": "d8de74e3-62f0-4baa-88e6-c3c86ff3443f"
},
"interpretations": [
{
"nluConfidence": {
"score": 1
},
"intent": {
"name": "stockDetailIntent",
"slots": {
"markettype": {
"value": {
"originalValue": "bse",
"interpretedValue": "bse",
"resolvedValues": [
"bse"
]
}
},
"stockname": {
"value": {
"originalValue": "tcs",
"interpretedValue": "tcs",
"resolvedValues": []
}
}
},
"state": "Fulfilled",
"confirmationState": "Confirmed"
}
},
{
"intent": {
"name": "FallbackIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.45
},
"intent": {
"name": "stockListIntent",
"slots": {}
}
},
{
"nluConfidence": {
"score": 0.3
},
"intent": {
"name": "WelcomeIntent",
"slots": {}
}
}
],
"requestAttributes": {},
"sessionId": "947837829218116"
}

You might also like