AzureAI.Community.SK.Connector.GitHub.Models 1.0.1

dotnet add package AzureAI.Community.SK.Connector.GitHub.Models --version 1.0.1                
NuGet\Install-Package AzureAI.Community.SK.Connector.GitHub.Models -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AzureAI.Community.SK.Connector.GitHub.Models" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AzureAI.Community.SK.Connector.GitHub.Models --version 1.0.1                
#r "nuget: AzureAI.Community.SK.Connector.GitHub.Models, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AzureAI.Community.SK.Connector.GitHub.Models as a Cake Addin
#addin nuget:?package=AzureAI.Community.SK.Connector.GitHub.Models&version=1.0.1

// Install AzureAI.Community.SK.Connector.GitHub.Models as a Cake Tool
#tool nuget:?package=AzureAI.Community.SK.Connector.GitHub.Models&version=1.0.1                

Azure AI Community GitHub

AzureAI Community Microsoft Semantic Kernel Connector - GitHub Models

The AzureAI.Community.SK.Connector.GitHub.Models This component provides a simplified way to connect the GitHub Module for developing generative AI applications.

GitHub Module

If you're looking to develop a generative AI application, GitHub Models offers a platform where you can discover and experiment with AI models at no cost.

Building a GitHub Model Connector

In this guide, we will walk you through simplified way to connect the GitHub Module for developing generative AI applications.

Prerequisites

Install AzureAI.Community.SK.Connector.GitHub.Models package from nuget server

Before you begin building the GitHub Connector, make sure you have the following prerequisites in place:

You'll need access rights to connect to the GitHub Module. To obtain these rights, please visit the following URL: https://github.com/marketplace/models. and Please watch this video to learn how to apply and create a token. Here is the URL: https://www.youtube.com/watch?v=RBWadYAQze8

Connector Building Steps

  • modelName: Get this from your GitHub Module.
  • Endpoint: Find this in your GitHub Module.
  • GITHUB_TOKEN: Obtain this from your GitHub account settings page.

Add GitHub Azure OpenAI Model in Kernel Builder

   var builder = Kernel.CreateBuilder()
     .AddGitHubAzureOpenAIChatCompletion(ModelName, Endpoint, GitHubToken);

Add OpenAI Model in Kernel Builder

   var builder = Kernel.CreateBuilder()
     .AddGitHubOpenAIChatCompletion(ModelName, Endpoint, GitHubToken);

MistralAI Model in Kernel Builder

ChatMessageContents

 var mistralAIChatCompletionService = new GitHubMistralAIChatCompletionService(MistralModel, Endpoint, GitHubToken);

 var chatHistory = new ChatHistory
 {
     new ChatMessageContent(AuthorRole.User, "What is the best in TamilNadu?")
 };

 var response = await mistralAIChatCompletionService.GetChatMessageContentsAsync(chatHistory, default);

StreamingChatMessageContents

 var mistralAIChatCompletionService = new GitHubMistralAIChatCompletionService(MistralModel, Endpoint, GitHubToken);

 var chatHistory = new ChatHistory
 {
     new ChatMessageContent(AuthorRole.User, "What is the best in TamilNadu?")
 };

 var response = mistralAIChatCompletionService.GetStreamingChatMessageContentsAsync(chatHistory, default);

await foreach (var content in response)
{
    Console.Write(content);
}

Add Phi3 Model in Kernel Builder

    var builder = Kernel.CreateBuilder()
     .AddGitHubPhi3AIChatCompletion(Config.Phi3Model, Config.Endpoint, Config.GitHubToken);

  var kernel = builder.Build();

Subscribe to the YouTube channel

Learn Microsoft AI to learn more about Microsoft Semantic Kernel and GitHub Models.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 80 9/2/2024
1.0.0 63 9/2/2024