BotFramework: Transferring information between a skill and a Virtual Assistant

Currently, I am faced with the challenge of trying to trigger Skill B from Skill A within a Virtual Assistant without any additional user input. This process requires passing data from Skill A to the Virtual Assistant and then from the Virtual Assistant to Skill B. I have encountered two main issues:

  • The first problem involves passing data from Skill A to the Virtual Assistant.
  • The second issue pertains to passing data from the Virtual Assistant to Skill B.

I have explored using the SkillContext with slots to address the second problem as referenced in this resource. However, I am unable to find a suitable solution for the first problem since the Virtual Assistant only returns a boolean indicating completion status when a skill invocation ends (source).

My attempted approach involved storing data in the SkillContext within Skill A, retrieving it in the Virtual Assistant, and then passing it to Skill B. However, this method is reliant on both Skill A and the Virtual Assistant writing to the same Cosmos DB, which is not an ideal scenario.

As I seek more efficient solutions, I am open to exploring alternative methods. Any suggestions or insights would be highly appreciated.

Answer №1

Is it feasible to transmit information from a skill to the Parent Bot without utilizing Dialogs?

The following code snippet is employed to invoke a skill from the root bot:

var response = await _skillClient.PostActivityAsync(_botId, targetSkill, _skillsConfig.SkillHostEndpoint, turnContext.Activity, cancellationToken);

This code snippet is used to terminate the conversation within the skill bot:

var endOfConversation = Activity.CreateEndOfConversationActivity();
endOfConversation.Code = EndOfConversationCodes.CompletedSuccessfully;

Answer №2

Instead of using PVA, I have opted for Bot Composer in my situation. I am hopeful that the syntax is similar and can be applied to PVA with a custom skill in the same manner.

I have been exploring ways to achieve something similar and managed to find a viable solution using the following syntax.

My scenario involves a waterfall dialog with 2 steps. The first step presents a prompt with multiple choices. The final step retrieves the selected value, concludes the conversation, and closes the dialog. In my case, I want the selected value to be returned as the output of the skill so that I can store it in a variable within the composer and utilize it later in the conversation.

The code for my dialog is as follows:

// Code goes here...

The key part that enabled this functionality for me was located in the FinalStepAsync method.

// Code snippet goes here

This effectively ends the conversation and returns the value.

Subsequently, in Bot Composer, I could use this value by setting the "Property" of the Skill to a specific variable (e.g., dialog.selectedCard) and then referring to the value later as "${dialog.selectedCard}".

A useful post led me to this solution. Helpful Post

Illustration of conversation invoking skill and utilizing value

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Having trouble implementing catchError in a unit test for an HttpInterceptor in Angular 11

I am facing challenges in completing a unit test for my HttpInterceptor. The interceptor serves as a global error handler and is set to trigger on catchError(httpResponseError). While the interceptor functions perfectly fine on my website, I am struggling ...

Ensuring data integrity by validating incoming data with TypeScript and Angular 2

What is the best approach to validate data received from the server using AJAX or in a child component using the @input decorator in Angular2+ applications? In my current project, I utilize interfaces for this purpose, however they do not entirely valida ...

How is it possible for the output to be a string array when the variable was declared as a number in TypeScript?

