BotChat | pkg update pkg upgrade pkg install python2 git git clone
kandi X-RAY | BotChat Summary
kandi X-RAY | BotChat Summary
BotChat
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Main function .
- Run bantuan
- Print help .
- Runs the API .
- Run indo .
- Connect to environ .
- Menu menu .
BotChat Key Features
BotChat Examples and Code Snippets
Community Discussions
Trending Discussions on BotChat
QUESTION
I've got a script with multiple requests sent as resources of a main request. I need to extract value from 1 of the resources requests and pass to another. Since all this requests are executed in parallel I'm looking for an option to suspend execution of one of them until parameter will be extracted.
Here is some part of my request
...ANSWER
Answered 2021-May-27 at 14:24That can't work. resources
are by definition asynchronous and executed concurrently so you have no guarantee request_29 completes and you can capture your token before request_34 starts.
You have to execute request_34 sequentially after request_2, out of its resources.
QUESTION
We are migrating from BotFramework-Webchat v3 to v4. Usually we send a message from the chat through the directline object created from v3 BotChat using the directline.postActivity function. However in our v4 implementation there were issues with the behavior of messages shown in the chat window when posting activities like this.
It seems that sending messages through the webchat redux store as shown in this example is the recommended approach.
I am wondering what is the difference between these two usages? It seems something is different between v3 and v4 versions and I am having difficulty finding references in the documentation about this. Should directline.postActivity be avoided completely?
...ANSWER
Answered 2020-Sep-02 at 23:45It isn't documented anywhere, but best practice is what is demonstrated via the samples, by use of the Web Chat redux store and its list of available actions.
Essentially, Web Chat v4 is built on top of BotFramework-DirectlineJS which does use observables. Web Chat then translates the Direct Line observables into its own methods for consumption internally and by the user.
As you noted, it is possible to use the Direct Line observables in Web Chat but it is neither the best method nor the best practice to do so. Primarily, because Web Chat wasn't specifically designed around their use, except internally. It can work, but it opens you up to potentially curious behavior.
QUESTION
So, I'm currently using this:
...ANSWER
Answered 2019-Jan-24 at 09:51From Cilent Side
QUESTION
I am trying to send a greeting message at the moment the web is loaded and the chatbot is initialized. It works with the emulator but it doesn't seem to work that straight forward with on the webchat channel.
I have researched and found a couple of useful links but I am missing something...
Display Welcome Message in v4 Bot Framework Bot (C# + .Net Core Web Application)
https://github.com/microsoft/BotFramework-WebChat/issues/1397
So far this is my code:
default.htm
...ANSWER
Answered 2020-Feb-25 at 14:04Your issue looks related to the name of the event. The WebChat is sending an event named requestWelcomeDialog
, where your bot code is looking for an event named webchat/join
. If you change one of them, it should work.
There are two possibilities for handling welcome messages.
Conversation Update. DirectLine broadcasts a conversation update event by default, however this is not preferred. This event will end up in
OnMembersAddedAsync
.Custom Event. Send a custom event using WebChat v4, as described in this sample. This event will end up in
OnEventActivityAsync
.
My advice would be to upgrade to the new WebChat (v4) and to have a look at this sample. The ConversationUpdate has limitations and you are more flexible by sending a custom event.
QUESTION
Team, I have developed a bot using bot framework SDK4. I am using Directline channel to communicate with my bot. My requirement is based on channeldata on 'requestWelcomeDialog' message I have to show welcome message.
Code from my bot client:
...ANSWER
Answered 2020-Feb-07 at 19:28The first problem is that you're using Bot Chat. Bot Chat is Web Chat v3 and it's deprecated. You should be using Web Chat v4 according to the instructions in the repo.
The second problem is that you're trying to respond to a custom event using OnMembersAddedAsync
which is only triggered by conversation update activities. You can see how to send and respond to welcome events by following the instructions in this issue and this sample. The C# equivalent would look like this:
QUESTION
I'm trying to display the user's chat history with my bot so that when they come back they can see their previous conversations. When I'm trying the function "SendConversationHistory(conversationId, transcripts)" I keep getting a Bad Request (400) and the history is not displayed in the chatbot. Does anybody knows how to fix this?
I'm using BotFramework SDK v.3 in C#.
What I do is: 1. Checking if there is any conversation ID stored to be able to reconnect using that conversation ID 2. I send an event to the bot to restore the history 3. I'm able to fetch the previous activities and create the Transcript
After setting my transcript I tried this SendConversationHistory function which is not working.
I can chat with the bot even if this fails using the old conversation ID. I also tried to make the bot do a ReplyToActivity and this works.
I'm following a js sample (v4), this stackoverflow question and this thread about history in github but none of it helped to solve this issue.
MessageController.cs (in HandleSystemMessage)
...ANSWER
Answered 2019-Jul-08 at 18:51If you're debugging in Visual Studio, you can click on "View Details" to see the whole exception object.
For an ErrorResponseException
, you can see the actual error message that was returned in the HTTP response. In this case it says "Invalid activities" which makes it clear that something is wrong with the activities you're trying to send.
It turns out you're not specifying the recipient of your activities. If you specify a recipient then you should get past your "BadRequest" exception.
However: There are a few more gotchas you might run into. Even if you don't get an exception, there are some things that can make SendConversationHistory
fail without error while providing no feedback for why your activities aren't showing up in the chat.
Your strategy for populating the ID property is risky because your bot might send a message to the conversation before calling SendConversationHistory
. If your bot had sent a message to the user during that same turn, it will have the same activity ID that you're trying to assign to the activity in the conversation history. This will cause a conflict and you won't see the activity show up. I recommend formatting the ID in some unique way that doesn't resemble the ID values that Direct Line automatically generates.
I was able to send your activities successfully by modifying the code like this:
QUESTION
I've implemented my v4 .NET bot in webchat using direct line and Microsft's sample-webchat. How can I enable the bot's name and the user's name after each message in the chat like this example?
I have gotten it to work using BotChat.App
and https://cdn.botframework.com/botframework-webchat/0.11.4/botchat.js as the script but I can't seem to figure it out with window.WebChat
like Microsoft's sample is using.
Here's my webchat code:
...ANSWER
Answered 2020-Jan-10 at 18:48Unfortunately, the development team removed the bot name from the timestamp in Web Chat v4; however, you can use some of Web Chat's middlewares - the Redux Store and Activity middlewares - to add the bot name above each message set. I put together a sample to illustrate how to do this. Basically, in the store middleware, we are labeling which activities should display the bot name by checking the last message in the transcript and adding the showDisplayName
to the activities' channel data which is true if the last message was not from the bot and false otherwise. Then in the Activity middleware, we are adding the bot name to the activity in a div if the showDisplayName
value is true.
Web Chat v4 - Display Bot Name Sample
QUESTION
issue I have developed own API which generates and refreshes token using directline api. The problem is after that when I integrated token instead of Secret in above code, my bot replies the answer correctly but also echo back the input which is being provided. There is no such implementation done in code and with secret and emulator all works fine.
...ANSWER
Answered 2019-Nov-06 at 21:14Looking at the above posted code, it looks like you are passing the token as a secret. I would recommend you just pass one not both.
Also, I would recommend you to upgrade to web chat v4 as it provides more support when it comes to customization. This sample provides a detailed guide on how to migrate from Web Chat v3 to v4.
QUESTION
Migrating from BotFramework V3 to V4, not able to set the chatTitle of chat window. This is my old code
...ANSWER
Answered 2019-Oct-24 at 06:41According to this issue Here
We omitted the chat title in Web Chat v4 (compare to v3) because:
It is one of the most popular customization
It can be easily done in HTML by appending HTML code just before Web Chat DOM element
It is more intuitive to do it in plain HTML than "customizing" in Web Chat, feel over-engineered if we do it that way
In this way, the user can customize the title as much as they want, for example, adding buttons to the chat title easily.
Check this Answer here if it has what you need using Javascript
QUESTION
I am currently having an issue with the botchat framework from Microsoft.
In essence, they are saying that for the framework to work in I.E., all you have to do is change the script for their webchat-es5.js version. However, this still does not work at all in IE. I am using IE 11. All other browsers work fine, except IE.
Could someone please point me in the right direction so that I may have this ChatBot actually work in IE?
Here is the code I am using for all of this stuff:
Relevant HTML:
...ANSWER
Answered 2019-Sep-16 at 23:20Arrow functions in IE11 are not supported, so you store middleware is causing the problem. Take a look at the code snippet below.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install BotChat
You can use BotChat like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page