Giter VIP home page Giter VIP logo

teamsaibot's Introduction

Teams AI Bot with Azure OpenAI ChatGPT

This simple Bot is developed using Teams Toolkit (TypeScript). As a sample project, it is integrated Azure OpenAI ChatGPT service through an Azure Function.

image

How to build

  1. git clone the project
  2. Open it in VS Code, the VS Code should install latest (05/17/2023) Teams Toolkit extension.
  3. Modify toolkitbot230613 to a different name in templates/azure/azure.parameters.dev.json
  4. Provision the project to Azure
  5. Publish the Azure Fucntion in VS Code from below github project:

https://github.com/freistli/chatgpt-api/tree/main/demos/demo-azure-chatgpt-function

After publishing it, configure below three variables in Azure Function Application Settings:

AZURE_OPENAI_API_KEY
AZURE_OPENAI_API_BASE
CHATGPT_DEPLOY_NAME

Copy the Azure Function URL for step 5.

  1. Add below varaibles in the /bot/.env.teamsfx.local for local debutg:
# Following variables can be customized or you can add your owns.
# FOO=BAR
Azure_ChatGPT_Function_Url=https://<azure chatgpt function url got from step 4>
BOT_APPINSIGHTS_INSTRUMENTATIONKEY=xxxxxxxxx
BOT_APPINSIGHTS_CONNECTIONSTRING=xxxxxxxxxx
  1. Now you can local test the Bot in Teams or publish it to Azure.

After published to Azure, please explicitly add below varaibles in Application Settings of the bot web app service:

Azure_ChatGPT_Function_Url
BOT_APPINSIGHTS_INSTRUMENTATIONKEY
BOT_APPINSIGHTS_CONNECTIONSTRING

More Info

For express deployment Teams AI ChatGPT Bot, and Teams specific features with ChatGPT, LLMs integration, can check:

https://github.com/freistli/rootbot

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.