Snippet: function sampleFunction(sample:string|number|string[]) { if(typeof sample == "string") { console.log("Sample is String " + sample); } else if(typeof sample == "number") { console.log("Sample is Number " + sampl ...

Harnessing the Power of Webpack, TypeScript, and Sequelize: A Comprehensive Guide

After revising my query, I'm still encountering the same issue. The technologies I am utilizing include webpack, TypeScript, and Sequelize. My aim is to integrate Sequelize into a TypeScript backend file. I have successfully installed Sequelize and ...

Tips on showcasing lengthy string content from JSON in a structured list format using react with typescript

Is there a way to display long string data from a JSON file in a list format when the description string is too lengthy? How can I split or format the description using React and TypeScript? The JSON data I have is as follows: "options": [ ...

Increase the totalAmount by adding the product each time

Can someone help me understand why the totalAmount shows as 20 when I add a product? Also, why doesn't it increase when I try to increment it? Any insights would be appreciated. Thank you. ts.file productList = [ { id: 1, name: 'Louis ...

Issue with displaying Angular chart only resolves after resizing window following routing updates

Hey there! I'm having trouble getting my chart to show up after adding routing to my 3 tabs. Previously, without routing, everything worked fine. Now, the graph only appears after resizing the window. The chart is using PrimeNG chart with the Chart.js ...

Guide on printing in an Ionic application using print.js without the need to open the printer setup page

Our team is currently working on an Ionic web application that utilizes printer functionality. To enable printing, we have integrated the Print.js npm package. However, when we initiate the print method, a setup page displaying details such as printer na ...

Angular - Navigate to Login Page post registration and display a confirmation message

As a newcomer to Angular, I am currently working on an Angular and Spring Boot application. So far, I have created components for user login and registration along with validation features. Now, my goal is to redirect the user to the login page upon succes ...

Setting a default time on a p-calendar: A step-by-step guide

I am currently using the following p-calendar component in my webpage: <p-calendar [style]="{'width':'100%'}" [inputStyle]="{'width':'100%'}" dateFormat="dd-mm-yy" [fo ...

Show refined information upon form submission or click

I am facing a challenge with implementing filtering functionality in an input box within a form in Angular 12. Despite my efforts, I have been unable to get the pipe working correctly in the component and consequently in the view. HTML ...

What seems to be the issue with my @typescript-eslint/member-ordering settings?

I am encountering an issue where my lint commands are failing right away with the error message shown below: Configuration for rule "@typescript-eslint/member-ordering" is throwing an error: The value ["signature","public-static-field","pro ...

Why does the CSHTML button containing a JavaScript onclick function only function intermittently?

I've implemented a download button on a webpage that dynamically assigns an ID based on the number of questions posted. Below is the code for the button: <input data-bind="attr: { id: $index() }" type="button" value="Downlo ...

What could be causing the Uncaught Error to persist even after using .catch()?

Check out this code snippet: function pause(ms:number) { return new Promise((resolve:any,reject:any) => setTimeout(resolve,ms)) } async function throwError(): Promise<void> { await pause(2000) console.log("error throw") throw new ...

Why is it that when I try to create a table using the "Create Table" statement, I keep getting an error saying "Near '(': syntax error"?

Error : There seems to be a syntax error near "(". Here is the SQL statement causing the issue: CREATE TABLE IF NOT EXISTS tickets ( numero INTEGER PRIMARY KEY AUTOINCREMENT, identifier VARCHAR(4) NOT NULL, subject VARCHAR(150) NOT NULL, ...

What is the best way to retrieve class members using component properties?

I am looking to implement a mixin for setting the header and meta data in my project. I recently discovered vue-meta, which seems to work really well for this purpose. However, I am still getting acquainted with TypeScript and class-based components. How ...

Angular efficient approach to changing object properties

When working on creating or updating records, I encounter a problem with the length and cleanliness of my code. The dealTypeValues object varies based on the dealDispositionType (buyout or sale), resulting in lengthy and messy code. Does anyone have sugge ...

Angular 6 offers a versatile multi-select dropdown feature

Looking to select multiple values in Angular 6 using checkboxes. When selecting a department from the dropdown, a list of employees related to that department is displayed in another dropdown with checkboxes. However, only the last value of the array app ...

Best Practice for Using *ngIf in Angular (HTML / TypeScript)

In the past, I frequently used Angular's *ngIf directive in my HTML pages: <p *ngIf="var === true">Test</p> (for instance) However, there have been instances where I needed to perform multiple checks within the *ngIf directive ...

Encountered an error: Object(...) function not defined when using React, Formik, and Webpack

I have encountered an issue while trying to use both Formik and React-Form-Hooks in my project. Despite using Typescript as my language and Babel as the transpiler, both libraries throw the same error when compiled. Uncaught TypeError: Object(...) is not ...