From ddebb754718bab2d9c854d63c6a8ac1405067d72 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 09:59:03 -0400 Subject: [PATCH 01/25] Create readme.txt --- TypeaheadSuggestions/readme.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 TypeaheadSuggestions/readme.txt diff --git a/TypeaheadSuggestions/readme.txt b/TypeaheadSuggestions/readme.txt new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/TypeaheadSuggestions/readme.txt @@ -0,0 +1 @@ + From 2cdb7bb1699301aee051d215ba960f6ef98f0c61 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:01:23 -0400 Subject: [PATCH 02/25] Add files via upload --- .../TypeAheadSuggestions_V1.0.html | 281 ++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html diff --git a/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html b/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html new file mode 100644 index 00000000..8db042bd --- /dev/null +++ b/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html @@ -0,0 +1,281 @@ + + + + + + Copilot Studio Intelligent Suggestions Version 1.0 + + + + + +
💬
+ + +
+
+ + +
+
    +
    +
    + + + + + + + From 33dffb37c619cb1f3677d9ea47baf56058892440 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:02:26 -0400 Subject: [PATCH 03/25] Create README.md --- TypeaheadSuggestions/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 TypeaheadSuggestions/README.md diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/TypeaheadSuggestions/README.md @@ -0,0 +1 @@ + From e94df867e2925f8f2aec60bb6ca7e222c311d548 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:03:00 -0400 Subject: [PATCH 04/25] Delete TypeaheadSuggestions/readme.txt --- TypeaheadSuggestions/readme.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 TypeaheadSuggestions/readme.txt diff --git a/TypeaheadSuggestions/readme.txt b/TypeaheadSuggestions/readme.txt deleted file mode 100644 index 8b137891..00000000 --- a/TypeaheadSuggestions/readme.txt +++ /dev/null @@ -1 +0,0 @@ - From 6e21b0caac881fa9ee96add2db443817f6fb2492 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:36:59 -0400 Subject: [PATCH 05/25] Update README.md --- TypeaheadSuggestions/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index 8b137891..3f8c53da 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -1 +1,27 @@ +# Typeahed Suggestions for Copilot Studio +This code sample allows you to create a typeahead suggestion functionality for your custome copilot that can assist users finding things like frequently asked questions, auto correcting typos and showing a list of menu items like product names or topic names before sending a message to the copilot. + + +## Getting Started + +1. Create your custom copilot using copilot studio with required topics and actions. +2. Once you have published your copilot go to settings>security>Web Channel Security and copy your secret. +3. Download the TypeAheadSuggestion.HTML canvas to your local machine and open in any code editor. +4. On line 155 replace add the secret your copied for your copilot. Please note that for best practices you can use directline token instead of using secret in the canvas. +image +5. Next you need to add a RestAPI that returns an array of suggestions for your bot. You can use the +6. On line 193 Add your RestAPI endpoint that returns an array of suggested topics. + image +7. Optional : If you would like to exclude any suggestions based on your business logic you can create a exclusion list as shown below on line 173. + image +8. Click Save and open the file in the browser to test. You can launch the bot by clicking on the chat bubble and initiating the chat. +9. To see list of suggestions before typying click the space bar which opens a dropdow list of suggested topcis +10. For getting type ahead suggestions continue to type in the chat bot canvas and suggestions will be shown below the chat area. Clicking on any suggestion submits the utterance to the bot. + +# Watch below Demo to Get Started +https://www.youtube.com/watch?v=7xbSpzmQcIg + + + + From 269f215ad08384c17bcee19441b2e14f36588505 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:39:05 -0400 Subject: [PATCH 06/25] Update README.md --- TypeaheadSuggestions/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index 3f8c53da..fc1e0f87 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -20,6 +20,9 @@ This code sample allows you to create a typeahead suggestion functionality for y 10. For getting type ahead suggestions continue to type in the chat bot canvas and suggestions will be shown below the chat area. Clicking on any suggestion submits the utterance to the bot. # Watch below Demo to Get Started + +[![Watch the video](https://img.youtube.com/vi/VIDEO_ID/maxresdefault.jpg)](https://www.youtube.com/watch?v=7xbSpzmQcIg) + https://www.youtube.com/watch?v=7xbSpzmQcIg From 39712c6af3398d225c995c3ceab6614ba98d51d8 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:40:20 -0400 Subject: [PATCH 07/25] Update README.md --- TypeaheadSuggestions/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index fc1e0f87..ecec8c21 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -21,7 +21,8 @@ This code sample allows you to create a typeahead suggestion functionality for y # Watch below Demo to Get Started -[![Watch the video](https://img.youtube.com/vi/VIDEO_ID/maxresdefault.jpg)](https://www.youtube.com/watch?v=7xbSpzmQcIg) +[![Watch the video](image +)](https://www.youtube.com/watch?v=7xbSpzmQcIg) https://www.youtube.com/watch?v=7xbSpzmQcIg From d4d57be58b14dfa225c69175b041517141d5406d Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:42:15 -0400 Subject: [PATCH 08/25] Update README.md --- TypeaheadSuggestions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index ecec8c21..12ad4f4b 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -21,7 +21,7 @@ This code sample allows you to create a typeahead suggestion functionality for y # Watch below Demo to Get Started -[![Watch the video](image +[![Watch the video](https://th.bing.com/th/id/OIP.9k6Gz3sbmi5b8r6YxTSG-QHaEK?w=289&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7 )](https://www.youtube.com/watch?v=7xbSpzmQcIg) https://www.youtube.com/watch?v=7xbSpzmQcIg From 1e4a019ae3e7d73e161f4f10e4299566b38f18c3 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:43:38 -0400 Subject: [PATCH 09/25] Update README.md --- TypeaheadSuggestions/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index 12ad4f4b..c34fac25 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -10,13 +10,19 @@ This code sample allows you to create a typeahead suggestion functionality for y 3. Download the TypeAheadSuggestion.HTML canvas to your local machine and open in any code editor. 4. On line 155 replace add the secret your copied for your copilot. Please note that for best practices you can use directline token instead of using secret in the canvas. image + 5. Next you need to add a RestAPI that returns an array of suggestions for your bot. You can use the + 6. On line 193 Add your RestAPI endpoint that returns an array of suggested topics. image + 7. Optional : If you would like to exclude any suggestions based on your business logic you can create a exclusion list as shown below on line 173. image + 8. Click Save and open the file in the browser to test. You can launch the bot by clicking on the chat bubble and initiating the chat. + 9. To see list of suggestions before typying click the space bar which opens a dropdow list of suggested topcis + 10. For getting type ahead suggestions continue to type in the chat bot canvas and suggestions will be shown below the chat area. Clicking on any suggestion submits the utterance to the bot. # Watch below Demo to Get Started From a0fb68d26f8453cf7a708b61578886fcf44b079d Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:50:21 -0400 Subject: [PATCH 10/25] Update README.md --- TypeaheadSuggestions/README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index c34fac25..3710448e 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -11,19 +11,22 @@ This code sample allows you to create a typeahead suggestion functionality for y 4. On line 155 replace add the secret your copied for your copilot. Please note that for best practices you can use directline token instead of using secret in the canvas. image -5. Next you need to add a RestAPI that returns an array of suggestions for your bot. You can use the +5. Next you will need to add a RestAPI that returns an array of suggestions for your bot. For testing, you can use the TypeAheadSolutionAPI Zip file that has a power automate flow that returns topic names for a given copilot bot. On the power automate flow you will need to edit the list row action and replace the exisiting botid with your botid. -6. On line 193 Add your RestAPI endpoint that returns an array of suggested topics. + image + + +7. On line 193 Add your RestAPI endpoint that returns an array of suggested topics. image -7. Optional : If you would like to exclude any suggestions based on your business logic you can create a exclusion list as shown below on line 173. +8. Optional : If you would like to exclude any suggestions based on your business logic you can create a exclusion list as shown below on line 173. image -8. Click Save and open the file in the browser to test. You can launch the bot by clicking on the chat bubble and initiating the chat. +9. Click Save and open the file in the browser to test. You can launch the bot by clicking on the chat bubble and initiating the chat. -9. To see list of suggestions before typying click the space bar which opens a dropdow list of suggested topcis +10. To see list of suggestions before typying click the space bar which opens a dropdow list of suggested topcis -10. For getting type ahead suggestions continue to type in the chat bot canvas and suggestions will be shown below the chat area. Clicking on any suggestion submits the utterance to the bot. +11. For getting type ahead suggestions continue to type in the chat bot canvas and suggestions will be shown below the chat area. Clicking on any suggestion submits the utterance to the bot. # Watch below Demo to Get Started From 124652da8a16ec428737cda0327e10f669feb17e Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 10:50:38 -0400 Subject: [PATCH 11/25] Add files via upload --- .../TypeAheadSolutionAPI_1_0_0_0_managed.zip | Bin 0 -> 3571 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 TypeaheadSuggestions/TypeAheadSolutionAPI_1_0_0_0_managed.zip diff --git a/TypeaheadSuggestions/TypeAheadSolutionAPI_1_0_0_0_managed.zip b/TypeaheadSuggestions/TypeAheadSolutionAPI_1_0_0_0_managed.zip new file mode 100644 index 0000000000000000000000000000000000000000..b667e4e4bea42d9b70f7aae8f8fd5054d46e0921 GIT binary patch literal 3571 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 nzcrMw5CHfGz`-c^ literal 0 HcmV?d00001 From 69b2f347954637b712abbaba9b9c9c78838407b5 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Fri, 4 Oct 2024 16:35:42 -0400 Subject: [PATCH 12/25] Update TypeAheadSuggestions_V1.0.html --- .../TypeAheadSuggestions_V1.0.html | 65 ++++++++++++------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html b/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html index 8db042bd..362b2a2e 100644 --- a/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html +++ b/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html @@ -150,21 +150,48 @@ + + + + + + + + From df487f870363dd283e118daea1ff9317a7732177 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Mon, 7 Oct 2024 22:13:07 -0400 Subject: [PATCH 18/25] Update README.md --- TypeaheadSuggestions/README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index 1d4ccd40..fb648827 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -1,5 +1,8 @@ # Typeahed Suggestions for Copilot Studio -This code sample allows you to create a typeahead suggestion functionality for your custome copilot that can assist users finding things like frequently asked questions, auto correcting typos and showing a list of menu items like product names or topic names before sending a message to the copilot. +This code sample allows you to create a typeahead suggestion functionality for your custome copilot that can assist users finding things like frequently asked questions, auto correcting typos and showing a list of menu items like product names or topic names before sending a message to the copilot. The version one uses an API that returns topic names for given bot but the sample can be used with any RestFul endpoint to show relevant suggestions based on your usecase. + +### Please note that version 1 calls the API once and loads the suggestions for your bot when the chat is initiated. It then filters through these suggestions based on users questions. +### Please note that version 2 which is built using REACT component calls the API every time users asks a questions and shows the relevant suggestion based on each question when user type '/' @@ -8,7 +11,7 @@ This code sample allows you to create a typeahead suggestion functionality for y 1. Create your custom copilot using copilot studio with required topics and actions. 2. Once you have published your copilot go to mobile channel and copy the directline endpoint url. 3. Download the TypeAheadSuggestion.HTML canvas to your local machine and open in any code editor. -4. On line 156 replace the direct enpoint you copied for your copilot. Please note that for best practices you can use directline token instead of using secret in the canvas. +4. On line 158 replace the direct enpoint you copied for your copilot. Please note that for best practices you can use directline token instead of using secret in the canvas. image @@ -19,7 +22,7 @@ This code sample allows you to create a typeahead suggestion functionality for y -7. On line 220 Add your RestAPI endpoint that returns an array of suggested topics. +7. On line 222 Add your RestAPI endpoint that returns an array of suggested topics. image @@ -32,12 +35,15 @@ This code sample allows you to create a typeahead suggestion functionality for y 11. For getting type ahead suggestions continue to type in the chat bot canvas and suggestions will be shown below the chat area. Clicking on any suggestion submits the utterance to the bot. -# Watch below Demo to Get Started +# Watch below Demo to Get Started with Version 1 [![Watch the video](https://th.bing.com/th/id/OIP.9k6Gz3sbmi5b8r6YxTSG-QHaEK?w=289&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7 )](https://www.youtube.com/watch?v=7xbSpzmQcIg) https://www.youtube.com/watch?v=7xbSpzmQcIg +# Watch below Demo to Get Started with Version 2 +[![Watch the video](https://microsoft-my.sharepoint.com/:v:/p/paragdessai/ETkn3PA1l15Fhya-wCo6ENQB-Da9lRknTh9tZzysqxZsLQ?e=b3bDMI&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D) + From 6214afcd4c268279e4939700384aa7046f809034 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Mon, 7 Oct 2024 22:14:21 -0400 Subject: [PATCH 19/25] Update README.md --- TypeaheadSuggestions/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index fb648827..5ce563c4 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -44,6 +44,8 @@ https://www.youtube.com/watch?v=7xbSpzmQcIg # Watch below Demo to Get Started with Version 2 [![Watch the video](https://microsoft-my.sharepoint.com/:v:/p/paragdessai/ETkn3PA1l15Fhya-wCo6ENQB-Da9lRknTh9tZzysqxZsLQ?e=b3bDMI&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D) + + From dd59c5de07d22f3a2f650383dc22580f5984c11f Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Mon, 7 Oct 2024 22:15:18 -0400 Subject: [PATCH 20/25] Update README.md --- TypeaheadSuggestions/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index 5ce563c4..731af2b4 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -1,8 +1,8 @@ # Typeahed Suggestions for Copilot Studio This code sample allows you to create a typeahead suggestion functionality for your custome copilot that can assist users finding things like frequently asked questions, auto correcting typos and showing a list of menu items like product names or topic names before sending a message to the copilot. The version one uses an API that returns topic names for given bot but the sample can be used with any RestFul endpoint to show relevant suggestions based on your usecase. -### Please note that version 1 calls the API once and loads the suggestions for your bot when the chat is initiated. It then filters through these suggestions based on users questions. -### Please note that version 2 which is built using REACT component calls the API every time users asks a questions and shows the relevant suggestion based on each question when user type '/' +Please note that version 1 calls the API once and loads the suggestions for your bot when the chat is initiated. It then filters through these suggestions based on users questions. +Please note that version 2 which is built using REACT component calls the API every time users asks a questions and shows the relevant suggestion based on each question when user type '/' @@ -40,11 +40,10 @@ This code sample allows you to create a typeahead suggestion functionality for y [![Watch the video](https://th.bing.com/th/id/OIP.9k6Gz3sbmi5b8r6YxTSG-QHaEK?w=289&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7 )](https://www.youtube.com/watch?v=7xbSpzmQcIg) -https://www.youtube.com/watch?v=7xbSpzmQcIg # Watch below Demo to Get Started with Version 2 [![Watch the video](https://microsoft-my.sharepoint.com/:v:/p/paragdessai/ETkn3PA1l15Fhya-wCo6ENQB-Da9lRknTh9tZzysqxZsLQ?e=b3bDMI&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D) - + From aa004e27a69750540e1d4271cb9ed27b4af86236 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Mon, 7 Oct 2024 22:16:15 -0400 Subject: [PATCH 21/25] Update README.md --- TypeaheadSuggestions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index 731af2b4..e13011de 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -41,7 +41,7 @@ Please note that version 2 which is built using REACT component calls the API ev )](https://www.youtube.com/watch?v=7xbSpzmQcIg) # Watch below Demo to Get Started with Version 2 -[![Watch the video](https://microsoft-my.sharepoint.com/:v:/p/paragdessai/ETkn3PA1l15Fhya-wCo6ENQB-Da9lRknTh9tZzysqxZsLQ?e=b3bDMI&nav=eyJyZWZlcnJhbEluZm8iOnsicmVmZXJyYWxBcHAiOiJTdHJlYW1XZWJBcHAiLCJyZWZlcnJhbFZpZXciOiJTaGFyZURpYWxvZy1MaW5rIiwicmVmZXJyYWxBcHBQbGF0Zm9ybSI6IldlYiIsInJlZmVycmFsTW9kZSI6InZpZXcifX0%3D) +[![Watch the video](https://microsoft-my.sharepoint.com/:v:/p/paragdessai/ETkn3PA1l15Fhya-wCo6ENQB0szoB46zwB0zJHO5xTvjCw) From d2a2aa366e6ab1afcde957e93680e270f9325e17 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Mon, 7 Oct 2024 22:20:43 -0400 Subject: [PATCH 22/25] Update README.md --- TypeaheadSuggestions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index e13011de..6ff21603 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -41,7 +41,7 @@ Please note that version 2 which is built using REACT component calls the API ev )](https://www.youtube.com/watch?v=7xbSpzmQcIg) # Watch below Demo to Get Started with Version 2 -[![Watch the video](https://microsoft-my.sharepoint.com/:v:/p/paragdessai/ETkn3PA1l15Fhya-wCo6ENQB0szoB46zwB0zJHO5xTvjCw) +[![Watch the video](https://youtu.be/H9_r7R4iNOU) From 13a412649847b38eaa8d69f23d6197125c9342fa Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Mon, 7 Oct 2024 22:21:28 -0400 Subject: [PATCH 23/25] Update README.md --- TypeaheadSuggestions/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TypeaheadSuggestions/README.md b/TypeaheadSuggestions/README.md index 6ff21603..129949d4 100644 --- a/TypeaheadSuggestions/README.md +++ b/TypeaheadSuggestions/README.md @@ -41,7 +41,8 @@ Please note that version 2 which is built using REACT component calls the API ev )](https://www.youtube.com/watch?v=7xbSpzmQcIg) # Watch below Demo to Get Started with Version 2 -[![Watch the video](https://youtu.be/H9_r7R4iNOU) +[![Watch the video](https://th.bing.com/th/id/OIP.9k6Gz3sbmi5b8r6YxTSG-QHaEK?w=289&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7 +)](https://youtu.be/H9_r7R4iNOU) From 9671d2ff2d89d19d60e60962a08c79bac72cee80 Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Thu, 10 Oct 2024 10:18:48 -0400 Subject: [PATCH 24/25] Update TypeAheadSuggestions_V2.0[REACT Component].html --- .../TypeAheadSuggestions_V2.0[REACT Component].html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TypeaheadSuggestions/TypeAheadSuggestions_V2.0[REACT Component].html b/TypeaheadSuggestions/TypeAheadSuggestions_V2.0[REACT Component].html index ddbd2608..422b1dae 100644 --- a/TypeaheadSuggestions/TypeAheadSuggestions_V2.0[REACT Component].html +++ b/TypeaheadSuggestions/TypeAheadSuggestions_V2.0[REACT Component].html @@ -128,7 +128,7 @@ ); }; - const tokenEndpointURL = "https://default76f66a0b386f4e01b8b17ef54f9545.6c.environment.api.powerplatform.com/powervirtualagents/botsbyschema/crdee_typeAheadBotDemo/directline/token?api-version=2022-03-01-preview"; // Replace with your token endpoint + const tokenEndpointURL = "Replace with your token endpoint"; // const getToken = async () => { const response = await fetch(tokenEndpointURL); @@ -138,7 +138,7 @@ const getSuggestionsFromAPI = async (userInput) => { try { - const response = await fetch('https://prod-26.westus.logic.azure.com:443/workflows/15d5f7995b0f49c28167fea4b0151ef3/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=d8I-bRYI_sx16HgyH5TlRxH7ExA2C-XaYcwAzdiP-KQ', { + const response = await fetch('Add your API EndPoint here. The API response needs to return array of suggestions ['suggestion1','suggestions']', { method: 'POST', headers: { 'Content-Type': 'application/json' @@ -212,7 +212,7 @@ if (action.type === "WEB_CHAT/SEND_MESSAGE") { const text = action.payload.text; - // Call API to get suggestions every time user sends a message to bot. Response from API needs to be an array for example ['suggestion 1','suggestion 2','suggestion 3'] + // Call API to get suggestions every time user sends a message to bot. const suggestions = await getSuggestionsFromAPI(text); window.updateSuggestions(suggestions); } From a168721e5d8aa25dfdc36b343d152f6f189774fe Mon Sep 17 00:00:00 2001 From: Parag Dessai Date: Thu, 10 Oct 2024 10:29:46 -0400 Subject: [PATCH 25/25] Update TypeAheadSuggestions_V1.0.html --- TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html b/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html index 888abdf2..36f9ed37 100644 --- a/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html +++ b/TypeaheadSuggestions/TypeAheadSuggestions_V1.0.html @@ -155,7 +155,7 @@ // Function to retrieve the Direct Line token async function getDirectLineToken() { try { - const response = await fetch('https://default76f66a0b386f4e01b8b17ef54f9545.6c.environment.api.powerplatform.com/powervirtualagents/botsbyschema/crdee_typeAheadBotDemo/directline/token?api-version=2022-03-01-preview'); // Your token API + const response = await fetch('Insert your directline token API'); if (!response.ok) throw new Error('Network response was not ok'); const data = await response.json(); return data.token; // Assuming the token is in the 'token' field