Git Product home page Git Product logo

goat-bot's Introduction

Goat Bot

A silly but functional demo of the Microsoft Bot Framework.
This project consists of two apps and their source:

  • Bot - Main restful bot application written using the Bot Framework SDK and Node.js
  • Site - A simple Node.js Express site called 'Goat Info Central' to host the goat bot web chat client.

Goat Bot Functionality

The Goat Bot demonstrates several capabilities:

  • The Microsoft Bot Framework and SDK
  • Use of advanced cognitive services for image recognition
  • Bot Framework web chat client integration
  • Hosting in Azure platform services (PaaS web apps) via templates and automated deployment

Screenshots

chat1

Pre Requisites

Register a new bot and associated Microsoft app id. Do this from the Bot Framework site

Follow the steps on the page to create the bot and associated MS app id, make a note of the app id and password. Also make a note of the bot handle you used, don't worry about the endpoint now this will be changed later

Running the bot locally

MICROSOFT_APP_ID = <app_id>
MICROSOFT_APP_PASSWORD = <app_password>
MICROSOFT_VISION_API_KEY = <api_key>
MICROSOFT_VISION_API_REGION = <api_region>
  • Run the bot
cd bot
npm install
node app.js
  • Point the emulator at http://localhost:3978/api/messages and fill in your app id and password
  • Chat away!

Note. The website part of this project can be run locally too, however it requires a working external bot endpoint (i.e. one running in Azure, can not me localhost) for the webchat to work.

Running in Azure

  • Deploy via the supplied template and 'Deploy To Azure' button found here on Github
  • Supply your existing bot handle, MS app id and password.
    The 'web Site Name' and 'botSiteName' parameters are the names of the new Azure Web Apps that will be deployed, pick globally unique names
  • Once deployed, edit your bot details and modify the 'Messaging endpoint' to point at your Azure web app hosting the bot, it will need to be suffixed with /api/messages and start with https not http, e.g. https://goatbotbc.azurewebsites.net/api/messages
  • Test the bot from the bot details page
  • To configure the web chat client on the deployed website
    • Click 'Edit' over on the left of the Web Chat channel section
    • Add a new site (call it anything)
    • Then click 'Show' on one of the secret keys and copy the value
    • In the Azure portal find your Web App hosting the site (not the bot)
    • Click into 'Application Settings'
    • Edit the app setting called 'BOT_WEBCHAT_SECRET' and update the value with the secret

goat-bot's People

Contributors

benc-uk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vijayraavi

goat-bot's Issues

Template is faling and found two issues

  1. parameter for bot name was not defined. Hence went ahead and added it
  2. I am still getting this issue even after I fixed that issue. I tried using Deploy Azure option also, its failing with the same issue

11:31:10 AM - Error: Code=InvalidTemplate; Message=Deployment template validation
11:31:10 - failed: 'The resource '/subscriptions/8111f0ee-644a-406a-8f1c-88cd7a4a8f84/resourceGroups/BotAppCreation-1/providers/Mi
11:31:10 - crosoft.Web/sites/botdemo-bot7/sourcecontrols/web' at line '163' and column '14' doesn't depend on parent resource '/su
11:31:10 - bscriptions/8111f0ee-644a-406a-8f1c-88cd7a4a8f84/resourceGroups/BotAppCreation-1/providers/Microsoft.Web/sites/botdemo-
11:31:10 - bot7'. Please add dependency explicitly using the 'dependsOn' syntax. Please see
11:31:10 - https://aka.ms/arm-template/#resources for usage details.'.

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.