Nonprofit Virtual Assistant is a Teams-based Virtual Assistant for nonprofit organizations, powered by OpenAI services. With the Nonprofit Virtual Assistant, nonprofit organizations can take advantage of the advanced language capabilities of OpenAI to simplify internal workflows and deepen their connection with their communities, patrons, donors, and stakeholders more effectively than ever before. The assistant will focus on generating four essential letters: Funding Request Letter, In-Kind Donation Request Letter, Urgent Appeal Letter, and Volunteer Recruitment Letter.
237420723-5a47aad4-9bc0-42b6-bddd-bf4e897e7a85.mp4
- OpenAI API account
- Azure resource group with rights to resource creation
- Install Visual Studio 2022 (version 17.3+)
- Install Teams Toolkit for Visual Studio
- ngrok (needed for local debugging only)
- Clone the repo.
git clone https://github.com/microsoft/NonprofitVirtualAssistant.git
-
Add an environment variable named
OPENAI_KEYand set its value as the api key you get from OpenAI API portal. -
Launch Visual Studio
- From a Developer Command Prompt for Visual Studio you can do the following to launch Visual Studio with the environment variable set:
set OPENAI_KEY=<YOUR API KEY> devenv -
Open the solution csharp/NonprofitVirtualAssistant.sln. Right click on the project and make sure you have the Teams Toolkit menu option:
- Then follow the steps below for local or cloud deployment. If desired, you can skip the steps for local and provision to the cloud directly.
- Start ngrok in a terminal:
ngrok http 5130. - Open solution in Visual Studio.
- Right click project > Teams Toolkit > Prepare Teams App Depndencies.
- If prompted, sign in with a Microsoft 365 account for the Teams organization you want to install the app to.
- Run/Debug (F5) to launch the project in Visual Studio.
- In the launched browser, select the Add button to load the app in Teams.
- Open solution in Visual Studio.
- Right click project > Teams Toolkit > Provision in the Cloud.
- If prompted, sign in with a Microsoft 365 account for the Teams organization you want to install the app to.
- Choose a subscription and resource group to provision the resources, wait till provisioning is complete.
- Right click project > Teams Toolkit > Deploy to the Cloud.
- Right click project > Teams Toolkit > Zip App Package > For Azure.
- Find the generated zip in the build folder alongside project and upload it to Teams as a custom app.
You can share/commit the generated azure.parameters.env.json file if you want to share the cloud provisioning details.
- You can use an existing Azure bot for deployment. Find instructions on how to do it here.
- The bot was developed on Windows using Visual Studio. However, there aren’t any Visual Studio-specific dependencies, so you can use the Teams toolkit on VS Code as well if you so wish.
Although the app was tested with both GPT-3.5 and GPT-4, GPT-4 is recommended for optimal performance.
The app functions with both OpenAI or Azure Open AI. The repo currently uses OpenAI. If you have access to Azure OpenAI, it is recommended to make the switch in the API call and also skip the call to OpenAI Moderation API. Request access to Azure OpenAI.
