nodejs
4 TopicsInitiating a group chat
Hi, We are trying to initiate a group chat with members in Teams. We are using Postman to call the BotFramework REST API to start a group conversation. Here is the payload we are using { "type": "message", "isGroup": true, "members": [ { "id": "Some Id" }, { "id": "Some Id" } ], "tenantId": "Some Id", "topicName": "test" } When we tried to execute the request, we get the following error { "error": { "code": "BadSyntax", "message": "Incorrect conversation creation parameters" } } If we tried to initiate a conversation with only ONE member with the following payload, then everything works correctly { "type": "message", "isGroup": false, "members": [ { "id": "Some Id" } ], "tenantId": "Some Id", "topicName": "test" } Can anyone advise what the proper syntax to creating a group chat in Teams with the BotFramework REST API? Thank YouSolved1.9KViews0likes4CommentsPower Virtual Agent Bots as Skills for an Azure Bot
Hi, We have an Azure Bot deployed and are exploring the possibility of using a PVA Bot as a skill for the Azure Bot. From https://learn.microsoft.com/en-us/power-virtual-agents/advanced-use-pva-as-a-skill#add-your-bot-framework-bot-to-the-allowlist-for-your-power-virtual-agents-bot, we have read that we can add a PVA Bot to a Bot created via the BotFrameworkComposer as a skill. However, we did not find any documentation on how we can accomplish the same using code. Our Azure Bot is written in NodeJS. We have a skill dialog bot that is currently connected to the root bot using NodeJS. Is it possible to have our NodeJS root bot talk to a PVA Bot? Thank You1.2KViews0likes1CommentSkill Dialog Bots and Update Activity
Hi, In a dialog-root-bot and skill-dialog-bot implementation, if my skill-dialog-bot shows an adaptive card and the user has already acted on the presented card, I want to update the card with either a 'text' message or a card to avoid the user from interacting with the previous card again. My dialog-root-bot's WaterfallDialog definition is as follows .addDialog(new WaterfallDialog(WATERFALL_DIALOG, [ this.actStep.bind(this), this.finalStep.bind(this) ])); In finalStep, I check for the results from the skill-dialog-bot and determine if I need to update the activity and present the next card or message. In the following snippet, I replace the previous card with a new card const details = stepContext.result; const conversationId = details.conversationId; const activityId = details.activityId; const nextCard = stepContext.context.activity; nextCard.value = null; nextCard.text = null; nextCard.type = ActivityTypes.Message; nextCard.conversation.id = conversationId; nextCard.id = activityId; nextCard.attachments = [details.nextCard]; await stepContext.context.updateActivity(nextCard); What happens now is that even though the skill-dialog-bot has ended the conversation, the line "stepContext.context.updateActivity(nextCard)" will again pass control to the skill-dialog-bot. Is there a way to prevent that? Thank YouSolved1.2KViews0likes2CommentsSkill Dialog: endDialog() does not work
Hi, I am implementing a dialogRootBot that will call a skillDialogBot. My dialogRootBot is able to invoke the skillDialogBot. The conversation can progress until the point where the skillDialogBot is supposed to return the results to the dialogRootBot. The skillDialogBot has the following setup this.addDialog(new TextPrompt(TEXT_PROMPT)) .addDialog(new ConfirmPrompt(CONFIRM_PROMPT)) .addDialog(new WaterfallDialog(WATERFALL_DIALOG, [ this.processStep.bind(this) ])); The processStep is laid out like this async processStep(stepContext) { const details = stepContext.options; details.result = { status: 'success' }; return await stepContext.endDialog(stepContext.options); } I was expecting the dialogRootBot to get the result from the skillDialogBot after processStep has called endDialog, but that never happens. Instead, the user is stuck with the skillDialogBot until the user manually types in "abort", which is the command the dialogRootBot is monitoring to cancel all dialogs in its onContinueDialog() implementation Here is how the onContinueDialog() looks like async onContinueDialog(innerDc) { const activeSkill = await this.activeSkillProperty.get(innerDc.context, () => null); const activity = innerDc.context.activity; if (activeSkill != null && activity.type === ActivityTypes.Message && activity.text) { if (activity.text.toLocaleLowerCase() === 'abort') { // Cancel all dialogs when the user says abort. // The SkillDialog automatically sends an EndOfConversation message to the skill to let the // skill know that it needs to end its current dialogs, too. await innerDc.cancelAllDialogs(); return await innerDc.replaceDialog(this.initialDialogId, { text: 'Request canceled!' }); } } return await super.onContinueDialog(innerDc); } I modeled this after the botbuilder-samples\samples\javascript_nodejs\81.skills-skilldialog sample. If I were to change the skillDialogBot and have it do a ConfirmPrompt() before the finalStep()'s endDialog(), then the conversation ends correctly with the skillDialogBot() posting the dialog's results to the rootDialogBot. For the sake of clarity, this is how the bookingDialog in the skills-skilldialog sample looks like /** * Confirm the information the user has provided. */ async confirmStep(stepContext) { const bookingDetails = stepContext.options; // Capture the results of the previous step. bookingDetails.travelDate = stepContext.result; const messageText = `Please confirm, I have you traveling to: ${ bookingDetails.destination } from: ${ bookingDetails.origin } on: ${ bookingDetails.travelDate }. Is this correct?`; const msg = MessageFactory.text(messageText, messageText, InputHints.ExpectingInput); // Offer a YES/NO prompt. return await stepContext.prompt(CONFIRM_PROMPT, { prompt: msg }); } /** * Complete the interaction and end the dialog. */ async finalStep(stepContext) { if (stepContext.result === true) { const bookingDetails = stepContext.options; return await stepContext.endDialog(bookingDetails); } return await stepContext.endDialog(); } Is it not possible to endDialog() without a prompt? Thank YouSolved1.9KViews0likes2Comments