Microsoft.Extensions.AI
9.1.0-preview.1.25064.3
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.Extensions.AI --version 9.1.0-preview.1.25064.3
NuGet\Install-Package Microsoft.Extensions.AI -Version 9.1.0-preview.1.25064.3
<PackageReference Include="Microsoft.Extensions.AI" Version="9.1.0-preview.1.25064.3" />
paket add Microsoft.Extensions.AI --version 9.1.0-preview.1.25064.3
#r "nuget: Microsoft.Extensions.AI, 9.1.0-preview.1.25064.3"
// Install Microsoft.Extensions.AI as a Cake Addin #addin nuget:?package=Microsoft.Extensions.AI&version=9.1.0-preview.1.25064.3&prerelease // Install Microsoft.Extensions.AI as a Cake Tool #tool nuget:?package=Microsoft.Extensions.AI&version=9.1.0-preview.1.25064.3&prerelease
Microsoft.Extensions.AI
Provides utilities for working with generative AI components.
Install the package
From the command-line:
dotnet add package Microsoft.Extensions.AI
Or directly in the C# project file:
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI" Version="[CURRENTVERSION]" />
</ItemGroup>
Usage Examples
Please refer to the README for the Microsoft.Extensions.AI.Abstractions package.
Feedback & Contributing
We welcome feedback and contributions in our GitHub repo.
Running the integration tests
If you're working on this repo and want to run the integration tests, e.g., those in Microsoft.Extensions.AI.OpenAI.Tests
, you must first set endpoints and keys. You can either set these as environment variables or - better - using .NET's user secrets feature as shown below.
Configuring OpenAI tests (OpenAI)
Run commands like the following. The settings will be saved in your user profile.
cd test/Libraries/Microsoft.Extensions.AI.Integration.Tests
dotnet user-secrets set OpenAI:Mode OpenAI
dotnet user-secrets set OpenAI:Key abcdefghijkl
Optionally also run the following. The values shown here are the defaults if you don't specify otherwise:
dotnet user-secrets set OpenAI:ChatModel gpt-4o-mini
dotnet user-secrets set OpenAI:EmbeddingModel text-embedding-3-small
Configuring OpenAI tests (Azure OpenAI)
Run commands like the following. The settings will be saved in your user profile.
cd test/Libraries/Microsoft.Extensions.AI.Integration.Tests
dotnet user-secrets set OpenAI:Mode AzureOpenAI
dotnet user-secrets set OpenAI:Endpoint https://YOUR_DEPLOYMENT.openai.azure.com/
dotnet user-secrets set OpenAI:Key abcdefghijkl
Optionally also run the following. The values shown here are the defaults if you don't specify otherwise:
dotnet user-secrets set OpenAI:ChatModel gpt-4o-mini
dotnet user-secrets set OpenAI:EmbeddingModel text-embedding-3-small
Your account must have models matching these names.
Configuring Azure AI Inference tests
Run commands like the following. The settings will be saved in your user profile.
cd test/Libraries/Microsoft.Extensions.AI.Integration.Tests
dotnet user-secrets set AzureAIInference:Endpoint https://YOUR_DEPLOYMENT.azure.com/
dotnet user-secrets set AzureAIInference:Key abcdefghijkl
Optionally also run the following. The values shown here are the defaults if you don't specify otherwise:
dotnet user-secrets set AzureAIInference:ChatModel gpt-4o-mini
dotnet user-secrets set AzureAIInference:EmbeddingModel text-embedding-3-small
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.Extensions.AI.Abstractions (>= 9.1.0-preview.1.25064.3)
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.1)
- System.Diagnostics.DiagnosticSource (>= 9.0.1)
- System.Text.Json (>= 9.0.1)
- System.Threading.Channels (>= 9.0.1)
-
.NETStandard 2.0
- Microsoft.Extensions.AI.Abstractions (>= 9.1.0-preview.1.25064.3)
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.1)
- System.Diagnostics.DiagnosticSource (>= 9.0.1)
- System.Text.Json (>= 9.0.1)
- System.Threading.Channels (>= 9.0.1)
-
net8.0
- Microsoft.Extensions.AI.Abstractions (>= 9.1.0-preview.1.25064.3)
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.1)
- System.Diagnostics.DiagnosticSource (>= 9.0.1)
- System.Text.Json (>= 9.0.1)
- System.Threading.Channels (>= 9.0.1)
-
net9.0
- Microsoft.Extensions.AI.Abstractions (>= 9.1.0-preview.1.25064.3)
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.1)
- System.Diagnostics.DiagnosticSource (>= 9.0.1)
- System.Text.Json (>= 9.0.1)
- System.Threading.Channels (>= 9.0.1)
NuGet packages (25)
Showing the top 5 NuGet packages that depend on Microsoft.Extensions.AI:
Package | Downloads |
---|---|
Microsoft.SemanticKernel.Connectors.Ollama
Semantic Kernel connector for Ollama. Contains services for text generation, chat completion and text embeddings. |
|
CommunityToolkit.Aspire.OllamaSharp
A .NET Aspire client integration for the OllamaSharp library. |
|
Microsoft.SemanticKernel.Connectors.AzureAIInference
Semantic Kernel Model as a Service connectors for Azure AI Studio. Contains clients for chat completion, embeddings and text to image generation. |
|
skUnit
A semantic unit testing engine for OpenAI and SemanticKernel plugins. |
|
XiHan.Framework.AI
曦寒框架人工智能库 |
GitHub repositories (11)
Showing the top 5 popular GitHub repositories that depend on Microsoft.Extensions.AI:
Repository | Stars |
---|---|
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
|
|
dotnet/eShop
A reference .NET application implementing an eCommerce site
|
|
dotnet/aspire
Tools, templates, and packages to accelerate building observable, production-ready apps
|
|
getcellm/cellm
Use LLMs in Excel formulas
|
|
dotnet/ai-samples
|
Version | Downloads | Last updated |
---|---|---|
9.3.0-preview.1.25114.11 | 1,188 | 2/16/2025 |
9.1.0-preview.1.25064.3 | 20,098 | 1/14/2025 |
9.0.1-preview.1.24570.5 | 48,849 | 11/21/2024 |
9.0.0-preview.9.24556.5 | 20,633 | 11/12/2024 |
9.0.0-preview.9.24525.1 | 23,090 | 10/26/2024 |
9.0.0-preview.9.24507.7 | 9,064 | 10/8/2024 |