-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCognitive.Services.Demo.json
10 lines (10 loc) · 22.6 KB
/
Cognitive.Services.Demo.json
1
2
3
4
5
6
7
8
9
10
{
"name": "Cognitive.Services.Demo",
"id": "4d2726d5-223e-4496-b132-27a8c527d95e",
"scenario_trigger": "csdemo",
"description": "Calls Cognitive Services APIs and displays output",
"active": true,
"updated": "2022-04-25T19:47:12.891Z",
"userDisplayName": "Prakash Patel",
"code": "{\"version\":3,\"steps\":[{\"id\":\"a4e335790c46-3472f5bab02eb207-ad39\",\"type\":\"prompt\",\"dataType\":\"[\\r\\n \\\"Entity Recognition\\\", \\r\\n \\\"Entity Linking\\\", \\r\\n \\\"Recognize PII\\\", \\r\\n \\\"Key Phrase Extraction\\\", \\r\\n \\\"Sentiment Analysis\\\", \\r\\n \\\"Langugage Detection\\\", \\r\\n \\\"Answer Questions (Static)\\\", \\r\\n \\\"Answer Questions (Dynamic)\\\", \\r\\n \\\"Cancel\\\"\\r\\n]\",\"designer\":{\"xLocation\":528,\"yLocation\":11,\"listStyle\":3,\"next\":\"22386c14644f-5fe7007f77660cca-0285\"},\"text\":\"Please select the Azure Cognitive Service API you would like to call\",\"variable\":\"optCS\",\"submitTitle\":\"Submit\",\"maxRetries\":1,\"layout\":\"vertical\",\"stringId\":\"stringId_185deec06150e30a\",\"choiceType\":\"multi-choice\"},{\"id\":\"22386c14644f-5fe7007f77660cca-0285\",\"type\":\"switch\",\"designer\":{\"xLocation\":508,\"yLocation\":120,\"next\":\"f05ec1323181-134fcdf0457a4f76-08bb\"},\"cases\":[{\"value\":\"0\",\"targetStepId\":\"371be80d6622-8e24a302e9e3ca86-e5af\"},{\"value\":\"1\",\"targetStepId\":\"ba13507b6094-9318aa9168d914eb-27d5\"},{\"value\":\"2\",\"targetStepId\":\"36f3738eab4c-cd9a106c441b9db0-6922\"},{\"value\":\"3\",\"targetStepId\":\"366459c084de-6ca4fa1cd0a0569a-cf0b\"},{\"value\":\"4\",\"targetStepId\":\"d9ec3ca9ad83-d4717cce02b7be53-2312\"},{\"value\":\"5\",\"targetStepId\":\"203672b4d870-894158fe737d09bb-7836\"},{\"value\":\"6\",\"targetStepId\":\"b161dccb7a6f-e50ba07fc14a5dac-96f1\"},{\"value\":\"7\",\"targetStepId\":\"4205c55bd839-8a56860ec3eed695-c472\"},{\"value\":\"8\",\"targetStepId\":\"94cfacc62950-55ba20d0ce752abc-e62f\"}],\"condition\":\"'' + ${optCS[0].index}\",\"label\":\"Cognitive Services\"},{\"id\":\"371be80d6622-8e24a302e9e3ca86-e5af\",\"type\":\"statement\",\"designer\":{\"xLocation\":112,\"yLocation\":354,\"next\":\"deec0b663377-c4e8f8073e533d41-bd7e\"},\"text\":\"`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Entity Recognition\"},{\"id\":\"deec0b663377-c4e8f8073e533d41-bd7e\",\"type\":\"datasource\",\"designer\":{\"xLocation\":112,\"yLocation\":434,\"next\":\"a5aad3e25c55-ac85ed5cce951b19-a3ba\"},\"dataConnection\":\"TextAnalyticsDataConnection\",\"urlBase\":\"https://azure_language_service_textanalytics_resource_name.cognitiveservices.azure.com/\",\"urlPath\":\"'text/analytics/v3.0/entities/recognition/general'\",\"urlParams\":\"\",\"contentType\":\"raw\",\"method\":\"post\",\"headers\":\"\",\"payload\":\"{\\r\\n \\\"documents\\\": [\\r\\n {\\r\\n \\\"id\\\": \\\"1\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"Microsoft was founded by Bill Gates and Paul Allen.\\\"\\r\\n },\\r\\n {\\r\\n \\\"id\\\": \\\"2\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"Pike place market is my favorite Seattle attraction.\\\"\\r\\n }\\r\\n ]\\r\\n}\\r\\n\",\"opJson\":true,\"opResolveWithFullResponse\":false,\"response\":\"responseEntityRecog\",\"label\":\"Entity Recognition\"},{\"id\":\"a5aad3e25c55-ac85ed5cce951b19-a3ba\",\"type\":\"statement\",\"designer\":{\"xLocation\":112,\"yLocation\":514,\"next\":\"52459aeaaff2-e392640561ce90d7-5a0f\"},\"text\":\"`${JSON.stringify(scenario.responseEntityRecog)}\\\\n\\\\n${scenario.responseEntityRecog.documents[0].entities[0].text}\\\\n${scenario.responseEntityRecog.documents[0].entities[1].text}\\\\n${scenario.responseEntityRecog.documents[0].entities[2].text}\\\\n`\",\"stringId\":\"stringId_ec1c3185a5479de3\",\"label\":\"Entity Recognition\"},{\"id\":\"52459aeaaff2-e392640561ce90d7-5a0f\",\"type\":\"statement\",\"designer\":{\"xLocation\":112,\"yLocation\":594},\"text\":\"`Entity returned: **${scenario.responseEntityRecog.documents[0].entities[0].text}** in category *${scenario.responseEntityRecog.documents[0].entities[0].category}* with score **${scenario.responseEntityRecog.documents[0].entities[0].confidenceScore.toString()}**`\",\"stringId\":\"stringId_19d53b4bfc79b1a6\",\"label\":\"Entity Recognition\"},{\"id\":\"ba13507b6094-9318aa9168d914eb-27d5\",\"type\":\"statement\",\"designer\":{\"xLocation\":200,\"yLocation\":354,\"next\":\"9d79c84c3d8e-36b2d634a9773b6d-64f1\"},\"text\":\"`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Entity Linking\"},{\"id\":\"9d79c84c3d8e-36b2d634a9773b6d-64f1\",\"type\":\"datasource\",\"designer\":{\"xLocation\":200,\"yLocation\":434,\"next\":\"dc9c7c2a93df-1bf55195c5a516d7-19ec\"},\"dataConnection\":\"TextAnalyticsDataConnection\",\"urlBase\":\"https://azure_language_service_textanalytics_resource_name.cognitiveservices.azure.com/\",\"urlPath\":\"'text/analytics/v3.1/entities/entities/linking'\",\"urlParams\":\"\",\"contentType\":\"raw\",\"method\":\"post\",\"headers\":\"\",\"payload\":\"{\\r\\n \\\"documents\\\": [\\r\\n {\\r\\n \\\"id\\\": \\\"1\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"Microsoft was founded by Bill Gates and Paul Allen on April 4, 1975 to develop and sell BASIC interpreters for the Altair 8800. During his career at Microsoft, Gates held the positions of chairman chief executive officer, president and chief software architect while also being the largest individual shareholder until May 2014.\\\"\\r\\n },\\r\\n {\\r\\n \\\"id\\\": \\\"2\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"Pike place market is my favorite Seattle attraction.\\\"\\r\\n }\\r\\n ]\\r\\n}\\r\\n\",\"opJson\":true,\"opResolveWithFullResponse\":false,\"response\":\"responseEntityRecog\",\"label\":\"Entity Linking\"},{\"id\":\"dc9c7c2a93df-1bf55195c5a516d7-19ec\",\"type\":\"statement\",\"designer\":{\"xLocation\":200,\"yLocation\":514,\"next\":\"e64b39336106-1fc78ab5d377e362-590b\"},\"text\":\"`${JSON.stringify(scenario.responseEntityRecog)}\\\\n\\\\n${scenario.responseEntityRecog.documents[0].entities[0].text}\\\\n${scenario.responseEntityRecog.documents[0].entities[1].text}\\\\n${scenario.responseEntityRecog.documents[0].entities[2].text}\\\\n`\",\"stringId\":\"stringId_ec1c3185a5479de3\",\"label\":\"Entity Linking\"},{\"id\":\"e64b39336106-1fc78ab5d377e362-590b\",\"type\":\"statement\",\"designer\":{\"xLocation\":200,\"yLocation\":594},\"text\":\"`Entity returned: **${scenario.responseEntityRecog.documents[0].entities[0].text}** in category *${scenario.responseEntityRecog.documents[0].entities[0].category}* with score **${scenario.responseEntityRecog.documents[0].entities[0].confidenceScore.toString()}**`\",\"stringId\":\"stringId_19d53b4bfc79b1a6\",\"label\":\"Entity Linking\"},{\"id\":\"36f3738eab4c-cd9a106c441b9db0-6922\",\"type\":\"statement\",\"designer\":{\"xLocation\":291,\"yLocation\":354,\"next\":\"e64b39336106-1fc78ab5d377e362-0001\"},\"text\":\"`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Recognize PII\"},{\"id\":\"e64b39336106-1fc78ab5d377e362-0001\",\"type\":\"datasource\",\"designer\":{\"xLocation\":291,\"yLocation\":433,\"next\":\"e64b39336106-1fc78ab5d377e362-0002\"},\"dataConnection\":\"TextAnalyticsDataConnection\",\"urlBase\":\"https://azure_language_service_textanalytics_resource_name.cognitiveservices.azure.com/\",\"urlPath\":\"'text/analytics/v3.1/entities/recognition/pii'\",\"urlParams\":\"\",\"contentType\":\"raw\",\"method\":\"post\",\"headers\":\"\",\"payload\":\"{\\r\\n \\\"documents\\\": [\\r\\n {\\r\\n \\\"id\\\": \\\"1\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"A developer with SSN 859-98-0987 whose phone number is 800-102-1100 is building tools with our APIs.\\\"\\r\\n },\\r\\n {\\r\\n \\\"id\\\": \\\"2\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"Pike place market is my favorite Seattle attraction.\\\"\\r\\n }\\r\\n ]\\r\\n}\\r\\n\",\"opJson\":true,\"opResolveWithFullResponse\":false,\"response\":\"responseEntityRecog\",\"label\":\"Recognize PII\"},{\"id\":\"e64b39336106-1fc78ab5d377e362-0002\",\"type\":\"statement\",\"designer\":{\"xLocation\":291,\"yLocation\":514,\"next\":\"e64b39336106-1fc78ab5d377e362-0003\"},\"text\":\"`${JSON.stringify(scenario.responseEntityRecog)}\\\\n\\\\n${scenario.responseEntityRecog.documents[0].entities[0].text}\\\\n${scenario.responseEntityRecog.documents[0].entities[1].text}\\\\n${scenario.responseEntityRecog.documents[0].entities[2].text}\\\\n`\",\"stringId\":\"stringId_7a5ae5d773e77b71\",\"label\":\"Recognize PII\"},{\"id\":\"e64b39336106-1fc78ab5d377e362-0003\",\"type\":\"statement\",\"designer\":{\"xLocation\":291,\"yLocation\":593},\"text\":\"`Entity returned: **${scenario.responseEntityRecog.documents[0].entities[1].text}** in category *${scenario.responseEntityRecog.documents[0].entities[1].category}* with score **${scenario.responseEntityRecog.documents[0].entities[1].confidenceScore.toString()}**`\",\"stringId\":\"stringId_19d53b4bfc79b1a2\",\"label\":\"Recognize PII\"},{\"id\":\"366459c084de-6ca4fa1cd0a0569a-cf0b\",\"type\":\"statement\",\"designer\":{\"xLocation\":380,\"yLocation\":354,\"next\":\"710453515cd6-775b70220d863735-cca1\"},\"text\":\"`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Key Phrase Extraction\"},{\"id\":\"d9ec3ca9ad83-d4717cce02b7be53-2312\",\"type\":\"statement\",\"designer\":{\"xLocation\":472,\"yLocation\":354,\"next\":\"3da4e6e5da4b-96a6448268899db3-e5b1\"},\"text\":\"`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Sentiment Analysis\"},{\"id\":\"203672b4d870-894158fe737d09bb-7836\",\"type\":\"statement\",\"designer\":{\"xLocation\":560,\"yLocation\":354,\"next\":\"46cab76e7bb7-d0b49241c75e2189-aec9\"},\"text\":\"`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Language Detection\"},{\"id\":\"b161dccb7a6f-e50ba07fc14a5dac-96f1\",\"type\":\"statement\",\"designer\":{\"xLocation\":648,\"yLocation\":354,\"next\":\"7e8493c1eedc-d674863e4f88ee19-f8eb\"},\"text\":\"`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Answer Questions (Static)\"},{\"id\":\"7e8493c1eedc-d674863e4f88ee19-f8eb\",\"type\":\"datasource\",\"designer\":{\"xLocation\":649,\"yLocation\":431,\"next\":\"dfc2793765cf-712cf0b81515f9bc-6a13\"},\"dataConnection\":\"AnswerQuestionsConnection\",\"urlBase\":\"https://westus.api.cognitive.microsoft.com/\",\"urlPath\":\"'language/:query-knowledgebases?projectName=languagestudio-project&api-version=2021-10-01&deploymentName=production'\",\"urlParams\":\"\",\"method\":\"post\",\"headers\":\"\",\"opJson\":true,\"opResolveWithFullResponse\":true,\"response\":\"apiResponse\",\"contentType\":\"raw\",\"payload\":\"{\\r\\n \\\"question\\\": \\\"Can I search across multiple indexers?\\\",\\r\\n \\\"top\\\": 3,\\r\\n \\\"confidenceScoreThreshold\\\": 0.2,\\r\\n \\\"context\\\": {\\r\\n \\\"previousQnaId\\\": 9,\\r\\n \\\"previousUserQuery\\\": \\\"Can I search across multiple indexers\\\"\\r\\n },\\r\\n \\\"rankerType\\\": \\\"Default\\\",\\r\\n \\\"answerSpanRequest\\\": {\\r\\n \\\"enable\\\": true,\\r\\n \\\"confidenceScoreThreshold\\\": 0.2,\\r\\n \\\"topAnswersWithSpan\\\": 1\\r\\n },\\r\\n \\\"includeUnstructuredSources\\\": true\\r\\n}\",\"label\":\"Answer Questions (Static)\"},{\"id\":\"dfc2793765cf-712cf0b81515f9bc-6a13\",\"type\":\"statement\",\"designer\":{\"xLocation\":649,\"yLocation\":513,\"next\":\"858b56facafa-3f6b4f5914df95b4-9720\"},\"text\":\"JSON.stringify(scenario.apiResponse)\",\"stringId\":\"stringId_ec1c3185a5479de3\",\"label\":\"Answer Questions (Static)\"},{\"id\":\"858b56facafa-3f6b4f5914df95b4-9720\",\"type\":\"statement\",\"designer\":{\"xLocation\":650,\"yLocation\":593},\"text\":\"`Answer Returned [**${(100 * scenario.apiResponse.body.answers[0].confidenceScore).toString() + \\\"%\\\"}**]: ${scenario.apiResponse.body.answers[0].answer}`\",\"stringId\":\"stringId_d3ee90f4e5c4f3f1\",\"label\":\"Answer Questions (Static)\"},{\"id\":\"4205c55bd839-8a56860ec3eed695-c472\",\"type\":\"statement\",\"designer\":{\"xLocation\":740,\"yLocation\":353,\"next\":\"baea512825e4-9d9ff0ccf14e2594-e95c\"},\"text\":\"`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Answer Questions (Dynamic)\"},{\"id\":\"94cfacc62950-55ba20d0ce752abc-e62f\",\"type\":\"statement\",\"designer\":{\"xLocation\":900,\"yLocation\":353},\"text\":\"`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Cancel\"},{\"id\":\"f05ec1323181-134fcdf0457a4f76-08bb\",\"type\":\"statement\",\"designer\":{\"xLocation\":1040,\"yLocation\":353},\"text\":\"session.trace(scenario.optCS, 0);\\r\\nsession.trace(`Default Switch Case: ${scenario.optCS.index}`, 1);\\r\\nJSON.stringify(scenario.optCS);\\r\\n`Option #${scenario.optCS[0].index}: ${scenario.optCS[0].value} [Score: **${scenario.optCS[0].score}**] was selected.`;\",\"stringId\":\"stringId_7a5ae5d773e77b72\",\"label\":\"Default!\"},{\"id\":\"710453515cd6-775b70220d863735-cca1\",\"type\":\"datasource\",\"designer\":{\"xLocation\":380,\"yLocation\":433,\"next\":\"0e803371b7d6-50989ed299596b41-0ff7\"},\"dataConnection\":\"TextAnalyticsDataConnection\",\"urlBase\":\"https://azure_language_service_textanalytics_resource_name.cognitiveservices.azure.com/\",\"urlPath\":\"'text/analytics/v3.1/keyPhrases'\",\"urlParams\":\"\",\"contentType\":\"raw\",\"method\":\"post\",\"headers\":\"\",\"payload\":\"{\\r\\n \\\"documents\\\": [\\r\\n {\\r\\n \\\"id\\\": \\\"1\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"Microsoft was founded by Bill Gates and Paul Allen.\\\"\\r\\n },\\r\\n {\\r\\n \\\"id\\\": \\\"2\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"Text Analytics is one of the Azure Cognitive Services.\\\"\\r\\n },\\r\\n {\\r\\n \\\"id\\\": \\\"3\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"My cat might need to see a veterinarian.\\\"\\r\\n }\\r\\n ]\\r\\n}\",\"opJson\":true,\"opResolveWithFullResponse\":false,\"response\":\"responseEntityRecog\",\"label\":\"Key Phrase Extraction\"},{\"id\":\"0e803371b7d6-50989ed299596b41-0ff7\",\"type\":\"statement\",\"designer\":{\"xLocation\":380,\"yLocation\":514,\"next\":\"09d6d63579e1-0ae2bf0d0df84ff5-ba72\"},\"text\":\"`${JSON.stringify(scenario.responseEntityRecog)}\\\\n\\\\n${scenario.responseEntityRecog.documents[0].keyPhrases[0]}\\\\n ${scenario.responseEntityRecog.documents[0].keyPhrases[1]}\\\\n ${scenario.responseEntityRecog.documents[0].keyPhrases[2]}\\\\n`\",\"stringId\":\"stringId_7a5ae5d773e77b71\",\"label\":\"Key Phrase Extraction\"},{\"id\":\"09d6d63579e1-0ae2bf0d0df84ff5-ba72\",\"type\":\"statement\",\"designer\":{\"xLocation\":380,\"yLocation\":593},\"text\":\"`Entity returned with KeyPhrases: **${scenario.responseEntityRecog.documents[0].keyPhrases[0]}**, **${scenario.responseEntityRecog.documents[0].keyPhrases[1]}** and **${scenario.responseEntityRecog.documents[0].keyPhrases[2]}**`\",\"stringId\":\"stringId_19d53b4bfc79b1a2\",\"label\":\"Key Phrase Extraction\"},{\"id\":\"3da4e6e5da4b-96a6448268899db3-e5b1\",\"type\":\"datasource\",\"designer\":{\"xLocation\":472,\"yLocation\":433,\"next\":\"716b370546c9-809413364e3da42e-f02d\"},\"dataConnection\":\"TextAnalyticsDataConnection\",\"urlBase\":\"https://azure_language_service_textanalytics_resource_name.cognitiveservices.azure.com/\",\"urlPath\":\"'text/analytics/v3.1/sentiment'\",\"urlParams\":\"\",\"contentType\":\"raw\",\"method\":\"post\",\"headers\":\"\",\"payload\":\"{\\r\\n \\\"documents\\\": [\\r\\n {\\r\\n \\\"id\\\": \\\"1\\\",\\r\\n \\\"language\\\": \\\"en\\\",\\r\\n \\\"text\\\": \\\"Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.\\\"\\r\\n }\\r\\n ]\\r\\n}\",\"opJson\":true,\"opResolveWithFullResponse\":false,\"response\":\"responseEntityRecog\",\"label\":\"Sentiment Analysis\"},{\"id\":\"716b370546c9-809413364e3da42e-f02d\",\"type\":\"statement\",\"designer\":{\"xLocation\":473,\"yLocation\":514,\"next\":\"008d38f3e11b-2fc8a24760f66de8-d724\"},\"text\":\"`${JSON.stringify(scenario.responseEntityRecog)}\\\\n\\\\n -ve: ${scenario.responseEntityRecog.documents[0].confidenceScores.negative}\\\\n +ve: ${scenario.responseEntityRecog.documents[0].confidenceScores.positive}\\\\n Neutral: ${scenario.responseEntityRecog.documents[0].confidenceScores.neutral}\\\\n`\",\"stringId\":\"stringId_7a5ae5d773e77b71\",\"label\":\"Sentiment Analysis\"},{\"id\":\"008d38f3e11b-2fc8a24760f66de8-d724\",\"type\":\"statement\",\"designer\":{\"xLocation\":473,\"yLocation\":593},\"text\":\"`Sentiment Analysis - **${scenario.responseEntityRecog.documents[0].sentences[0].text.trim()}** [**${scenario.responseEntityRecog.documents[0].sentences[0].sentiment}**]`\",\"stringId\":\"stringId_19d53b4bfc79b1a2\",\"label\":\"Sentiment Analysis\"},{\"id\":\"46cab76e7bb7-d0b49241c75e2189-aec9\",\"type\":\"datasource\",\"designer\":{\"xLocation\":560,\"yLocation\":431,\"next\":\"39f99b92e4ad-584e5345160d5abc-93ea\"},\"dataConnection\":\"TextAnalyticsDataConnection\",\"urlBase\":\"https://azure_language_service_textanalytics_resource_name.cognitiveservices.azure.com/\",\"urlPath\":\"'text/analytics/v3.1/languages'\",\"urlParams\":\"\",\"contentType\":\"raw\",\"method\":\"post\",\"headers\":\"\",\"payload\":\"{\\r\\n \\\"documents\\\": [\\r\\n {\\r\\n \\\"id\\\": \\\"1\\\",\\r\\n \\\"text\\\": \\\"Hello world\\\"\\r\\n },\\r\\n {\\r\\n \\\"id\\\": \\\"2\\\",\\r\\n \\\"text\\\": \\\"Bonjour tout le monde\\\"\\r\\n },\\r\\n {\\r\\n \\\"id\\\": \\\"3\\\",\\r\\n \\\"text\\\": \\\"Hola mundo\\\"\\r\\n }\\r\\n ]\\r\\n}\",\"opJson\":true,\"opResolveWithFullResponse\":false,\"response\":\"responseEntityRecog\",\"label\":\"Language Detection\"},{\"id\":\"39f99b92e4ad-584e5345160d5abc-93ea\",\"type\":\"statement\",\"designer\":{\"xLocation\":560,\"yLocation\":514,\"next\":\"ba2215f74c9b-baff8110f2323fe8-b0d7\"},\"text\":\"`${JSON.stringify(scenario.responseEntityRecog)}\\\\n\\\\n Languages Detected: ${scenario.responseEntityRecog.documents[0].detectedLanguage.name} [**${scenario.responseEntityRecog.documents[0].detectedLanguage.confidenceScore}**]\\\\n ${scenario.responseEntityRecog.documents[1].detectedLanguage.name} [**${scenario.responseEntityRecog.documents[1].detectedLanguage.confidenceScore}**]\\\\n ${scenario.responseEntityRecog.documents[2].detectedLanguage.name} [**${scenario.responseEntityRecog.documents[2].detectedLanguage.confidenceScore}**]\\\\n\\\\n`\",\"stringId\":\"stringId_7a5ae5d773e77b71\",\"label\":\"Language Detection\"},{\"id\":\"ba2215f74c9b-baff8110f2323fe8-b0d7\",\"type\":\"statement\",\"designer\":{\"xLocation\":560,\"yLocation\":594},\"text\":\"`Language Detection - Languages Detected: ${scenario.responseEntityRecog.documents[0].detectedLanguage.name} [**${scenario.responseEntityRecog.documents[0].detectedLanguage.confidenceScore}**]\\\\n ${scenario.responseEntityRecog.documents[1].detectedLanguage.name} [**${scenario.responseEntityRecog.documents[1].detectedLanguage.confidenceScore}**]\\\\n ${scenario.responseEntityRecog.documents[2].detectedLanguage.name} [**${scenario.responseEntityRecog.documents[2].detectedLanguage.confidenceScore}**]\\\\n\\\\n`\",\"stringId\":\"stringId_19d53b4bfc79b1a2\",\"label\":\"Language Detection\"},{\"id\":\"baea512825e4-9d9ff0ccf14e2594-e95c\",\"type\":\"prompt\",\"dataType\":\"string\",\"designer\":{\"xLocation\":740,\"yLocation\":408,\"next\":\"1d6bc69bcea0-9e13e6dfe2424516-6ef7\"},\"text\":\"Please type your question\",\"variable\":\"userQuestion\",\"submitTitle\":\"Submit\",\"suggestions\":\"\",\"stringId\":\"stringId_4fe58830b75a225d\",\"label\":\"Answer Questions (Dynamic)\"},{\"id\":\"f135fd0f3523-501d73d26974d9ec-0616\",\"type\":\"datasource\",\"designer\":{\"xLocation\":746,\"yLocation\":506,\"next\":\"c39c6b1b54ab-bb267b4d5b479898-2fc7\"},\"dataConnection\":\"AnswerQuestionsConnection\",\"urlBase\":\"https://westus.api.cognitive.microsoft.com/\",\"urlPath\":\"'language/:query-knowledgebases?projectName=languagestudio-project&api-version=2021-10-01&deploymentName=production'\",\"urlParams\":\"\",\"method\":\"post\",\"headers\":\"\",\"opJson\":true,\"opResolveWithFullResponse\":false,\"response\":\"apiResponse\",\"contentType\":\"raw\",\"payload\":\"scenario.reqBody\",\"label\":\"Answer Questions (Dynamic)\",\"error\":\"\"},{\"id\":\"c39c6b1b54ab-bb267b4d5b479898-2fc7\",\"type\":\"statement\",\"designer\":{\"xLocation\":740,\"yLocation\":560,\"next\":\"bf69a69a2002-9c906ad7808b8ba9-f551\"},\"text\":\"JSON.stringify(scenario.apiResponse)\",\"stringId\":\"stringId_ec1c3185a5479de3\",\"label\":\"Answer Questions (Dynamic)\"},{\"id\":\"bf69a69a2002-9c906ad7808b8ba9-f551\",\"type\":\"statement\",\"designer\":{\"xLocation\":740,\"yLocation\":628},\"text\":\"`Answer Returned [**${(100 * scenario.apiResponse.answers[0].confidenceScore).toString() + \\\"%\\\"}**]: ${scenario.apiResponse.answers[0].answer}`\",\"stringId\":\"stringId_d3ee90f4e5c4f3f1\",\"label\":\"Answer Questions (Dynamic)\"},{\"id\":\"1d6bc69bcea0-9e13e6dfe2424516-6ef7\",\"type\":\"assignVariable\",\"designer\":{\"xLocation\":740,\"yLocation\":460,\"next\":\"f135fd0f3523-501d73d26974d9ec-0616\"},\"scope\":\"scenario\",\"operation\":\"set\",\"variable\":\"reqBody\",\"value\":\"{\\r\\n \\\"question\\\": scenario.userQuestion,\\r\\n \\\"top\\\": 3,\\r\\n \\\"confidenceScoreThreshold\\\": 0.2,\\r\\n \\\"context\\\": {\\r\\n \\\"previousQnaId\\\": 9,\\r\\n \\\"previousUserQuery\\\": \\\"Can I search across multiple indexers\\\"\\r\\n },\\r\\n \\\"rankerType\\\": \\\"Default\\\",\\r\\n \\\"answerSpanRequest\\\": {\\r\\n \\\"enable\\\": true,\\r\\n \\\"confidenceScoreThreshold\\\": 0.2,\\r\\n \\\"topAnswersWithSpan\\\": 1\\r\\n },\\r\\n \\\"includeUnstructuredSources\\\": true\\r\\n}\",\"label\":\"Answer Questions (Dynamic)\"}],\"breaking\":false,\"interrupting\":false,\"returningMessage\":\"\\\"\\\"\"}"
}