Microsoft Introduces Unified .NET API For AI
Written by Kay Ewbank   
Monday, 14 October 2024

Microsoft has introduced new libraries for integrating AI services into .NET applications and libraries, along with middleware for adding key capabilities.

The libraries are the latest additions by Microsoft for developers wanting to include AI services into their apps, alongside recent additions such as the OpenAI library for .NET and the AI Toolkit for Visual Studio Code.

net2

The two new libraries are Microsoft.Extensions.AI.Abstractions and Microsoft.Extensions.AI libraries. Microsoft.Extensions.AI is described as a set of core .NET libraries developed in collaboration with developers across the .NET ecosystem, including Semantic Kernel. The libraries provide a unified layer of C# abstractions for interacting with AI services, such as small and large language models (SLMs and LLMs), embeddings, and middleware.

Microsoft says it is not planning to release APIs tailored for the services of any specific provider. The aim is to create abstractions that can be implemented by various services, all adhering to the same core concepts. Writing about the new libraries on the .NET blog, Luis Quintanilla, a Microsoft program manager working on machine learning for .NET, said:

"Our goal is to act as a unifying layer within the .NET ecosystem, enabling developers to choose their preferred frameworks and libraries while ensuring seamless integration and collaboration across the ecosystem."

Microsoft.Extensions.AI offers a unified API abstraction for AI services, similar to Microsoft's existing logging and dependency injection (DI) abstractions. The goal is to provide standard implementations for caching, telemetry, tool calling, and other common tasks that work with any provider.

Microsoft says the common abstractions for AI services make it easy to use idiomatic C# code for different scenarios with minimal code changes, while service-specific APIs remain accessible if needed, allowing consumers to code against the standard abstractions and pass through to proprietary APIs only when required.

The current preview comes with reference implementations for OpenAI, Azure AI Inference and Ollama, but Microsoft intends to work with other package authors so that implementations of these Microsoft.Extensions.AI abstractions end up being part of the respective client libraries rather than requiring installation of additional packages.

The Microsoft.Extensions.AI.Abstractions and Microsoft.Extensions.AI libraries are available in preview  now.

net2

More Information

Microsoft.Extensions.AI.AzureAIInference

Microsoft.Extensions.AI.OpenAI

Microsoft.Extensions.AI.Ollama

Related Articles

Azure Data Box Improves Offline Data Migration

Microsoft Goes All Out On Generative AI

Azure AI And Pgvector Run Generative AI Directly On Postgres

Microsoft Updates Azure Cognitive Services

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Run C From JavaScript
25/09/2024

The serverside JavaScript engine Bun has a new trick. You supply it a C file and it will let you call C functions from JavaScript. Genius or insane?



Office Development Kit For VS Code
18/09/2024

Microsoft has released a preview version of a new development tool for developing Office add-ins in Visual Studio Code.


More News

kotlin book

 

Comments




or email your comment to: comments@i-programmer.info