youtube image
From YouTube: Building a command-line-interface tool designed to answer user queries using Microsoft Graph API

Description

In this 15-minute developer focused demo, Rohan Ankarigari Boda shows combining the power of Microsoft Graph and large language model (LLM) to deliver a powerful wizard – magi. Magi’s three building blocks – command line (LCLI), ChatGPT API and Microsoft Graph. The CLI skeleton is just 16 lines. OpenAI library provides a .NET focused experience. Prompt engineering is key to getting most out of the ChatGPT API. GraphClientFactory makes arbitrary requests to Graph API. A hackathon winning solution.

This PnP Community demo is taken from the weekly Microsoft 365 Platform Community call recorded on April 18, 2023.

Demo Presenter
• Rohan Ankarigari Boda

Supporting materials
• nuget package - System.CommandLine 2.0.0-beta4.22272.1 | https://www.nuget.org/packages/System.CommandLine/2.0.0-beta4.22272.1
• nuget package - OpenAI 1.7.2 - C#/.NET SDK for accessing the OpenAI GPT-3 API, ChatGPT, and DALL-E 2 | https://www.nuget.org/packages/OpenAI/
• nuget package - Microsoft.Graph 5.6.0 | https://www.nuget.org/packages/Microsoft.Graph
• Documentation - System.CommandLine overview | https://learn.microsoft.com/dotnet/standard/commandline/
• Code snippet - Rahtoken/cli.cs - System.CommandLine Example | https://gist.github.com/Rahtoken/45587e6a55f0a7e3fcb45d8eee53b1d4
• Repo – library - C#/.NET SDK for accessing the OpenAI GPT-3 API, ChatGPT, and DALL-E 2 | https://github.com/OkGoDoIt/OpenAI-API-dotnet
• Documentation - Microsoft Graph SDK overview | https://learn.microsoft.com/graph/sdks/sdks-overview
• Documentation - GraphClientFactory Class | https://learn.microsoft.com/dotnet/api/microsoft.graph.graphclientfactory
• Slides – magi | https://www.chotu.me/magi.pdf
• Repo - Code – magi | https://github.com/Rahtoken/magi-msgraph-hackathon

Learn more
• Microsoft 365 Unified Sample gallery - https://aka.ms/community/samples
• Microsoft 365 Platform Community in YouTube - https://aka.ms/community/videos
• Microsoft 365 Platform Community - http://aka.ms/community/home