问题
I'm starting some practices in which I have been assigned to create a ChatBot in a technical support website. I downloaded the template locally in C # but reading the documentation, to generate greetings, put buttons, .... I do not understand it well, I do not know where to put the examples of code that come from example, come on, I'm done a mess. This is my first real job, I have only developed very small Web applications in Java, so if someone can guide me it would be wonderful.
回答1:
I think the video that @Hessel pointed to is a good start, but note that it's from August 2018 and a lot of the botframework has changed since then. Here's how I would go about learning this:
Go through the C# QuickStart. Start with
EchoBot
Read through each comment and line of code generated in the previous step and make sure you understand exactly how it works and how the files are laid out.
Read How Bots Work, which is a higher-level overview of how bots work, and try to figure out how
EchoBot
works within that context.Go through Step 1 again, this time with
CoreBot
and again read through the codeRead through the remaining Concepts (on the left). These are pretty high-level so don't expect to understand it all.
Other great references:
Docs: How to Develop. When you want to add a feature to your bot, start here. The subject areas on the left are walk-throughs for implementing/doing each thing.
Docs: Design. Useful for figuring out how to design an aspect of your bot, from a UX standpoint.
Docs: Debug a Bot. How to test your bot in Botframework Emulator and debug your code.
C# Reference. If you're not sure what one of the classes does (e.g.
ActivityHandler
), this is a good place to look to see what it does and what its parameter requirements are.Dotnet SDK Repo. If you really need to dig into what a particular Class does, go into
/libraries
and then the appropriate folder to read the actual files for something likeActivityHandler
. Many of them are well-commented if you need a deeper understanding.
Important Note: The Samples repo is undergoing a major update. Some of the docs may not accurately reflect the code in the samples. For the most part, the samples in the master
branch should be fine. However, you may wish to use samples from the samples-work-in-progress branch.
回答2:
Lots of step-by-step guides out there that help you build and deploy bots from start to end. This one I liked myself: Microsoft Bot Framework v4 Node. This guy uses Node.js for his bot
来源:https://stackoverflow.com/questions/55598628/in-which-file-i-insert-the-sample-code-from-the-microsoft-documentation-of-the-a