diff --git a/integrations/extensions/starter-kits/testitall/mock-server/.env-sample b/integrations/extensions/starter-kits/testitall/mock-server/.env-sample
index 12e6fdca..4a42b211 100644
--- a/integrations/extensions/starter-kits/testitall/mock-server/.env-sample
+++ b/integrations/extensions/starter-kits/testitall/mock-server/.env-sample
@@ -1,8 +1,11 @@
API_SERVER_PORT=4000
-# The response size limit for WA extensions, in bytes; Used by the Context too large tests. Default is 102400 bytes (100 KB).
+# The response size limit for WA extension calls, in bytes; Used by the Context too large tests. Default is 102400 bytes (100 KB).
RESPONSE_SIZE_LIMIT=102400
+# The session size limit for WA stateful sessions, in bytes; Used by the Context almost too large tests. Default is 130000 bytes (127 KB).
+SESSION_SIZE_LIMIT=130000
+
# [Authentication Credentials]
# Basic Authentication
AUTH_USERNAME=WA_USERNAME
diff --git a/integrations/extensions/starter-kits/testitall/mock-server/server/controllers/test-controller.js b/integrations/extensions/starter-kits/testitall/mock-server/server/controllers/test-controller.js
index d1d43700..cad8ee20 100644
--- a/integrations/extensions/starter-kits/testitall/mock-server/server/controllers/test-controller.js
+++ b/integrations/extensions/starter-kits/testitall/mock-server/server/controllers/test-controller.js
@@ -1,3 +1,5 @@
+import { generateHighEntropyString } from '../utils.js';
+
const LONG_MESSAGE = `This is a long message intended to demonstrate streaming large messages in smaller chunks. Breaking down messages into smaller parts helps simulate real-time data transmission over a network. This technique is particularly useful for streaming large files or continuous data streams like logs, chat messages, or live updates. By sending small chunks, we ensure the data is processed and displayed incrementally, providing a smoother and more responsive user experience. Each chunk represents a portion of the entire message, and they are sent sequentially with a slight delay to mimic real-world streaming scenarios. This example uses a delay of 100 milliseconds between each chunk to achieve this effect.`;
// HTTP Methods
@@ -154,21 +156,17 @@ export function errorTest(req, res) {
});
}
-
-export function contextTooLargeTest(req, res) {
- const fakeData = 'x'.repeat(parseInt(process.env.RESPONSE_SIZE_LIMIT, 10) * 5); // Default: 100KB * 5 = 650KB
+export function responseTooLargeTest(req, res) {
const response = {
- data: fakeData
+ data: generateHighEntropyString(parseInt(process.env.RESPONSE_SIZE_LIMIT, 10) * 5) // Default: 100KB * 5 = 650KB
}
return res.status(200).send(response);
}
export function contextAlmostTooLargeTest(req, res) {
- const fakeData = 'x'.repeat(parseInt(process.env.RESPONSE_SIZE_LIMIT, 10) - 1024); // Default: 100KB - 1KB = 99KB
-
const response = {
- data: fakeData
+ data: generateHighEntropyString(parseInt(process.env.SESSION_SIZE_LIMIT, 10) / 2) // Default: 130KB / 2 = 65KB
}
return res.status(200).send(response);
diff --git a/integrations/extensions/starter-kits/testitall/mock-server/server/routes/test-route.js b/integrations/extensions/starter-kits/testitall/mock-server/server/routes/test-route.js
index b974cf59..ec6f5ef3 100644
--- a/integrations/extensions/starter-kits/testitall/mock-server/server/routes/test-route.js
+++ b/integrations/extensions/starter-kits/testitall/mock-server/server/routes/test-route.js
@@ -10,13 +10,19 @@ router.get('', testController.getTest);
router.put('', testController.putTest);
router.post('', testController.postTest);
router.patch('', testController.patchTest);
+
router.post('/error', testController.errorTest);
router.post('/params/:path_param', testController.postTest);
router.post('/auth_header', testController.authHeaderTest);
+
router.post('/arrays-root', testController.arraysRootTest);
router.post('/arrays-object', testController.arraysInObjectTest);
-router.post('/context-too-large', testController.contextTooLargeTest);
+
+router.post('/response-too-large', testController.responseTooLargeTest);
+router.post('/context-too-large', testController.responseTooLargeTest); // for backwards compatibility
+
router.post('/context-almost-too-large', testController.contextAlmostTooLargeTest);
+
router.post('/non-json-response', testController.successfulPostWithNonJSONResponse);
router.post('/advanced/properties-counter', testController.propertiesByCounterTest);
diff --git a/integrations/extensions/starter-kits/testitall/mock-server/server/utils.js b/integrations/extensions/starter-kits/testitall/mock-server/server/utils.js
new file mode 100644
index 00000000..9860133b
--- /dev/null
+++ b/integrations/extensions/starter-kits/testitall/mock-server/server/utils.js
@@ -0,0 +1,14 @@
+/**
+ * High entropy string generator, used to generate the body of the response for the contextTooLargeTest and contextAlmostTooLargeTest endpoints
+ * to avoid being compressed by the server for more accurate testing results
+ * @param {number} length The length of the string to generate
+ * @returns {string} The generated string
+ */
+export function generateHighEntropyString(length) {
+ const charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:",.<>?/~`'; // Large character set
+ let result = '';
+ for (let i = 0; i < length; i++) {
+ result += charset[Math.floor(Math.random() * charset.length)];
+ }
+ return result;
+}
\ No newline at end of file
diff --git a/integrations/extensions/starter-kits/testitall/readme.md b/integrations/extensions/starter-kits/testitall/readme.md
index 94fbe727..6401c2c8 100644
--- a/integrations/extensions/starter-kits/testitall/readme.md
+++ b/integrations/extensions/starter-kits/testitall/readme.md
@@ -61,28 +61,28 @@ steps below:
The example provides a set of actions to test the specification:
-| WA Action Name | WA Trigger Word | OpenAPI Endpoint | Description |
-|--------------------------------------------------------------|----------------------------|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| Test HTTP GET | "GET" | `/test` | Test HTTP GET. |
-| Test HTTP POST | "POST" | `/test` | Test HTTP POST. |
-| Test HTTP PUT | "PUT" | `/test` | Test HTTP PUT. |
-| Test HTTP DELETE | "DELETE" | `/test` | Test HTTP DELETE. |
-| Test HTTP PATCH | "PATCH" | `/test` | Test HTTP PATCH. |
-| Test handle error in response | "Error" | `/test/error` | The API server will return a 404 error to test error handling in WA. |
-| Test parse array inside object | "Arrays Object" | `/test/arrays-object` | The API server will reverse the array inside the object. |
-| Test handle an almost too large response | "Context Almost Too Large" | `/test/context-almost-too-large` | The API server will return a response that is almost too large (129KB). The extension call itself should succeed. The action will try to store the response into a session variable which will cause any following conversation to produce a 413 error. |
-| Test handle a too large response | "Context Too Large" | `/test/context-too-large` | The API server will return a response that is too large (650KB). The extension call should fail. |
-| Test set auth header with context variable | "Auth Header" | `/test/auth-header` | **Please make sure you've selected `No authentication` option in extension configuration, otherwise the auth header will be overridden.**
The WA will set the Authorization header with the value provided by the user. The API server will echo the Authorization header in the response. |
-| Test post with parameters | "Params" | `/test/params/{path_param}` | WA will send a POST request with parameters in the query string, header and URL path. The API server will echo the parameters in the response. |
-| Test response with a delay | "Delay" | `/delay` | The API server will delay the response by the provided number of seconds (default: 3). |
-| Test consecutive extension calls | "Consecutive" | `/test` | WA will make 3 consecutive calls to the extension, without user interaction between them. |
-| Test Server-Sent Events (SSE) | "Test Server-Sent Events (SSE)"| `/test/stream` | The API server will start streaming SSE events. |
-| Test a long response in Server-Sent Events (SSE) | "Test a long response in Server-Sent Events (SSE)"| `/test/stream/timeout`| The API server will stream SSE events until the web chat client times out and throws an error. |
-| Test handling an error response in Server-Sent Events (SSE) | "Test handling an error response in Server-Sent Events (SSE)"| `/test/stream/error`| The API server will return a 404 error to test error handling in SSE. |
-| Test non JSON response | "Test non json" | `/test/non-json-response` | The API server will send a response with an HTML page, WA is expected to fail processing the payload and mark the extension callout as a failure and contain the details of the payload and the parsing error.|
-| Test calling extension with different authentication methods | "Security" | `/security/{method}` | **Please make sure you've selected the corresponding auth method in extension configuration before testing it.**
WA will call the API endpoint that requires authentication.
Supported methods: Basic, Bearer, API key and Oauth2 (except the implicit flow).
See below for default credentials. |
-| Test pre-message webhook | "Pre-message" | `/webhook/prewebhook` | **Please make sure you've enabled the Pre-Message Webhook in environment configuration before testing it.**
The server will set the session variable `pre_webhook_message` while receiving the pre-message webhook call. |
-| Test post-message webhook | "Post-message" | `/webhook/postwebhook` | **Please make sure you've enabled the Post-Message Webhook in environment configuration before testing it.**
The server will set the session variable `post_webhook_message` while receiving the post-message webhook call. |
+| WA Action Name | WA Trigger Word | OpenAPI Endpoint | Description |
+| ------------------------------------------------------------ | ------------------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| Test HTTP GET | "GET" | `/test` | Test HTTP GET. |
+| Test HTTP POST | "POST" | `/test` | Test HTTP POST. |
+| Test HTTP PUT | "PUT" | `/test` | Test HTTP PUT. |
+| Test HTTP DELETE | "DELETE" | `/test` | Test HTTP DELETE. |
+| Test HTTP PATCH | "PATCH" | `/test` | Test HTTP PATCH. |
+| Test handle error in response | "Error" | `/test/error` | The API server will return a 404 error to test error handling in WA. |
+| Test parse array inside object | "Arrays Object" | `/test/arrays-object` | The API server will reverse the array inside the object. |
+| Test handle a too large response from extension | "Response Too Large" | `/test/response-too-large` | The API server will return a response that is too large (650KB). The extension call should trigger the `REQUEST ENTITY TOO LARGE` error with code `413`. |
+| Test handle an almost too large response for context storage | "Context Almost Too Large" | `/test/context-almost-too-large` | **Only applicable for stateful message request**
The API server will return a response that is close to the limit of the session storage. By storing that response into two session variables, it should trigger the `Session state exceeds the 130kb size limit` error with code `400`. |
+| Test set auth header with context variable | "Auth Header" | `/test/auth-header` | **Please make sure you've selected `No authentication` option in extension configuration, otherwise the auth header will be overridden.**
The WA will set the Authorization header with the value provided by the user. The API server will echo the Authorization header in the response. |
+| Test post with parameters | "Params" | `/test/params/{path_param}` | WA will send a POST request with parameters in the query string, header and URL path. The API server will echo the parameters in the response. |
+| Test response with a delay | "Delay" | `/delay` | The API server will delay the response by the provided number of seconds (default: 3). |
+| Test consecutive extension calls | "Consecutive" | `/test` | WA will make 3 consecutive calls to the extension, without user interaction between them. |
+| Test Server-Sent Events (SSE) | "Test Server-Sent Events (SSE)" | `/test/stream` | The API server will start streaming SSE events. |
+| Test a long response in Server-Sent Events (SSE) | "Test a long response in Server-Sent Events (SSE)" | `/test/stream/timeout` | The API server will stream SSE events until the web chat client times out and throws an error. |
+| Test handling an error response in Server-Sent Events (SSE) | "Test handling an error response in Server-Sent Events (SSE)" | `/test/stream/error` | The API server will return a 404 error to test error handling in SSE. |
+| Test non JSON response | "Test non json" | `/test/non-json-response` | The API server will send a response with an HTML page, WA is expected to fail processing the payload and mark the extension callout as a failure and contain the details of the payload and the parsing error. |
+| Test calling extension with different authentication methods | "Security" | `/security/{method}` | **Please make sure you've selected the corresponding auth method in extension configuration before testing it.**
WA will call the API endpoint that requires authentication.
Supported methods: Basic, Bearer, API key and Oauth2 (except the implicit flow).
See below for default credentials. |
+| Test pre-message webhook | "Pre-message" | `/webhook/prewebhook` | **Please make sure you've enabled the Pre-Message Webhook in environment configuration before testing it.**
The server will set the session variable `pre_webhook_message` while receiving the pre-message webhook call. |
+| Test post-message webhook | "Post-message" | `/webhook/postwebhook` | **Please make sure you've enabled the Post-Message Webhook in environment configuration before testing it.**
The server will set the session variable `post_webhook_message` while receiving the post-message webhook call. |
For detailed description of each endpoint, please see the [OpenApi Spec](./testitall.openapi.json) provided.
@@ -177,11 +177,11 @@ steps below:
Here are the list of the endpoints for the pre/post message webhook. Beside the normal pre/post message webhook, there's some additional webhook endpoints provided for testing the error handling of the webhook.
Replace the pre/post webhook URL in steps 5 with the following URLs to test different behaviors:
-| Endpoint | Description |
-|----------|-------------|
-| `webhook/prewebhook` | The server will modify the session variable `pre_webhook_message` while receiving the pre-message webhook call. When entering "skip" for message input, the webhook will include the `X-Watson-Assistant-Webhook-Return` header in its response, tells WA to skip the message processing and return whatever the webhooks returns. In this case, it will return message "Response skipped by webhook" |
-| `webhook/postwebhook` | The server will modify the session variable `post_webhook_message` while receiving the post-message webhook call |
-| `/webhook/error/non-json` | The server will return a non-JSON response instead of WA conversation context |
-| `/webhook/error/timeout` | The server will not respond to the webhooks request |
-| `/webhook/error/code` | The server will respond with code 500 |
-| `/webhook/error/code/{http_code}` | The server will respond with the provided HTTP status code |
+| Endpoint | Description |
+| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `webhook/prewebhook` | The server will modify the session variable `pre_webhook_message` while receiving the pre-message webhook call. When entering "skip" for message input, the webhook will include the `X-Watson-Assistant-Webhook-Return` header in its response, tells WA to skip the message processing and return whatever the webhooks returns. In this case, it will return message "Response skipped by webhook" |
+| `webhook/postwebhook` | The server will modify the session variable `post_webhook_message` while receiving the post-message webhook call |
+| `/webhook/error/non-json` | The server will return a non-JSON response instead of WA conversation context |
+| `/webhook/error/timeout` | The server will not respond to the webhooks request |
+| `/webhook/error/code` | The server will respond with code 500 |
+| `/webhook/error/code/{http_code}` | The server will respond with the provided HTTP status code |
diff --git a/integrations/extensions/starter-kits/testitall/testitall.actions.json b/integrations/extensions/starter-kits/testitall/testitall.actions.json
index 88f0e7ca..88b2b866 100644
--- a/integrations/extensions/starter-kits/testitall/testitall.actions.json
+++ b/integrations/extensions/starter-kits/testitall/testitall.actions.json
@@ -11,14 +11,14 @@
},
"status": "Available",
"language": "en",
- "skill_id": "056f44b1-cc91-465c-918c-28236fb890a9",
+ "skill_id": "cb65dff5-2ab9-40d5-a447-b373d834ba99",
"workspace": {
"actions": [
{
"type": "standard",
"steps": [
{
- "step": "step_588",
+ "step": "step_863",
"output": {
"generic": [
{
@@ -27,7 +27,7 @@
"text_expression": {
"concat": [
{
- "scalar": "I'm about to call an extension which will return a large context"
+ "scalar": "one moment let me delete it"
}
]
}
@@ -42,22 +42,22 @@
"resolver": {
"type": "callout",
"callout": {
- "path": "/test/context-too-large",
+ "path": "/test",
"type": "integration_interaction",
- "method": "POST",
+ "method": "DELETE",
"internal": {
- "spec_hash_id": "2e57744b42aa5ecd38277941f4c7bc25fd09fbaa09b22326f0d68de222ced43d",
+ "spec_hash_id": "c9bd72e2862ec86e75a643ace7cbbc1d93302f7f164629ea7dc07a6288a0d2a7",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
- "result_variable": "step_588_result_1"
+ "result_variable": "step_863_result_1"
}
},
- "variable": "step_588",
- "next_step": "step_962"
+ "variable": "step_863",
+ "next_step": "step_509"
},
{
- "step": "step_962",
+ "step": "step_509",
"output": {
"generic": [
{
@@ -66,11 +66,18 @@
"text_expression": {
"concat": [
{
- "scalar": "The extension call fails because the extension responded with a result that larger than 100 KB.\n\nExtension call success: "
+ "scalar": "Indeed it was deleted - result is:"
},
{
- "variable": "step_588_result_1",
- "variable_path": "success"
+ "variable": "step_863_result_1",
+ "variable_path": "body"
+ },
+ {
+ "scalar": " status code: "
+ },
+ {
+ "variable": "step_863_result_1",
+ "variable_path": "body.status"
}
]
}
@@ -81,37 +88,54 @@
}
]
},
+ "context": {
+ "variables": []
+ },
"handlers": [],
"resolver": {
"type": "continue"
},
- "variable": "step_962"
+ "variable": "step_509"
}
],
- "title": "Test handle a too large response",
- "action": "action_11679",
+ "title": "Test HTTP DELETE",
+ "action": "action_1543",
"boosts": [],
"handlers": [],
"condition": {
- "intent": "action_11679_intent_29725"
+ "intent": "action_1543_intent_5385"
},
"variables": [
{
- "title": "I'm about to call an extension which will return a large context",
- "variable": "step_588",
+ "title": "aggregated variable",
+ "variable": "operation_result",
"data_type": "any"
},
{
- "variable": "step_588_result_1",
+ "title": "aggregated variable",
+ "variable": "operation_result_status",
"data_type": "any"
},
{
- "title": "The extension call fails because the extension responded with a ",
- "variable": "step_962",
+ "variable": "step_138_result_1",
+ "data_type": "any"
+ },
+ {
+ "title": "Indeed it was deleted - result is:{variable} status code: {varia",
+ "variable": "step_509",
+ "data_type": "any"
+ },
+ {
+ "title": "one moment let me delete it",
+ "variable": "step_863",
+ "data_type": "any"
+ },
+ {
+ "variable": "step_863_result_1",
"data_type": "any"
}
],
- "next_action": "action_38662",
+ "next_action": "action_30035",
"topic_switch": {
"allowed_from": true,
"allowed_into": true
@@ -122,7 +146,7 @@
"type": "standard",
"steps": [
{
- "step": "step_526",
+ "step": "step_863",
"output": {
"generic": [
{
@@ -131,7 +155,7 @@
"text_expression": {
"concat": [
{
- "scalar": "I'm about to call an extension which will return context that is almost too large for WA session."
+ "scalar": "let me patch it"
}
]
}
@@ -146,22 +170,22 @@
"resolver": {
"type": "callout",
"callout": {
- "path": "/test/context-almost-too-large",
+ "path": "/test",
"type": "integration_interaction",
- "method": "POST",
+ "method": "PATCH",
"internal": {
- "spec_hash_id": "837b4f9e9cbcd25948117367cbee4ddcbf870a48496df7e15ad127852843499f",
- "match_scenario": 10,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "spec_hash_id": "18bbb292a4302d016c054e0736b3ec12bcfdcab8ea91b134ad8a20ccb182b053",
+ "match_scenario": 12,
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
- "result_variable": "step_526_result_1"
+ "result_variable": "step_863_result_1"
}
},
- "variable": "step_526",
- "next_step": "step_371"
+ "variable": "step_863",
+ "next_step": "step_509"
},
{
- "step": "step_371",
+ "step": "step_509",
"output": {
"generic": [
{
@@ -170,7 +194,18 @@
"text_expression": {
"concat": [
{
- "scalar": "Extension call success.\n\n
\n\n\n\nTry store the returned data into context variable to make the context too large (>100 KB)."
+ "scalar": "Indeed I patched it- result is:"
+ },
+ {
+ "variable": "step_863_result_1",
+ "variable_path": "body"
+ },
+ {
+ "scalar": " status code: "
+ },
+ {
+ "variable": "step_863_result_1",
+ "variable_path": "body.status"
}
]
}
@@ -182,32 +217,73 @@
]
},
"context": {
- "variables": [
- {
- "value": {
- "variable": "step_526_result_1",
- "variable_path": "body.data"
- },
- "skill_variable": "content_value"
- },
- {
- "value": {
- "variable": "step_526_result_1",
- "variable_path": "body.data"
- },
- "skill_variable": "content_value_copy"
- }
- ]
+ "variables": []
},
"handlers": [],
"resolver": {
"type": "continue"
},
- "variable": "step_371",
- "next_step": "step_949"
+ "variable": "step_509"
+ }
+ ],
+ "title": "Test HTTP PATCH",
+ "action": "action_1543-2",
+ "boosts": [],
+ "handlers": [],
+ "condition": {
+ "intent": "action_1543_intent_5385-2"
+ },
+ "variables": [
+ {
+ "title": "aggregated variable",
+ "variable": "operation_result",
+ "data_type": "any"
},
{
- "step": "step_949",
+ "title": "aggregated variable",
+ "variable": "operation_result_status",
+ "data_type": "any"
+ },
+ {
+ "variable": "step_138_result_1",
+ "data_type": "any"
+ },
+ {
+ "title": "Indeed I patched it- result is:{variable} status code: {variable",
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_509",
+ "data_type": "any"
+ },
+ {
+ "title": "let me patch it",
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_863",
+ "data_type": "any"
+ },
+ {
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_863_result_1",
+ "data_type": "any"
+ }
+ ],
+ "next_action": "fallback",
+ "topic_switch": {
+ "allowed_from": true,
+ "allowed_into": true
+ },
+ "disambiguation_opt_out": false
+ },
+ {
+ "type": "standard",
+ "steps": [
+ {
+ "step": "step_138",
"output": {
"generic": [
{
@@ -216,82 +292,47 @@
"text_expression": {
"concat": [
{
- "scalar": "Please provide some response to trigger the 413 Payload Too Large error."
+ "scalar": "this is a post"
}
]
}
}
],
"response_type": "text",
- "selection_policy": "sequential",
- "repeat_on_reprompt": false
- },
- {
- "options": [
- {
- "label": "Yes",
- "value": {
- "input": {
- "text": "Yes"
- }
- }
- }
- ],
- "response_type": "option",
- "repeat_on_reprompt": true
+ "selection_policy": "sequential"
}
]
},
- "handlers": [
- {
- "type": "not_found",
- "title": "validation_not_found_handler",
- "output": {
- "generic": [
+ "handlers": [],
+ "resolver": {
+ "type": "callout",
+ "callout": {
+ "path": "/test",
+ "type": "integration_interaction",
+ "method": "POST",
+ "internal": {
+ "spec_hash_id": "248e8308de7b4f1a1d814f6be315ee5b74225b96958050f1279be129290dd5a8",
+ "match_scenario": 12,
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
+ },
+ "request_mapping": {
+ "body": [
{
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "I didn't catch that. Select a valid option:"
- }
- ]
- }
- }
- ],
- "response_type": "text",
- "selection_policy": "incremental"
+ "value": {
+ "scalar": "blablabla"
+ },
+ "parameter": "some_content"
}
]
},
- "handler": "validation_not_found_handler",
- "resolver": {
- "type": "prompt_again"
- },
- "next_handler": "validation_not_found_max_tries_handler"
- },
- {
- "type": "not_found_max_tries",
- "title": "validation_not_found_max_tries_handler",
- "handler": "validation_not_found_max_tries_handler",
- "resolver": {
- "type": "fallback"
- }
+ "result_variable": "step_138_result_1"
}
- ],
- "question": {
- "entity": "entity_48614",
- "max_tries": 3
- },
- "resolver": {
- "type": "continue"
},
- "variable": "step_949",
- "next_step": "step_105"
+ "variable": "step_138",
+ "next_step": "step_386"
},
{
- "step": "step_105",
+ "step": "step_386",
"output": {
"generic": [
{
@@ -300,9 +341,20 @@
"text_expression": {
"concat": [
{
- "scalar": "You should not see this message. You should see a 413 error here instead."
- }
- ]
+ "scalar": "Indeed it was posted - result is: "
+ },
+ {
+ "variable": "step_138_result_1",
+ "variable_path": "body"
+ },
+ {
+ "scalar": " status code: "
+ },
+ {
+ "variable": "step_138_result_1",
+ "variable_path": "body.status"
+ }
+ ]
}
}
],
@@ -311,47 +363,50 @@
}
]
},
+ "context": {
+ "variables": []
+ },
"handlers": [],
"resolver": {
"type": "continue"
},
- "variable": "step_105"
+ "variable": "step_386"
}
],
- "title": "Test handle an almost too large response",
- "action": "action_12249",
+ "title": "Test HTTP POST",
+ "action": "action_20585",
"boosts": [],
"handlers": [],
"condition": {
- "intent": "action_12249_intent_48727"
+ "intent": "action_20585_intent_24221"
},
"variables": [
{
- "title": "You should not see this message. You should see a 413 error here",
- "variable": "step_105",
+ "title": "aggregated variable",
+ "variable": "operation_result",
"data_type": "any"
},
{
- "title": "Extension call success.
Try store the returned data into ",
- "variable": "step_371",
+ "title": "aggregated variable",
+ "variable": "operation_result_status",
"data_type": "any"
},
{
- "title": "I'm about to call an extension which will return context that is",
- "variable": "step_526",
+ "title": "this is a post",
+ "variable": "step_138",
"data_type": "any"
},
{
- "variable": "step_526_result_1",
+ "variable": "step_138_result_1",
"data_type": "any"
},
{
- "title": "Please provide some response to trigger the 413 Payload Too Larg",
- "variable": "step_949",
+ "title": "Indeed it was posted - result is: status code: {variable}",
+ "variable": "step_386",
"data_type": "any"
}
],
- "next_action": "action_11679",
+ "next_action": "action_1543-2",
"topic_switch": {
"allowed_from": true,
"allowed_into": true
@@ -362,7 +417,7 @@
"type": "standard",
"steps": [
{
- "step": "step_863",
+ "step": "step_112",
"output": {
"generic": [
{
@@ -371,7 +426,7 @@
"text_expression": {
"concat": [
{
- "scalar": "one moment let me delete it"
+ "scalar": "pls specify a new value to add to our session variable"
}
]
}
@@ -383,25 +438,18 @@
]
},
"handlers": [],
+ "question": {
+ "free_text": true,
+ "response_collection_behavior": "always_ask"
+ },
"resolver": {
- "type": "callout",
- "callout": {
- "path": "/test",
- "type": "integration_interaction",
- "method": "DELETE",
- "internal": {
- "spec_hash_id": "c9bd72e2862ec86e75a643ace7cbbc1d93302f7f164629ea7dc07a6288a0d2a7",
- "match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
- },
- "result_variable": "step_863_result_1"
- }
+ "type": "continue"
},
- "variable": "step_863",
- "next_step": "step_509"
+ "variable": "step_112",
+ "next_step": "step_414"
},
{
- "step": "step_509",
+ "step": "step_414",
"output": {
"generic": [
{
@@ -410,18 +458,13 @@
"text_expression": {
"concat": [
{
- "scalar": "Indeed it was deleted - result is:"
- },
- {
- "variable": "step_863_result_1",
- "variable_path": "body"
+ "scalar": "currently your array is "
},
{
- "scalar": " status code: "
+ "skill_variable": "myArray"
},
{
- "variable": "step_863_result_1",
- "variable_path": "body.status"
+ "scalar": "\n\ndo you want to add another item?"
}
]
}
@@ -429,68 +472,84 @@
],
"response_type": "text",
"selection_policy": "sequential"
+ },
+ {
+ "options": [
+ {
+ "label": "Yes",
+ "value": {
+ "input": {
+ "text": "Yes"
+ }
+ }
+ },
+ {
+ "label": "No",
+ "value": {
+ "input": {
+ "text": "No"
+ }
+ }
+ }
+ ],
+ "response_type": "option",
+ "repeat_on_reprompt": true
}
]
},
"context": {
- "variables": []
+ "variables": [
+ {
+ "value": {
+ "expression": "${myArray}.append(${step_112})"
+ },
+ "skill_variable": "myArray"
+ }
+ ]
+ },
+ "handlers": [
+ {
+ "type": "not_found",
+ "title": "validation_not_found_handler",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text": "I'm sorry, I did not catch that, please restate your response."
+ }
+ ],
+ "response_type": "text"
+ }
+ ]
+ },
+ "handler": "validation_not_found_handler",
+ "resolver": {
+ "type": "prompt_again"
+ },
+ "next_handler": "validation_not_found_max_tries_handler"
+ },
+ {
+ "type": "not_found_max_tries",
+ "title": "validation_not_found_max_tries_handler",
+ "handler": "validation_not_found_max_tries_handler",
+ "resolver": {
+ "type": "fallback"
+ }
+ }
+ ],
+ "question": {
+ "entity": "sys-yes-no",
+ "max_tries": 3
},
- "handlers": [],
"resolver": {
"type": "continue"
},
- "variable": "step_509"
- }
- ],
- "title": "Test HTTP DELETE",
- "action": "action_1543",
- "boosts": [],
- "handlers": [],
- "condition": {
- "intent": "action_1543_intent_5385"
- },
- "variables": [
- {
- "title": "aggregated variable",
- "variable": "operation_result",
- "data_type": "any"
- },
- {
- "title": "aggregated variable",
- "variable": "operation_result_status",
- "data_type": "any"
- },
- {
- "variable": "step_138_result_1",
- "data_type": "any"
- },
- {
- "title": "Indeed it was deleted - result is:{variable} status code: {varia",
- "variable": "step_509",
- "data_type": "any"
- },
- {
- "title": "one moment let me delete it",
- "variable": "step_863",
- "data_type": "any"
+ "variable": "step_414",
+ "next_step": "step_487"
},
{
- "variable": "step_863_result_1",
- "data_type": "any"
- }
- ],
- "next_action": "action_30035",
- "topic_switch": {
- "allowed_from": true,
- "allowed_into": true
- },
- "disambiguation_opt_out": false
- },
- {
- "type": "standard",
- "steps": [
- {
- "step": "step_863",
+ "step": "step_487",
"output": {
"generic": [
{
@@ -499,7 +558,10 @@
"text_expression": {
"concat": [
{
- "scalar": "let me patch it"
+ "scalar": "ok we are done with building the array. It is currently "
+ },
+ {
+ "skill_variable": "myArray"
}
]
}
@@ -512,24 +574,23 @@
},
"handlers": [],
"resolver": {
- "type": "callout",
- "callout": {
- "path": "/test",
- "type": "integration_interaction",
- "method": "PATCH",
- "internal": {
- "spec_hash_id": "18bbb292a4302d016c054e0736b3ec12bcfdcab8ea91b134ad8a20ccb182b053",
- "match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "type": "continue"
+ },
+ "variable": "step_487",
+ "condition": {
+ "eq": [
+ {
+ "variable": "step_414"
},
- "result_variable": "step_863_result_1"
- }
+ {
+ "scalar": "no"
+ }
+ ]
},
- "variable": "step_863",
- "next_step": "step_509"
+ "next_step": "step_574"
},
{
- "step": "step_509",
+ "step": "step_574",
"output": {
"generic": [
{
@@ -538,18 +599,7 @@
"text_expression": {
"concat": [
{
- "scalar": "Indeed I patched it- result is:"
- },
- {
- "variable": "step_863_result_1",
- "variable_path": "body"
- },
- {
- "scalar": " status code: "
- },
- {
- "variable": "step_863_result_1",
- "variable_path": "body.status"
+ "scalar": "asking again"
}
]
}
@@ -560,74 +610,33 @@
}
]
},
- "context": {
- "variables": []
- },
"handlers": [],
"resolver": {
- "type": "continue"
+ "type": "replay",
+ "clear": [
+ {
+ "variable": "step_112"
+ },
+ {
+ "variable": "step_414"
+ }
+ ]
},
- "variable": "step_509"
- }
- ],
- "title": "Test HTTP PATCH",
- "action": "action_1543-2",
- "boosts": [],
- "handlers": [],
- "condition": {
- "intent": "action_1543_intent_5385-2"
- },
- "variables": [
- {
- "title": "aggregated variable",
- "variable": "operation_result",
- "data_type": "any"
- },
- {
- "title": "aggregated variable",
- "variable": "operation_result_status",
- "data_type": "any"
- },
- {
- "variable": "step_138_result_1",
- "data_type": "any"
- },
- {
- "title": "Indeed I patched it- result is:{variable} status code: {variable",
- "privacy": {
- "enabled": false
- },
- "variable": "step_509",
- "data_type": "any"
- },
- {
- "title": "let me patch it",
- "privacy": {
- "enabled": false
+ "variable": "step_574",
+ "condition": {
+ "eq": [
+ {
+ "variable": "step_414"
+ },
+ {
+ "scalar": "yes"
+ }
+ ]
},
- "variable": "step_863",
- "data_type": "any"
+ "next_step": "step_426"
},
{
- "privacy": {
- "enabled": false
- },
- "variable": "step_863_result_1",
- "data_type": "any"
- }
- ],
- "next_action": "fallback",
- "topic_switch": {
- "allowed_from": true,
- "allowed_into": true
- },
- "disambiguation_opt_out": false
- },
- {
- "type": "standard",
- "steps": [
- {
- "step": "step_138",
+ "step": "step_426",
"output": {
"generic": [
{
@@ -636,7 +645,7 @@
"text_expression": {
"concat": [
{
- "scalar": "this is a post"
+ "scalar": "let's call the extension"
}
]
}
@@ -651,32 +660,32 @@
"resolver": {
"type": "callout",
"callout": {
- "path": "/test",
+ "path": "/test/arrays-object",
"type": "integration_interaction",
"method": "POST",
"internal": {
- "spec_hash_id": "248e8308de7b4f1a1d814f6be315ee5b74225b96958050f1279be129290dd5a8",
+ "spec_hash_id": "23f638583be5b3133e9e10d5b23849c84a02321b935dae33556e01c865dca465",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"request_mapping": {
"body": [
{
"value": {
- "scalar": "blablabla"
+ "skill_variable": "myArray"
},
- "parameter": "some_content"
+ "parameter": "my_array"
}
]
},
- "result_variable": "step_138_result_1"
+ "result_variable": "step_426_result_1"
}
},
- "variable": "step_138",
- "next_step": "step_386"
+ "variable": "step_426",
+ "next_step": "step_863"
},
{
- "step": "step_386",
+ "step": "step_863",
"output": {
"generic": [
{
@@ -685,18 +694,11 @@
"text_expression": {
"concat": [
{
- "scalar": "Indeed it was posted - result is: "
- },
- {
- "variable": "step_138_result_1",
- "variable_path": "body"
- },
- {
- "scalar": " status code: "
+ "scalar": "Got the reply. my array should be reversed: "
},
{
- "variable": "step_138_result_1",
- "variable_path": "body.status"
+ "variable": "step_426_result_1",
+ "variable_path": "body.reverse_array"
}
]
}
@@ -714,43 +716,64 @@
"resolver": {
"type": "continue"
},
- "variable": "step_386"
+ "variable": "step_863",
+ "condition": {
+ "eq": [
+ {
+ "variable": "step_426_result_1",
+ "variable_path": "success"
+ },
+ {
+ "scalar": true
+ }
+ ]
+ }
}
],
- "title": "Test HTTP POST",
- "action": "action_20585",
+ "title": "Test parse array inside object",
+ "action": "action_21392",
"boosts": [],
"handlers": [],
"condition": {
- "intent": "action_20585_intent_24221"
+ "intent": "action_21392_intent_30689"
},
"variables": [
{
- "title": "aggregated variable",
- "variable": "operation_result",
+ "title": "pls specify a new value to add to our session variable",
+ "variable": "step_112",
"data_type": "any"
},
{
- "title": "aggregated variable",
- "variable": "operation_result_status",
+ "title": "currently your array is {variable} do you want to add another it",
+ "variable": "step_414",
+ "data_type": "yes_no"
+ },
+ {
+ "title": "let's call the extension",
+ "variable": "step_426",
"data_type": "any"
},
{
- "title": "this is a post",
- "variable": "step_138",
+ "variable": "step_426_result_1",
"data_type": "any"
},
{
- "variable": "step_138_result_1",
+ "title": "ok we are done with building the array. It is currently {variabl",
+ "variable": "step_487",
"data_type": "any"
},
{
- "title": "Indeed it was posted - result is: status code: {variable}",
- "variable": "step_386",
+ "title": "asking again",
+ "variable": "step_574",
+ "data_type": "any"
+ },
+ {
+ "title": "Got the reply. my array should be reversed: {variable}",
+ "variable": "step_863",
"data_type": "any"
}
],
- "next_action": "action_1543-2",
+ "next_action": "action_12249",
"topic_switch": {
"allowed_from": true,
"allowed_into": true
@@ -761,7 +784,7 @@
"type": "standard",
"steps": [
{
- "step": "step_112",
+ "step": "step_331",
"output": {
"generic": [
{
@@ -770,7 +793,95 @@
"text_expression": {
"concat": [
{
- "scalar": "pls specify a new value to add to our session variable"
+ "scalar": "I’m about to call an extension that will stream a response using SSE (Server-Sent Events)."
+ }
+ ]
+ }
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "sequential"
+ }
+ ]
+ },
+ "handlers": [],
+ "resolver": {
+ "type": "callout",
+ "callout": {
+ "path": "/test/stream/timeout",
+ "type": "integration_interaction",
+ "method": "POST",
+ "internal": {
+ "spec_hash_id": "937ab64d4b8380bbef096d265f29d9632ee0a5ee8d30995198423fe7e77dc894",
+ "match_scenario": 12,
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
+ },
+ "result_variable": "step_331_result_1",
+ "stream_response_mapping": {
+ "partial_item": [
+ {
+ "mapping": [
+ {
+ "name": "text",
+ "value": "results[0].generated_text"
+ }
+ ],
+ "response_type": "text"
+ }
+ ]
+ }
+ }
+ },
+ "variable": "step_331"
+ }
+ ],
+ "title": "Test a long response in Server-Sent Events (SSE)",
+ "action": "action_22451",
+ "boosts": [],
+ "handlers": [],
+ "condition": {
+ "intent": "action_22451_intent_31436"
+ },
+ "variables": [
+ {
+ "title": "I’m about to call an extension that will stream a response using",
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_331",
+ "data_type": "any"
+ },
+ {
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_331_result_1",
+ "data_type": "any"
+ }
+ ],
+ "launch_mode": "learning",
+ "next_action": "action_34745",
+ "topic_switch": {
+ "allowed_from": true,
+ "allowed_into": true,
+ "never_return": false
+ },
+ "disambiguation_opt_out": false
+ },
+ {
+ "type": "standard",
+ "steps": [
+ {
+ "step": "step_992",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "Please make sure the authorization for custom extension is not configured. Otherwise the Authorization header value will be overridden.\n\n
\n\n\n\nPlease enter the value to be used in Authorization header:"
}
]
}
@@ -789,11 +900,11 @@
"resolver": {
"type": "continue"
},
- "variable": "step_112",
- "next_step": "step_414"
+ "variable": "step_992",
+ "next_step": "step_710"
},
{
- "step": "step_414",
+ "step": "step_710",
"output": {
"generic": [
{
@@ -802,13 +913,7 @@
"text_expression": {
"concat": [
{
- "scalar": "currently your array is "
- },
- {
- "skill_variable": "myArray"
- },
- {
- "scalar": "\n\ndo you want to add another item?"
+ "scalar": "Now calling the extension with the given value set as the auth header..."
}
]
}
@@ -816,84 +921,39 @@
],
"response_type": "text",
"selection_policy": "sequential"
- },
- {
- "options": [
- {
- "label": "Yes",
- "value": {
- "input": {
- "text": "Yes"
- }
- }
- },
- {
- "label": "No",
- "value": {
- "input": {
- "text": "No"
- }
- }
- }
- ],
- "response_type": "option",
- "repeat_on_reprompt": true
- }
- ]
- },
- "context": {
- "variables": [
- {
- "value": {
- "expression": "${myArray}.append(${step_112})"
- },
- "skill_variable": "myArray"
}
]
},
- "handlers": [
- {
- "type": "not_found",
- "title": "validation_not_found_handler",
- "output": {
- "generic": [
+ "handlers": [],
+ "resolver": {
+ "type": "callout",
+ "callout": {
+ "path": "/test/auth_header",
+ "type": "integration_interaction",
+ "method": "POST",
+ "internal": {
+ "spec_hash_id": "4709b84bd687e9848832654c0fdb5a134ab7964c33934782c53a1fad0a348056",
+ "match_scenario": 12,
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
+ },
+ "request_mapping": {
+ "header": [
{
- "values": [
- {
- "text": "I'm sorry, I did not catch that, please restate your response."
- }
- ],
- "response_type": "text"
+ "value": {
+ "variable": "step_992"
+ },
+ "parameter": "Authorization"
}
]
},
- "handler": "validation_not_found_handler",
- "resolver": {
- "type": "prompt_again"
- },
- "next_handler": "validation_not_found_max_tries_handler"
- },
- {
- "type": "not_found_max_tries",
- "title": "validation_not_found_max_tries_handler",
- "handler": "validation_not_found_max_tries_handler",
- "resolver": {
- "type": "fallback"
- }
+ "result_variable": "step_710_result_1"
}
- ],
- "question": {
- "entity": "sys-yes-no",
- "max_tries": 3
- },
- "resolver": {
- "type": "continue"
},
- "variable": "step_414",
- "next_step": "step_487"
+ "variable": "step_710",
+ "next_step": "step_274"
},
{
- "step": "step_487",
+ "step": "step_274",
"output": {
"generic": [
{
@@ -902,10 +962,20 @@
"text_expression": {
"concat": [
{
- "scalar": "ok we are done with building the array. It is currently "
+ "scalar": "Your auth header: "
},
{
- "skill_variable": "myArray"
+ "variable": "step_992"
+ },
+ {
+ "scalar": "\n\nServer received auth header: "
+ },
+ {
+ "variable": "step_710_result_1",
+ "variable_path": "body.auth_header"
+ },
+ {
+ "scalar": "\n\n
\n\n\n\nTwo values should be the same. Otherwise, it is possible that the auth header is overriden by the extension's auth configuration."
}
]
}
@@ -920,67 +990,51 @@
"resolver": {
"type": "continue"
},
- "variable": "step_487",
- "condition": {
- "eq": [
- {
- "variable": "step_414"
- },
- {
- "scalar": "no"
- }
- ]
- },
- "next_step": "step_574"
+ "variable": "step_274"
+ }
+ ],
+ "title": "Test set auth header with context variable",
+ "action": "action_22557",
+ "boosts": [],
+ "handlers": [],
+ "condition": {
+ "intent": "action_22557_intent_12065"
+ },
+ "variables": [
+ {
+ "title": "Your auth header: {variable} Server received auth header: {varia",
+ "variable": "step_274",
+ "data_type": "any"
},
{
- "step": "step_574",
- "output": {
- "generic": [
- {
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "asking again"
- }
- ]
- }
- }
- ],
- "response_type": "text",
- "selection_policy": "sequential"
- }
- ]
- },
- "handlers": [],
- "resolver": {
- "type": "replay",
- "clear": [
- {
- "variable": "step_112"
- },
- {
- "variable": "step_414"
- }
- ]
- },
- "variable": "step_574",
- "condition": {
- "eq": [
- {
- "variable": "step_414"
- },
- {
- "scalar": "yes"
- }
- ]
- },
- "next_step": "step_426"
+ "title": "Now calling the extension with the given value set as the auth h",
+ "variable": "step_710",
+ "data_type": "any"
},
{
- "step": "step_426",
+ "variable": "step_710_result_1",
+ "data_type": "any"
+ },
+ {
+ "title": "Please make sure the authorization for custom extension is not c",
+ "variable": "step_992",
+ "data_type": "any"
+ }
+ ],
+ "launch_mode": "learning",
+ "next_action": "action_3462",
+ "topic_switch": {
+ "allowed_from": true,
+ "allowed_into": true,
+ "never_return": false
+ },
+ "disambiguation_opt_out": false
+ },
+ {
+ "type": "standard",
+ "steps": [
+ {
+ "step": "step_658",
"output": {
"generic": [
{
@@ -989,7 +1043,7 @@
"text_expression": {
"concat": [
{
- "scalar": "let's call the extension"
+ "scalar": "I will show you how I handle error"
}
]
}
@@ -1004,32 +1058,22 @@
"resolver": {
"type": "callout",
"callout": {
- "path": "/test/arrays-object",
+ "path": "/test/error",
"type": "integration_interaction",
"method": "POST",
"internal": {
- "spec_hash_id": "23f638583be5b3133e9e10d5b23849c84a02321b935dae33556e01c865dca465",
+ "spec_hash_id": "39f6ab0451de35c1810c345b125e5c25f105ec719b81fb95297832eca5191f46",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
- },
- "request_mapping": {
- "body": [
- {
- "value": {
- "skill_variable": "myArray"
- },
- "parameter": "my_array"
- }
- ]
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
- "result_variable": "step_426_result_1"
+ "result_variable": "step_658_result_1"
}
},
- "variable": "step_426",
- "next_step": "step_863"
+ "variable": "step_658",
+ "next_step": "step_436"
},
{
- "step": "step_863",
+ "step": "step_436",
"output": {
"generic": [
{
@@ -1038,11 +1082,11 @@
"text_expression": {
"concat": [
{
- "scalar": "Got the reply. my array should be reversed: "
+ "scalar": "So this is your error: "
},
{
- "variable": "step_426_result_1",
- "variable_path": "body.reverse_array"
+ "variable": "step_658_result_1",
+ "variable_path": "body"
}
]
}
@@ -1060,155 +1104,42 @@
"resolver": {
"type": "continue"
},
- "variable": "step_863",
- "condition": {
- "eq": [
- {
- "variable": "step_426_result_1",
- "variable_path": "success"
- },
- {
- "scalar": true
- }
- ]
- }
+ "variable": "step_436"
}
],
- "title": "Test parse array inside object",
- "action": "action_21392",
+ "title": "Test handle error in response",
+ "action": "action_26118",
"boosts": [],
"handlers": [],
"condition": {
- "intent": "action_21392_intent_30689"
+ "intent": "action_26118_intent_41514"
},
"variables": [
{
- "title": "pls specify a new value to add to our session variable",
- "variable": "step_112",
+ "title": "So this is your error: {variable}",
+ "variable": "step_436",
"data_type": "any"
},
{
- "title": "currently your array is {variable} do you want to add another it",
- "variable": "step_414",
- "data_type": "yes_no"
- },
- {
- "title": "let's call the extension",
- "variable": "step_426",
- "data_type": "any"
- },
- {
- "variable": "step_426_result_1",
- "data_type": "any"
- },
- {
- "title": "ok we are done with building the array. It is currently {variabl",
- "variable": "step_487",
- "data_type": "any"
- },
- {
- "title": "asking again",
- "variable": "step_574",
- "data_type": "any"
- },
- {
- "title": "Got the reply. my array should be reversed: {variable}",
- "variable": "step_863",
- "data_type": "any"
- }
- ],
- "next_action": "action_12249",
- "topic_switch": {
- "allowed_from": true,
- "allowed_into": true
- },
- "disambiguation_opt_out": false
- },
- {
- "type": "standard",
- "steps": [
- {
- "step": "step_331",
- "output": {
- "generic": [
- {
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "I’m about to call an extension that will stream a response using SSE (Server-Sent Events)."
- }
- ]
- }
- }
- ],
- "response_type": "text",
- "selection_policy": "sequential"
- }
- ]
- },
- "handlers": [],
- "resolver": {
- "type": "callout",
- "callout": {
- "path": "/test/stream/timeout",
- "type": "integration_interaction",
- "method": "POST",
- "internal": {
- "spec_hash_id": "937ab64d4b8380bbef096d265f29d9632ee0a5ee8d30995198423fe7e77dc894",
- "match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
- },
- "result_variable": "step_331_result_1",
- "stream_response_mapping": {
- "partial_item": [
- {
- "mapping": [
- {
- "name": "text",
- "value": "results[0].generated_text"
- }
- ],
- "response_type": "text"
- }
- ]
- }
- }
- },
- "variable": "step_331"
- }
- ],
- "title": "Test a long response in Server-Sent Events (SSE)",
- "action": "action_22451",
- "boosts": [],
- "handlers": [],
- "condition": {
- "intent": "action_22451_intent_31436"
- },
- "variables": [
- {
- "title": "I’m about to call an extension that will stream a response using",
+ "title": "I will show you how I handle error",
"privacy": {
"enabled": false
},
- "variable": "step_331",
+ "variable": "step_658",
"data_type": "any"
},
{
"privacy": {
"enabled": false
},
- "variable": "step_331_result_1",
+ "variable": "step_658_result_1",
"data_type": "any"
}
],
- "launch_mode": "learning",
- "next_action": "action_34745",
+ "next_action": "action_45207",
"topic_switch": {
"allowed_from": true,
- "allowed_into": true,
- "never_return": false
+ "allowed_into": true
},
"disambiguation_opt_out": false
},
@@ -1216,39 +1147,7 @@
"type": "standard",
"steps": [
{
- "step": "step_992",
- "output": {
- "generic": [
- {
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "Please make sure the authorization for custom extension is not configured. Otherwise the Authorization header value will be overridden.\n\n
\n\n\n\nPlease enter the value to be used in Authorization header:"
- }
- ]
- }
- }
- ],
- "response_type": "text",
- "selection_policy": "sequential"
- }
- ]
- },
- "handlers": [],
- "question": {
- "free_text": true,
- "response_collection_behavior": "always_ask"
- },
- "resolver": {
- "type": "continue"
- },
- "variable": "step_992",
- "next_step": "step_710"
- },
- {
- "step": "step_710",
+ "step": "step_739",
"output": {
"generic": [
{
@@ -1257,7 +1156,7 @@
"text_expression": {
"concat": [
{
- "scalar": "Now calling the extension with the given value set as the auth header..."
+ "scalar": "PUT is now in the house"
}
]
}
@@ -1272,32 +1171,32 @@
"resolver": {
"type": "callout",
"callout": {
- "path": "/test/auth_header",
+ "path": "/test",
"type": "integration_interaction",
- "method": "POST",
+ "method": "PUT",
"internal": {
- "spec_hash_id": "4709b84bd687e9848832654c0fdb5a134ab7964c33934782c53a1fad0a348056",
+ "spec_hash_id": "bbf2bdd46be4526fd226330a20f0e665e835d4c20e2a78f04173633c930da918",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"request_mapping": {
- "header": [
+ "body": [
{
"value": {
- "variable": "step_992"
+ "scalar": "blablabla"
},
- "parameter": "Authorization"
+ "parameter": "some_content"
}
]
},
- "result_variable": "step_710_result_1"
+ "result_variable": "step_739_result_1"
}
},
- "variable": "step_710",
- "next_step": "step_274"
+ "variable": "step_739",
+ "next_step": "step_368"
},
{
- "step": "step_274",
+ "step": "step_368",
"output": {
"generic": [
{
@@ -1306,20 +1205,18 @@
"text_expression": {
"concat": [
{
- "scalar": "Your auth header: "
- },
- {
- "variable": "step_992"
+ "scalar": "Indeed it was updated - result is:"
},
{
- "scalar": "\n\nServer received auth header: "
+ "variable": "step_739_result_1",
+ "variable_path": "body"
},
{
- "variable": "step_710_result_1",
- "variable_path": "body.auth_header"
+ "scalar": " status code: "
},
{
- "scalar": "\n\n
\n\n\n\nTwo values should be the same. Otherwise, it is possible that the auth header is overriden by the extension's auth configuration."
+ "variable": "step_739_result_1",
+ "variable_path": "body.status"
}
]
}
@@ -1330,47 +1227,57 @@
}
]
},
+ "context": {
+ "variables": []
+ },
"handlers": [],
"resolver": {
"type": "continue"
},
- "variable": "step_274"
+ "variable": "step_368"
}
],
- "title": "Test set auth header with context variable",
- "action": "action_22557",
+ "title": "Test HTTP PUT",
+ "action": "action_30035",
"boosts": [],
"handlers": [],
"condition": {
- "intent": "action_22557_intent_12065"
+ "intent": "action_30035_intent_49329"
},
"variables": [
{
- "title": "Your auth header: {variable} Server received auth header: {varia",
- "variable": "step_274",
+ "title": "aggregated variable",
+ "variable": "operation_result",
"data_type": "any"
},
{
- "title": "Now calling the extension with the given value set as the auth h",
- "variable": "step_710",
+ "title": "aggregated variable",
+ "variable": "operation_result_status",
"data_type": "any"
},
{
- "variable": "step_710_result_1",
+ "title": "Indeed it was updated - result is:{variable} status code: {varia",
+ "variable": "step_368",
"data_type": "any"
},
{
- "title": "Please make sure the authorization for custom extension is not c",
- "variable": "step_992",
+ "variable": "step_658_result_1",
+ "data_type": "any"
+ },
+ {
+ "title": "PUT is now in the house",
+ "variable": "step_739",
+ "data_type": "any"
+ },
+ {
+ "variable": "step_739_result_1",
"data_type": "any"
}
],
- "launch_mode": "learning",
- "next_action": "action_3462",
+ "next_action": "action_20585",
"topic_switch": {
"allowed_from": true,
- "allowed_into": true,
- "never_return": false
+ "allowed_into": true
},
"disambiguation_opt_out": false
},
@@ -1378,7 +1285,7 @@
"type": "standard",
"steps": [
{
- "step": "step_658",
+ "step": "step_367",
"output": {
"generic": [
{
@@ -1387,7 +1294,7 @@
"text_expression": {
"concat": [
{
- "scalar": "I will show you how I handle error"
+ "scalar": "I will show you how custom extensions handles a non-JSON response"
}
]
}
@@ -1402,22 +1309,22 @@
"resolver": {
"type": "callout",
"callout": {
- "path": "/test/error",
+ "path": "/test/non-json-response",
"type": "integration_interaction",
"method": "POST",
"internal": {
- "spec_hash_id": "39f6ab0451de35c1810c345b125e5c25f105ec719b81fb95297832eca5191f46",
+ "spec_hash_id": "e7b0b26798ecd3ce7abd86d34f113e3a253d7b8afcda67c31cf56340c8541ed0",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
- "result_variable": "step_658_result_1"
+ "result_variable": "step_367_result_1"
}
},
- "variable": "step_658",
- "next_step": "step_436"
+ "variable": "step_367",
+ "next_step": "step_505"
},
{
- "step": "step_436",
+ "step": "step_505",
"output": {
"generic": [
{
@@ -1426,269 +1333,18 @@
"text_expression": {
"concat": [
{
- "scalar": "So this is your error: "
+ "scalar": "**Status Code** should be \"422\", received: "
},
{
- "variable": "step_658_result_1",
- "variable_path": "body"
- }
- ]
- }
- }
- ],
- "response_type": "text",
- "selection_policy": "sequential"
- }
- ]
- },
- "context": {
- "variables": []
- },
- "handlers": [],
- "resolver": {
- "type": "continue"
- },
- "variable": "step_436"
- }
- ],
- "title": "Test handle error in response",
- "action": "action_26118",
- "boosts": [],
- "handlers": [],
- "condition": {
- "intent": "action_26118_intent_41514"
- },
- "variables": [
- {
- "title": "So this is your error: {variable}",
- "variable": "step_436",
- "data_type": "any"
- },
- {
- "title": "I will show you how I handle error",
- "privacy": {
- "enabled": false
- },
- "variable": "step_658",
- "data_type": "any"
- },
- {
- "privacy": {
- "enabled": false
- },
- "variable": "step_658_result_1",
- "data_type": "any"
- }
- ],
- "next_action": "action_45207",
- "topic_switch": {
- "allowed_from": true,
- "allowed_into": true
- },
- "disambiguation_opt_out": false
- },
- {
- "type": "standard",
- "steps": [
- {
- "step": "step_739",
- "output": {
- "generic": [
- {
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "PUT is now in the house"
- }
- ]
- }
- }
- ],
- "response_type": "text",
- "selection_policy": "sequential"
- }
- ]
- },
- "handlers": [],
- "resolver": {
- "type": "callout",
- "callout": {
- "path": "/test",
- "type": "integration_interaction",
- "method": "PUT",
- "internal": {
- "spec_hash_id": "bbf2bdd46be4526fd226330a20f0e665e835d4c20e2a78f04173633c930da918",
- "match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
- },
- "request_mapping": {
- "body": [
- {
- "value": {
- "scalar": "blablabla"
- },
- "parameter": "some_content"
- }
- ]
- },
- "result_variable": "step_739_result_1"
- }
- },
- "variable": "step_739",
- "next_step": "step_368"
- },
- {
- "step": "step_368",
- "output": {
- "generic": [
- {
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "Indeed it was updated - result is:"
- },
- {
- "variable": "step_739_result_1",
- "variable_path": "body"
- },
- {
- "scalar": " status code: "
- },
- {
- "variable": "step_739_result_1",
- "variable_path": "body.status"
- }
- ]
- }
- }
- ],
- "response_type": "text",
- "selection_policy": "sequential"
- }
- ]
- },
- "context": {
- "variables": []
- },
- "handlers": [],
- "resolver": {
- "type": "continue"
- },
- "variable": "step_368"
- }
- ],
- "title": "Test HTTP PUT",
- "action": "action_30035",
- "boosts": [],
- "handlers": [],
- "condition": {
- "intent": "action_30035_intent_49329"
- },
- "variables": [
- {
- "title": "aggregated variable",
- "variable": "operation_result",
- "data_type": "any"
- },
- {
- "title": "aggregated variable",
- "variable": "operation_result_status",
- "data_type": "any"
- },
- {
- "title": "Indeed it was updated - result is:{variable} status code: {varia",
- "variable": "step_368",
- "data_type": "any"
- },
- {
- "variable": "step_658_result_1",
- "data_type": "any"
- },
- {
- "title": "PUT is now in the house",
- "variable": "step_739",
- "data_type": "any"
- },
- {
- "variable": "step_739_result_1",
- "data_type": "any"
- }
- ],
- "next_action": "action_20585",
- "topic_switch": {
- "allowed_from": true,
- "allowed_into": true
- },
- "disambiguation_opt_out": false
- },
- {
- "type": "standard",
- "steps": [
- {
- "step": "step_367",
- "output": {
- "generic": [
- {
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "I will show you how custom extensions handles a non-JSON response"
- }
- ]
- }
- }
- ],
- "response_type": "text",
- "selection_policy": "sequential"
- }
- ]
- },
- "handlers": [],
- "resolver": {
- "type": "callout",
- "callout": {
- "path": "/test/non-json-response",
- "type": "integration_interaction",
- "method": "POST",
- "internal": {
- "spec_hash_id": "e7b0b26798ecd3ce7abd86d34f113e3a253d7b8afcda67c31cf56340c8541ed0",
- "match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
- },
- "result_variable": "step_367_result_1"
- }
- },
- "variable": "step_367",
- "next_step": "step_505"
- },
- {
- "step": "step_505",
- "output": {
- "generic": [
- {
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "**Status Code** should be \"422\", received: "
- },
- {
- "variable": "step_367_result_1",
- "variable_path": "status"
- },
- {
- "scalar": "\n\n
\n\n\n\n**Ran Successfully** should be \"false\", got: "
- },
- {
- "variable": "step_367_result_1",
- "variable_path": "success"
+ "variable": "step_367_result_1",
+ "variable_path": "status"
+ },
+ {
+ "scalar": "\n\n
\n\n\n\n**Ran Successfully** should be \"false\", got: "
+ },
+ {
+ "variable": "step_367_result_1",
+ "variable_path": "success"
}
]
}
@@ -1965,7 +1621,7 @@
"internal": {
"spec_hash_id": "9e9048ccb56c63c9fe291105e6c7596a8693979aee76979d7e567b5700ef9774",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"result_variable": "step_617_result_1",
"stream_response_mapping": {
@@ -2053,7 +1709,7 @@
"internal": {
"spec_hash_id": "fd33f499ee9cb2c0ed79c1dce820f4f957bb51c765044420fa9b11bb16c80e83",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"result_variable": "step_628_result_1"
}
@@ -2223,7 +1879,7 @@
"internal": {
"spec_hash_id": "0f2b3166ab23a282ec4e6b080d140c65d8e38b6e3d69da9f07f9ec5055ff471f",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"request_mapping": {
"path": [
@@ -2390,7 +2046,7 @@
"internal": {
"spec_hash_id": "fd33f499ee9cb2c0ed79c1dce820f4f957bb51c765044420fa9b11bb16c80e83",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"result_variable": "step_646_result_1"
}
@@ -2436,7 +2092,7 @@
"internal": {
"spec_hash_id": "fd33f499ee9cb2c0ed79c1dce820f4f957bb51c765044420fa9b11bb16c80e83",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"result_variable": "step_507_result_1"
}
@@ -2482,7 +2138,7 @@
"internal": {
"spec_hash_id": "c9bd72e2862ec86e75a643ace7cbbc1d93302f7f164629ea7dc07a6288a0d2a7",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"result_variable": "step_154_result_1"
}
@@ -2733,7 +2389,7 @@
"internal": {
"spec_hash_id": "a031f18fc11262a101c825f227f0f0edcc5efe2b326e2bd100d5886678fca6e3",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"request_mapping": {
"body": [
@@ -2885,7 +2541,7 @@
"internal": {
"spec_hash_id": "659adeb54c70bb9a693215097aed4f7ab36178b7ad420b414a2e061468491d86",
"match_scenario": 12,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"result_variable": "step_947_result_1",
"stream_response_mapping": {
@@ -3242,60 +2898,19 @@
"type": "standard",
"steps": [
{
- "step": "step_001",
+ "step": "step_251",
"output": {
"generic": [
{
"values": [
{
- "text": "Welcome, how can I assist you?"
- }
- ],
- "response_type": "text",
- "selection_policy": "sequential"
- }
- ]
- },
- "handlers": [],
- "resolver": {
- "type": "continue"
- },
- "variable": "step_001"
- }
- ],
- "title": "Greet customer",
- "action": "welcome",
- "boosts": [],
- "handlers": [],
- "condition": {
- "expression": "welcome"
- },
- "variables": [
- {
- "variable": "step_001",
- "data_type": "any"
- }
- ],
- "next_action": "action_5330",
- "disambiguation_opt_out": true
- },
- {
- "type": "standard",
- "steps": [
- {
- "step": "step_251",
- "output": {
- "generic": [
- {
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "Please make sure you've configured the authentication method when adding the extension.\n\nWhich security method do u wanna check?"
- }
- ]
- }
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "Please make sure you've configured the authentication method when adding the extension.\n\nWhich security method do u wanna check?"
+ }
+ ]
+ }
}
],
"response_type": "text",
@@ -3442,8 +3057,8 @@
"method": "POST",
"internal": {
"spec_hash_id": "f43754755baa579ca59fb605a63096a7b752a3ad2b05d8138609c83e6aa0ebee",
- "match_scenario": 10,
- "catalog_item_id": "5cb2b3ee-4628-4bae-8211-45999a099572"
+ "match_scenario": 12,
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
},
"request_mapping": {
"path": [
@@ -3455,59 +3070,523 @@
}
]
},
- "result_variable": "step_836_result_1"
+ "result_variable": "step_836_result_1"
+ }
+ },
+ "variable": "step_836",
+ "next_step": "step_341"
+ },
+ {
+ "step": "step_341",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "the result of your call is: "
+ },
+ {
+ "variable": "step_836_result_1",
+ "variable_path": "body.message"
+ },
+ {
+ "scalar": " status code: "
+ },
+ {
+ "variable": "step_836_result_1",
+ "variable_path": "status"
+ }
+ ]
+ }
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "sequential"
+ }
+ ]
+ },
+ "context": {
+ "variables": []
+ },
+ "handlers": [],
+ "resolver": {
+ "type": "continue"
+ },
+ "variable": "step_341",
+ "condition": {
+ "expression": "${step_836_result_1.status}<400"
+ },
+ "next_step": "step_902"
+ },
+ {
+ "step": "step_902",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "The call had an error - status is: "
+ },
+ {
+ "variable": "step_836_result_1",
+ "variable_path": "status"
+ },
+ {
+ "scalar": " The full error is: "
+ },
+ {
+ "variable": "step_836_result_1",
+ "variable_path": "body.message"
+ }
+ ]
+ }
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "sequential"
+ }
+ ]
+ },
+ "handlers": [],
+ "resolver": {
+ "type": "continue"
+ },
+ "variable": "step_902",
+ "condition": {
+ "expression": "${step_836_result_1.status}>399"
+ }
+ }
+ ],
+ "title": "Test calling extension with different authentication methods",
+ "action": "action_22832",
+ "boosts": [],
+ "handlers": [],
+ "condition": {
+ "intent": "action_22832_intent_9949"
+ },
+ "variables": [
+ {
+ "title": "aggregated variable",
+ "variable": "operation_result",
+ "data_type": "any"
+ },
+ {
+ "title": "aggregated variable",
+ "variable": "operation_result_status",
+ "data_type": "any"
+ },
+ {
+ "variable": "step_149_result_1",
+ "data_type": "any"
+ },
+ {
+ "title": "Please make sure you've configured the authentication method whe",
+ "variable": "step_251",
+ "data_type": "any"
+ },
+ {
+ "title": "the result of your call is: {variable} status code: {variable}",
+ "variable": "step_341",
+ "data_type": "any"
+ },
+ {
+ "variable": "step_491_result_1",
+ "data_type": "any"
+ },
+ {
+ "variable": "step_538_result_1",
+ "data_type": "any"
+ },
+ {
+ "variable": "step_628_result_1",
+ "data_type": "any"
+ },
+ {
+ "variable": "step_658_result_1",
+ "data_type": "any"
+ },
+ {
+ "variable": "step_739_result_1",
+ "data_type": "any"
+ },
+ {
+ "title": "you have selected {variable}, calling it",
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_836",
+ "data_type": "any"
+ },
+ {
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_836_result_1",
+ "data_type": "any"
+ },
+ {
+ "title": "The call had an error - status is: {variable} The full error is:",
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_902",
+ "data_type": "any"
+ }
+ ],
+ "next_action": "action_26118",
+ "topic_switch": {
+ "allowed_from": true,
+ "allowed_into": true
+ },
+ "disambiguation_opt_out": false
+ },
+ {
+ "type": "standard",
+ "steps": [
+ {
+ "step": "step_001",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text": "Welcome, how can I assist you?"
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "sequential"
+ }
+ ]
+ },
+ "handlers": [],
+ "resolver": {
+ "type": "continue"
+ },
+ "variable": "step_001"
+ }
+ ],
+ "title": "Greet customer",
+ "action": "welcome",
+ "boosts": [],
+ "handlers": [],
+ "condition": {
+ "expression": "welcome"
+ },
+ "variables": [
+ {
+ "variable": "step_001",
+ "data_type": "any"
+ }
+ ],
+ "next_action": "action_5330",
+ "disambiguation_opt_out": true
+ },
+ {
+ "type": "standard",
+ "steps": [
+ {
+ "step": "step_588",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "I'm about to call an extension which will return a large response that exceeds the custom extension repsonse limit"
+ }
+ ]
+ }
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "sequential"
+ }
+ ]
+ },
+ "handlers": [],
+ "resolver": {
+ "type": "callout",
+ "callout": {
+ "path": "/test/response-too-large",
+ "type": "integration_interaction",
+ "method": "POST",
+ "internal": {
+ "spec_hash_id": "96ce6dd90e55b70b75d4aa0f87ef7789ada12309b34b036fd5fac4df585862bd",
+ "match_scenario": 10,
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
+ },
+ "result_variable": "step_588_result_1"
+ }
+ },
+ "variable": "step_588",
+ "next_step": "step_962"
+ },
+ {
+ "step": "step_962",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "The extension call fails because the extension responded with a result that larger than 100 KB.\n\nExtension call success: "
+ },
+ {
+ "variable": "step_588_result_1",
+ "variable_path": "success"
+ }
+ ]
+ }
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "sequential"
+ }
+ ]
+ },
+ "handlers": [],
+ "resolver": {
+ "type": "continue"
+ },
+ "variable": "step_962"
+ }
+ ],
+ "title": "Test handle a too large response from extension",
+ "action": "action_11679",
+ "boosts": [],
+ "handlers": [],
+ "condition": {
+ "intent": "action_11679_intent_29725"
+ },
+ "variables": [
+ {
+ "title": "I'm about to call an extension which will return a large respons",
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_588",
+ "data_type": "any"
+ },
+ {
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_588_result_1",
+ "data_type": "any"
+ },
+ {
+ "title": "The extension call fails because the extension responded with a ",
+ "variable": "step_962",
+ "data_type": "any"
+ }
+ ],
+ "next_action": "action_38662",
+ "topic_switch": {
+ "allowed_from": true,
+ "allowed_into": true
+ },
+ "disambiguation_opt_out": false
+ },
+ {
+ "type": "standard",
+ "steps": [
+ {
+ "step": "step_526",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "I'm about to call an extension which will return context that is almost too large for WA session."
+ }
+ ]
+ }
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "sequential"
+ }
+ ]
+ },
+ "handlers": [],
+ "resolver": {
+ "type": "callout",
+ "callout": {
+ "path": "/test/context-almost-too-large",
+ "type": "integration_interaction",
+ "method": "POST",
+ "internal": {
+ "spec_hash_id": "2970100c50c1735d107fad0403ab72a0d8e92400591f2a34c587f28a40e1a0a4",
+ "match_scenario": 10,
+ "catalog_item_id": "98fca447-d6fa-4c91-bf8f-6a7d58bed5fb"
+ },
+ "result_variable": "step_526_result_1"
+ }
+ },
+ "variable": "step_526",
+ "next_step": "step_677"
+ },
+ {
+ "step": "step_677",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "Extension call success: "
+ },
+ {
+ "variable": "step_526_result_1",
+ "variable_path": "success"
+ }
+ ]
+ }
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "sequential"
+ }
+ ]
+ },
+ "handlers": [],
+ "resolver": {
+ "type": "continue"
+ },
+ "variable": "step_677",
+ "next_step": "step_949"
+ },
+ {
+ "step": "step_949",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "Please provide some response to trigger the 400 Session state exceeds the 130kb size limit error."
+ }
+ ]
+ }
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "sequential",
+ "repeat_on_reprompt": false
+ },
+ {
+ "options": [
+ {
+ "label": "Yes",
+ "value": {
+ "input": {
+ "text": "Yes"
+ }
+ }
+ }
+ ],
+ "response_type": "option",
+ "repeat_on_reprompt": true
+ }
+ ]
+ },
+ "handlers": [
+ {
+ "type": "not_found",
+ "title": "validation_not_found_handler",
+ "output": {
+ "generic": [
+ {
+ "values": [
+ {
+ "text_expression": {
+ "concat": [
+ {
+ "scalar": "I didn't catch that. Select a valid option:"
+ }
+ ]
+ }
+ }
+ ],
+ "response_type": "text",
+ "selection_policy": "incremental"
+ }
+ ]
+ },
+ "handler": "validation_not_found_handler",
+ "resolver": {
+ "type": "prompt_again"
+ },
+ "next_handler": "validation_not_found_max_tries_handler"
+ },
+ {
+ "type": "not_found_max_tries",
+ "title": "validation_not_found_max_tries_handler",
+ "handler": "validation_not_found_max_tries_handler",
+ "resolver": {
+ "type": "fallback"
+ }
}
+ ],
+ "question": {
+ "entity": "entity_48614",
+ "max_tries": 3
},
- "variable": "step_836",
- "next_step": "step_341"
+ "resolver": {
+ "type": "continue"
+ },
+ "variable": "step_949",
+ "next_step": "step_371"
},
{
- "step": "step_341",
+ "step": "step_371",
"output": {
- "generic": [
+ "generic": []
+ },
+ "context": {
+ "variables": [
{
- "values": [
- {
- "text_expression": {
- "concat": [
- {
- "scalar": "the result of your call is: "
- },
- {
- "variable": "step_836_result_1",
- "variable_path": "body.message"
- },
- {
- "scalar": " status code: "
- },
- {
- "variable": "step_836_result_1",
- "variable_path": "status"
- }
- ]
- }
- }
- ],
- "response_type": "text",
- "selection_policy": "sequential"
+ "value": {
+ "variable": "step_526_result_1",
+ "variable_path": "body.data"
+ },
+ "skill_variable": "content_value"
+ },
+ {
+ "value": {
+ "variable": "step_526_result_1",
+ "variable_path": "body.data"
+ },
+ "skill_variable": "content_value_copy"
}
]
},
- "context": {
- "variables": []
- },
"handlers": [],
"resolver": {
"type": "continue"
},
- "variable": "step_341",
- "condition": {
- "expression": "${step_836_result_1.status}<400"
- },
- "next_step": "step_902"
+ "variable": "step_371",
+ "next_step": "step_105"
},
{
- "step": "step_902",
+ "step": "step_105",
"output": {
"generic": [
{
@@ -3516,18 +3595,7 @@
"text_expression": {
"concat": [
{
- "scalar": "The call had an error - status is: "
- },
- {
- "variable": "step_836_result_1",
- "variable_path": "status"
- },
- {
- "scalar": " The full error is: "
- },
- {
- "variable": "step_836_result_1",
- "variable_path": "body.message"
+ "scalar": "You should not see this message. You should see a 400 error here instead."
}
]
}
@@ -3542,89 +3610,66 @@
"resolver": {
"type": "continue"
},
- "variable": "step_902",
- "condition": {
- "expression": "${step_836_result_1.status}>399"
- }
+ "variable": "step_105"
}
],
- "title": "Test calling extension with different authentication methods",
- "action": "action_22832",
+ "title": "Test handle an almost too large response for context storage",
+ "action": "action_12249",
"boosts": [],
"handlers": [],
"condition": {
- "intent": "action_22832_intent_9949"
+ "intent": "action_12249_intent_48727"
},
"variables": [
{
- "title": "aggregated variable",
- "variable": "operation_result",
- "data_type": "any"
- },
- {
- "title": "aggregated variable",
- "variable": "operation_result_status",
- "data_type": "any"
- },
- {
- "variable": "step_149_result_1",
- "data_type": "any"
- },
- {
- "title": "Please make sure you've configured the authentication method whe",
- "variable": "step_251",
- "data_type": "any"
- },
- {
- "title": "the result of your call is: {variable} status code: {variable}",
- "variable": "step_341",
- "data_type": "any"
- },
- {
- "variable": "step_491_result_1",
- "data_type": "any"
- },
- {
- "variable": "step_538_result_1",
- "data_type": "any"
- },
- {
- "variable": "step_628_result_1",
+ "title": "You should not see this message. You should see a 400 error here",
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_105",
"data_type": "any"
},
{
- "variable": "step_658_result_1",
+ "title": "",
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_371",
"data_type": "any"
},
{
- "variable": "step_739_result_1",
+ "title": "I'm about to call an extension which will return context that is",
+ "privacy": {
+ "enabled": false
+ },
+ "variable": "step_526",
"data_type": "any"
},
{
- "title": "you have selected {variable}, calling it",
"privacy": {
"enabled": false
},
- "variable": "step_836",
+ "variable": "step_526_result_1",
"data_type": "any"
},
{
+ "title": "Extension call success: {variable}",
"privacy": {
"enabled": false
},
- "variable": "step_836_result_1",
+ "variable": "step_677",
"data_type": "any"
},
{
- "title": "The call had an error - status is: {variable} The full error is:",
+ "title": "Please provide some response to trigger the 400 Session state ex",
"privacy": {
"enabled": false
},
- "variable": "step_902",
+ "variable": "step_949",
"data_type": "any"
}
],
- "next_action": "action_26118",
+ "next_action": "action_11679",
"topic_switch": {
"allowed_from": true,
"allowed_into": true
@@ -3634,263 +3679,277 @@
],
"intents": [
{
- "intent": "action_40637_intent_11889",
+ "intent": "action_30398_intent_13880",
"examples": [
{
- "text": "Test pre-message webhook"
+ "text": "test non json response"
+ }
+ ]
+ },
+ {
+ "intent": "action_22557_intent_12065",
+ "examples": [
+ {
+ "text": "authorization context var"
},
{
- "text": "pre-message webhook"
+ "text": "authorization header"
},
{
- "text": "pre-webhook"
+ "text": "authorization context variable"
},
{
- "text": "pre-message"
+ "text": "auth header"
+ },
+ {
+ "text": "Test set auth header with context variable"
}
]
},
{
- "intent": "action_11679_intent_29725",
+ "intent": "action_22832_intent_9949",
"examples": [
{
- "text": "Large Context"
+ "text": "oauth"
+ },
+ {
+ "text": "authentication"
+ },
+ {
+ "text": "bearer auth"
},
{
- "text": "ContextTooLarge"
+ "text": "basic auth"
+ },
+ {
+ "text": "api key auth"
},
{
- "text": "Context Too Large"
+ "text": "security"
}
]
},
{
- "intent": "action_34745_intent_10885",
+ "intent": "action_22451_intent_31436",
"examples": [
{
- "text": "stream events"
- },
- {
- "text": "Test Server-Sent Events (SSE)"
+ "text": "Test a long response in Server-Sent Events (SSE)"
}
]
},
{
- "intent": "action_5330_intent_20647",
+ "intent": "action_39186_intent_23416",
"examples": [
{
- "text": "Test handling an error response in Server-Sent Events (SSE)"
+ "text": "consecutive"
+ },
+ {
+ "text": "multiple calls"
+ },
+ {
+ "text": "consecutive calls"
+ },
+ {
+ "text": "Test consecutive extension calls"
}
]
},
{
- "intent": "action_22832_intent_9949",
+ "intent": "fallback_connect_to_agent",
"examples": [
{
- "text": "authentication"
- },
- {
- "text": "bearer auth"
+ "text": "I would like to speak to a human"
},
{
- "text": "oauth"
+ "text": "I would like to speak to someone"
},
{
- "text": "security"
+ "text": "Call agent"
},
{
- "text": "api key auth"
+ "text": "Agent help"
},
{
- "text": "basic auth"
+ "text": "Can I connect to an agent?"
}
- ]
+ ],
+ "description": "Please transfer me to an agent"
},
{
- "intent": "action_3462_intent_18095",
+ "intent": "action_38662_intent_45880",
"examples": [
{
- "text": "Test post-message webhook"
+ "text": "params"
+ },
+ {
+ "text": "Test post with parameters"
+ },
+ {
+ "text": "post with parameters"
},
{
- "text": "post-message"
+ "text": "parameters"
+ }
+ ]
+ },
+ {
+ "intent": "action_21392_intent_30689",
+ "examples": [
+ {
+ "text": "Test parse array inside object"
},
{
- "text": "post-message webhook"
+ "text": "Array inside object"
},
{
- "text": "post-webhook"
+ "text": "Arrays Object"
}
]
},
{
- "intent": "action_1543_intent_5385-2",
+ "intent": "action_1543_intent_5385",
"examples": [
{
- "text": "go patch it"
+ "text": "just delete it"
},
{
- "text": "PATCH"
+ "text": "can u delete"
},
{
- "text": "patch it"
+ "text": "how about deleting it"
},
{
- "text": "http patch"
+ "text": "DELETE"
+ },
+ {
+ "text": "pld delete"
}
]
},
{
- "intent": "action_45207_intent_43212",
+ "intent": "action_40637_intent_11889",
"examples": [
{
- "text": "long time"
- },
- {
- "text": "delay the request for at least 30 seconds"
- },
- {
- "text": "delay request"
+ "text": "Test pre-message webhook"
},
{
- "text": "delay"
+ "text": "pre-message webhook"
},
{
- "text": "more more time"
+ "text": "pre-webhook"
},
{
- "text": "pls long request"
+ "text": "pre-message"
}
]
},
{
- "intent": "action_22451_intent_31436",
+ "intent": "action_5330_intent_20647",
"examples": [
{
- "text": "Test a long response in Server-Sent Events (SSE)"
+ "text": "Test handling an error response in Server-Sent Events (SSE)"
}
]
},
{
- "intent": "action_21392_intent_30689",
+ "intent": "action_3462_intent_18095",
"examples": [
{
- "text": "Array inside object"
+ "text": "post-webhook"
},
{
- "text": "Arrays Object"
+ "text": "Test post-message webhook"
},
{
- "text": "Test parse array inside object"
+ "text": "post-message"
+ },
+ {
+ "text": "post-message webhook"
}
]
},
{
- "intent": "action_34746_intent_20809",
+ "intent": "action_12249_intent_48727",
"examples": [
{
- "text": "GET IT"
- },
- {
- "text": "get operation"
- },
- {
- "text": "just get it"
- },
- {
- "text": "he got it"
+ "text": "Almost Too Large Context"
},
{
- "text": "GO Get it"
+ "text": "ContextAlmostTooLarge"
},
{
- "text": "GET"
+ "text": "Context Almost Too Large"
}
]
},
{
- "intent": "fallback_connect_to_agent",
+ "intent": "action_34745_intent_10885",
"examples": [
{
- "text": "Agent help"
- },
- {
- "text": "Call agent"
- },
- {
- "text": "I would like to speak to someone"
- },
- {
- "text": "Can I connect to an agent?"
+ "text": "Test Server-Sent Events (SSE)"
},
{
- "text": "I would like to speak to a human"
+ "text": "stream events"
}
- ],
- "description": "Please transfer me to an agent"
+ ]
},
{
- "intent": "action_38662_intent_45880",
+ "intent": "action_34746_intent_20809",
"examples": [
{
- "text": "params"
+ "text": "GET IT"
},
{
- "text": "Test post with parameters"
+ "text": "get operation"
},
{
- "text": "post with parameters"
+ "text": "GET"
},
{
- "text": "parameters"
- }
- ]
- },
- {
- "intent": "action_30398_intent_13880",
- "examples": [
+ "text": "GO Get it"
+ },
{
- "text": "test non json response"
+ "text": "he got it"
+ },
+ {
+ "text": "just get it"
}
]
},
{
- "intent": "action_1543_intent_5385",
+ "intent": "action_11679_intent_29725",
"examples": [
{
- "text": "can u delete"
- },
- {
- "text": "pld delete"
- },
- {
- "text": "just delete it"
+ "text": "Response Too Large"
},
{
- "text": "how about deleting it"
+ "text": "Large Response"
},
{
- "text": "DELETE"
+ "text": "ResponsetTooLarge"
}
]
},
{
- "intent": "action_20585_intent_24221",
+ "intent": "action_45207_intent_43212",
"examples": [
{
- "text": "POST"
+ "text": "more more time"
},
{
- "text": "poster it"
+ "text": "delay"
},
{
- "text": "nail it"
+ "text": "delay request"
},
{
- "text": "just post it"
+ "text": "delay the request for at least 30 seconds"
},
{
- "text": "I want to post"
+ "text": "long time"
+ },
+ {
+ "text": "pls long request"
}
]
},
@@ -3915,87 +3974,80 @@
]
},
{
- "intent": "action_39186_intent_23416",
+ "intent": "action_20585_intent_24221",
"examples": [
{
- "text": "multiple calls"
+ "text": "just post it"
},
{
- "text": "Test consecutive extension calls"
+ "text": "I want to post"
},
{
- "text": "consecutive"
+ "text": "POST"
},
{
- "text": "consecutive calls"
+ "text": "poster it"
+ },
+ {
+ "text": "nail it"
}
]
},
{
- "intent": "action_12249_intent_48727",
+ "intent": "action_26118_intent_41514",
"examples": [
{
- "text": "Almost Too Large Context"
+ "text": "Just show me how u handle error"
},
{
- "text": "Context Almost Too Large"
+ "text": "Exception"
},
{
- "text": "ContextAlmostTooLarge"
- }
- ]
- },
- {
- "intent": "action_22557_intent_12065",
- "examples": [
- {
- "text": "authorization context var"
+ "text": "handle error"
},
{
- "text": "authorization header"
+ "text": "integration sent back an error"
},
{
- "text": "Test set auth header with context variable"
+ "text": "Wrong"
},
{
- "text": "auth header"
+ "text": "Problem in calling integration"
},
{
- "text": "authorization context variable"
+ "text": "Error"
}
]
},
{
- "intent": "action_26118_intent_41514",
+ "intent": "action_1543_intent_5385-2",
"examples": [
{
- "text": "Exception"
- },
- {
- "text": "handle error"
- },
- {
- "text": "Just show me how u handle error"
- },
- {
- "text": "integration sent back an error"
+ "text": "http patch"
},
{
- "text": "Wrong"
+ "text": "patch it"
},
{
- "text": "Problem in calling integration"
+ "text": "PATCH"
},
{
- "text": "Error"
+ "text": "go patch it"
}
]
}
],
"entities": [
{
- "entity": "sys-yes-no",
- "values": []
+ "entity": "entity_48614",
+ "values": [
+ {
+ "type": "synonyms",
+ "value": "Yes",
+ "synonyms": []
+ }
+ ],
+ "fuzzy_match": true
},
{
"entity": "entity_6835",
@@ -4039,11 +4091,7 @@
"fuzzy_match": true
},
{
- "entity": "sys-number",
- "values": []
- },
- {
- "entity": "entity_48614",
+ "entity": "entity_48298",
"values": [
{
"type": "synonyms",
@@ -4054,15 +4102,12 @@
"fuzzy_match": true
},
{
- "entity": "entity_48298",
- "values": [
- {
- "type": "synonyms",
- "value": "Yes",
- "synonyms": []
- }
- ],
- "fuzzy_match": true
+ "entity": "sys-number",
+ "values": []
+ },
+ {
+ "entity": "sys-yes-no",
+ "values": []
}
],
"metadata": {
@@ -4141,10 +4186,10 @@
"collection": "collection_45987",
"action_references": [
{
- "action": "action_40637"
+ "action": "action_3462"
},
{
- "action": "action_3462"
+ "action": "action_40637"
}
]
},
@@ -4152,6 +4197,9 @@
"title": "HTTP Methods",
"collection": "collection_48238",
"action_references": [
+ {
+ "action": "action_30035"
+ },
{
"action": "action_1543-2"
},
@@ -4163,9 +4211,6 @@
},
{
"action": "action_34746"
- },
- {
- "action": "action_30035"
}
]
},
@@ -4174,40 +4219,40 @@
"collection": "collection_41346",
"action_references": [
{
- "action": "action_22557"
- },
- {
- "action": "action_11679"
+ "action": "action_5330"
},
{
- "action": "action_5330"
+ "action": "action_39186"
},
{
- "action": "action_21392"
+ "action": "action_22451"
},
{
- "action": "action_45207"
+ "action": "action_30398"
},
{
- "action": "action_39186"
+ "action": "action_12249"
},
{
- "action": "action_34745"
+ "action": "action_45207"
},
{
- "action": "action_22451"
+ "action": "action_11679"
},
{
- "action": "action_12249"
+ "action": "action_34745"
},
{
"action": "action_26118"
},
{
- "action": "action_30398"
+ "action": "action_22557"
},
{
"action": "action_38662"
+ },
+ {
+ "action": "action_21392"
}
]
}
@@ -4313,16 +4358,16 @@
},
"description": "created for assistant 4d72bd70-1094-4cf5-87a6-0f429367d834",
"dialog_settings": {
- "source_assistant": "ae3731b5-5391-4f72-ab41-9cb9a7fe21fa"
+ "source_assistant": "392d3cd7-1ee1-4e74-9bf4-37684f2b75e3"
},
- "created": "2024-11-05T02:11:47.237Z",
- "updated": "2024-11-05T02:11:47.237Z",
- "snapshot": "2",
- "assistant_id": "276e25eb-a952-4095-b742-061c0c769b45",
+ "created": "2024-12-24T23:26:31.297Z",
+ "updated": "2024-12-24T23:26:31.297Z",
+ "snapshot": "4",
+ "assistant_id": "35023fcf-24d1-4e9a-a0a2-52cb83c09cf9",
"assistant_references": [
{
- "name": "Testitall",
- "assistant_id": "ae3731b5-5391-4f72-ab41-9cb9a7fe21fa",
+ "name": "Testitall 014",
+ "assistant_id": "392d3cd7-1ee1-4e74-9bf4-37684f2b75e3",
"skill_reference": "actions skill"
}
]
diff --git a/integrations/extensions/starter-kits/testitall/testitall.openapi.json b/integrations/extensions/starter-kits/testitall/testitall.openapi.json
index 7339b010..efe2000a 100644
--- a/integrations/extensions/starter-kits/testitall/testitall.openapi.json
+++ b/integrations/extensions/starter-kits/testitall/testitall.openapi.json
@@ -628,12 +628,12 @@
}
}
},
- "/test/context-too-large": {
+ "/test/response-too-large": {
"post": {
"tags": [
"API"
],
- "summary": "Test handle a too large response",
+ "summary": "Test handle a too large response from extension",
"description": "Return a context that is too large to test WA's error handling",
"operationId": "testContextTooLarge",
"responses": {
@@ -663,7 +663,7 @@
"tags": [
"API"
],
- "summary": "Test handle an almost too large response",
+ "summary": "Test handle an almost too large response for context storage",
"description": "Return a context that is almost too large to test WA's error handling",
"operationId": "testContextAlmostTooLarge",
"responses": {