Git Product home page Git Product logo

bikesharing360_botapps's Introduction

BikeSharing360

During our Connect(); event this year we presented 15 demos in Scott Guthrie’s and Scott Hanselman’s keynotes. If you missed the keynotes, you can watch the recording in Channel 9.

This year, we built the technology stack for a fictional company named BikeSharing360, which allows users to rent bikes from one location to another.

BikeSharing360 is a fictitious example of a smart bike sharing system with 10,000 bikes distributed in 650 stations located throughout New York City and Seattle. Their vision is to provide a modern and personalized experience to riders and to run their business with intelligence.

In this demo scenario, we built several apps for both the enterprise and the consumer (bike riders). You can find all other BikeSharing360 repos in the following locations:

BikeSharing360 Azure Bot Apps

BikeSharing360Bot shows how you can help your business grow and scale its customer service abilities through an intelligent bot that can understand customers and know when it might need to involve humans to help more complex issues. This application integrates Language Understanding Intelligent Service (LUIS) to help understand customer intents which then launched into appropriate business flows and promptes users with appropriate and succinct questions to gather details.

Screens

Requirements

You need an Azure subscription to deploy the bot service. Try it for free. This app works with the Azure Bot Service. You can find documentation for Azure Bot Service here.

Setup the bot service

  1. Deploy CustomerServiceApis into Azure (You need a bing map service subscription to make "GetMapWithRoute" api work).
  2. Create a new Azure language understanding bot service. (How)
  3. Setup continuous integration. (How)
  4. Submit the BikeSharing360Bot code into repository.
  5. Sign into https://www.luis.ai and find the application created in step 2.
  6. Click "New App"->"Import Existing Application" and choose luis\BikeSharing360Luis.json. BikeSharing360Luis will be created.
  7. Enter the "BikeSharing360Luis" app. Click "train" button on the left bottom. Then click "publish" on the left. Save the app-id and subscription-key information from the URL.
  8. Go back to the code. Open BikeSharing360LuisDialog.csx. Replace "YourModelId", "YourSubscriptionKey" with the keys you got in step 7.
  9. Submit the code.
  10. Now, you can publish the bot (How) and test it.

How to sign up for Microsoft Azure

You need an Azure account to work with this demo code. You can:

  • Open an Azure account for free Azure subscription. You get credits that can be used to try out paid Azure services. Even after the credits are used up, you can keep the account and use free Azure services and features, such as the Web Apps feature in Azure App Service.
  • Activate Visual Studio subscriber benefits. Your Visual Studio subscription gives you credits every month that you can use for paid Azure services.
  • Not a Visual Studio subscriber? Get a $25 monthly Azure credit by joining Visual Studio Dev Essentials.

Blogs posts

Here's links to blog posts related to this project:

Copyright and license

  • Code and documentation copyright 2016 Microsoft Corp. Code released under the MIT license.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

bikesharing360_botapps's People

Contributors

bradygaster avatar erikaehrli avatar madenwala avatar microsoft-github-policy-service[bot] avatar xiangyan99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bikesharing360_botapps's Issues

LUIS Intents alignment with Cognitive Kiosk Application

In Cognitive Kiosk Application code, the interactive session leverages LUIS to get the Intents from the authenticated person. The LUIS application to be used is the same as the BotApps repository.

Unfortunately, the code is referencing Intent names that are different from the ones in LUIS application, with the results that the system does noty work as expected until one of the two is manually changed.

Appears a misalignment in versions from C# code to Luis code.

CustomerServiceApi project is empty

Hi,
trying the bot I saw that the project "CurtomerServiceAPi" appears empty, with code alike the following just returning empty/null values. Is there a version with some more code available, at least to replicate the use cases and data used in Connect() keynote?

    [Route("lookupuser")]
    [HttpGet]
    public string LookupUser(string ctype, string value)
    {
        //look up user from the database
        return "";
    }

Trying to run, it just fails with lot of errors

I'm trying to run the code within the on premise Bot Emulator, as per instructions here:

https://docs.botframework.com/en-us/azure-bot-service/manage/debug/

Even when properly configured on LUIS App ID and Azure Luis Key in the code as instructed, I got lot of interpretation errors as per below.

Trying to run within the Azure Bot service directly, it get into an error that I was hoping to fix locally, but errors are way too much, possibly it's just old code?

=[ERRORS]=====

C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(27,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task<List>>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(29,20): error CS0029: Cannot implicitly convert type 'System.Collections.Generic.List' to 'System.Threading.Tasks.Task<System.Collections.Generic.List>'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(48,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(50,20): error CS0029: Cannot implicitly convert type 'GeoLocation' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(69,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(71,20): error CS0029: Cannot implicitly convert type 'GeoLocation' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(50,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(52,20): error CS0029: Cannot implicitly convert type 'User' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(14,19): warning CS0649: Field 'BikeData.serialnumber' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(21,19): warning CS0649: Field 'User.birthDate' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(22,19): warning CS0649: Field 'User.firstName' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(19,19): warning CS0649: Field 'User.userId' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(18,19): warning CS0649: Field 'User.id' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(8,19): warning CS0649: Field 'GeoLocation.latitude' is never assigned to, and will always have its default value 0
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(23,19): warning CS0649: Field 'User.lastName' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(10,19): warning CS0649: Field 'GeoLocation.name' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(20,19): warning CS0649: Field 'User.gender' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(9,19): warning CS0649: Field 'GeoLocation.longitude' is never assigned to, and will always have its default value 0
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(13,19): warning CS0649: Field 'BikeData.bikeid' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(24,19): warning CS0649: Field 'User.skype' is never assigned to, and will always have its default value null
Function compilation error
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(27,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task<List>>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(29,20): error CS0029: Cannot implicitly convert type 'System.Collections.Generic.List' to 'System.Threading.Tasks.Task<System.Collections.Generic.List>'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(48,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(50,20): error CS0029: Cannot implicitly convert type 'GeoLocation' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(69,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(71,20): error CS0029: Cannot implicitly convert type 'GeoLocation' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(50,37): error CS4032: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task<Task>'.
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(52,20): error CS0029: Cannot implicitly convert type 'User' to 'System.Threading.Tasks.Task'
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(14,19): warning CS0649: Field 'BikeData.serialnumber' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(21,19): warning CS0649: Field 'User.birthDate' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(22,19): warning CS0649: Field 'User.firstName' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(19,19): warning CS0649: Field 'User.userId' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(18,19): warning CS0649: Field 'User.id' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(8,19): warning CS0649: Field 'GeoLocation.latitude' is never assigned to, and will always have its default value 0
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(23,19): warning CS0649: Field 'User.lastName' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(10,19): warning CS0649: Field 'GeoLocation.name' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(20,19): warning CS0649: Field 'User.gender' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\GeoLocation.csx(9,19): warning CS0649: Field 'GeoLocation.longitude' is never assigned to, and will always have its default value 0
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\Bike.csx(13,19): warning CS0649: Field 'BikeData.bikeid' is never assigned to, and will always have its default value null
C:\Projects\Git\Repos\BikeSharing360-AzureBot\messages\Backend\User.csx(24,19): warning CS0649: Field 'User.skype' is never assigned to, and will always have its default value null

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.