Skip to content

Azure OpenAI ChatGPT Bot for Teams. Built by Teams Toolkit

Notifications You must be signed in to change notification settings

freistli/TeamsAIBot

Repository files navigation

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

About

Azure OpenAI ChatGPT Bot for Teams. Built by Teams Toolkit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages