direct-line-botframework

User and Bot messages appear on same side of chat container

☆樱花仙子☆ 提交于 2020-01-06 06:01:08
问题 I built a QnA Maker and integrated it via Direct Line in my Website using BotFramework-WebChat for styling. Messages of the user and the bot are appearing at the same side of the chat container. I can't figure why. This is how it currently looks like: This is the code I'm using: <script> const styleSet = window.WebChat.createStyleSet({ bubbleFromUserBackground: 'rgba(227, 227, 227, .1)', hideUploadButton: true, botAvatarInitials: 'WD', sendTypingIndicator: true, userAvatarInitials: 'you' });

Proactive Bot create PromptDialog.Choice

梦想与她 提交于 2020-01-04 07:44:50
问题 I have a controller that receives post requests from another app. From that I was able to initiate a conversation with a user that added the bot by doing: ChannelAccount userAccount = new ChannelAccount(); ChannelAccount botAccount = new ChannelAccount(); IMessageActivity message = Activity.CreateMessageActivity(); userAccount = new ChannelAccount(id: "a", name: "b"); botAccount = new ChannelAccount(id: "28:...", name: "bot1"); var connector = new ConnectorClient("uriexample"); var

Automatically send a message into the WebChat window in Bot Framework

安稳与你 提交于 2020-01-03 03:15:14
问题 I am using Microsoft Bot Framework and I created two bots. I am trying to build a simple HTML page that will show two webchat windows side by side, each for one of the two bots. The idea is to have an input box in the page, and when someone types into it, the text gets sent into both webchats at the same time. However, since webchats are basically iframes, there is not much I can do unless I make the webchat iframe expose some methods to the parent frame. This is the expected browser

DirectLineJS receiving copies of Bot replies

ε祈祈猫儿з 提交于 2020-01-02 07:54:32
问题 I'm using DirectLineJS to comminucate from a custom webchat through a website. I'm using the format posted from Microsoft's github https://github.com/Microsoft/BotFramework-DirectLineJS how I have it implemented is var directLine; directLine= new DirectLine.DirectLine({ secret: "My_DirectLine_Secret", }); function sendReceiveActivity(msg) { document.getElementById("inputtext").value = ""; conversation.innerHTML = conversation.innerHTML + "ME - " + msg + "<br/><br/>"; directLine.postActivity({

Cant send message using directlineapi in bot framework

核能气质少年 提交于 2019-12-25 00:15:39
问题 I am using directline api for webchat. After generating token, Along with that token in the header and activity object in the body I am requesting to this url: https://directline.botframework.com/v3/directline/conversations/{conversationID}/activities I am getting 404 page not found response: Here is my Activity object: {"type":"message","text":"Testing Directline API","conversation":{"id":"conversationId"},"recipient":{"id":"User request id"},"from":{"id":"mybot id","name":"My Bot Name "}}

Bot framework Direct Line 502 error

◇◆丶佛笑我妖孽 提交于 2019-12-24 11:16:23
问题 I have been trying to connect to my bot via DirectLine using this code on an html. <!DOCTYPE html> <html> <head> <link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" /> </head> <body> <div id="bot"/> <script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script> <script> BotChat.App({ directLine: { secret: 'xxxxx' }, user: { id: 'userid' }, bot: { id: 'botid' }, resize: 'detect' }, document.getElementById("bot")); <

MissingProperty error in Microsoft Bot Framework Request

▼魔方 西西 提交于 2019-12-24 08:18:46
问题 I am working on an app that uses the Microsoft Bot Framework. My app is written in Node. At this time, I am trying to POST an activity using the following code: var https = require('https'); var token = '[receivedToken]'; var conversationId = '[conversationId]'; var options = { host: 'directline.botframework.com', port: 443, headers: { 'Authorization': 'Bearer ' + token' }, path: '/v3/directline/conversations/' + conversationId + '/activities', method: 'POST' }; var request = https.request

MissingProperty error in Microsoft Bot Framework Request

随声附和 提交于 2019-12-24 08:18:18
问题 I am working on an app that uses the Microsoft Bot Framework. My app is written in Node. At this time, I am trying to POST an activity using the following code: var https = require('https'); var token = '[receivedToken]'; var conversationId = '[conversationId]'; var options = { host: 'directline.botframework.com', port: 443, headers: { 'Authorization': 'Bearer ' + token' }, path: '/v3/directline/conversations/' + conversationId + '/activities', method: 'POST' }; var request = https.request

Start conversation with a PromptDialog in MS BotFramework

南笙酒味 提交于 2019-12-24 01:06:06
问题 Is there a proper way for bot to start a conversation with PromptDialog.Choice in the Direct Line channel? I am trying an ugly hack with catching the fist ConversationUpdate activity and creating a fake message from user to initialize the dialog like this: IMessageActivity greetingMessage = Activity.CreateMessageActivity(); greetingMessage.From = message.Recipient;//from bot greetingMessage.Recipient = userAccount;//to user greetingMessage.Conversation = message.Conversation; greetingMessage

ChatBot did not work in Web Emulator but work well in Local Bot Framework emulator

感情迁移 提交于 2019-12-23 10:08:12
问题 The bounty expires in 8 hours . Answers to this question are eligible for a +100 reputation bounty. Eng Soon Cheah is looking for an answer from a reputable source : “The Chatbot is retrieve the data from SharePoint On-Premise. The ChatBot is hosted outside of SharePoint Page.” I developed the ChatBot that integrates with SharePoint On Premise. When I debug the ChatBot in emulator, it work. But When I debug on Web Emulator in Azure and Website Hosted in Company Website by using DirectLine, it