hanfeijp / TeamsAIBot

Azure OpenAI ChatGPT Bot for Teams. Built by Teams Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 Teams Toolkit extension.
  3. Modify toolkitbotf67a4fbot to a different name in .fx/configs/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 .env.teamsfx.local:
# 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


Languages

Language:TypeScript 64.6%Language:Bicep 35.4%