MeshWeaver.AI 2.3.0

dotnet add package MeshWeaver.AI --version 2.3.0
                    
NuGet\Install-Package MeshWeaver.AI -Version 2.3.0
                    
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="MeshWeaver.AI" Version="2.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MeshWeaver.AI" Version="2.3.0" />
                    
Directory.Packages.props
<PackageReference Include="MeshWeaver.AI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MeshWeaver.AI --version 2.3.0
                    
#r "nuget: MeshWeaver.AI, 2.3.0"
                    
#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.
#:package MeshWeaver.AI@2.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MeshWeaver.AI&version=2.3.0
                    
Install as a Cake Addin
#tool nuget:?package=MeshWeaver.AI&version=2.3.0
                    
Install as a Cake Tool

MeshWeaver.AI

Overview

MeshWeaver.AI provides AI integration capabilities for the MeshWeaver framework, enabling AI-powered features and services within your applications. This library connects MeshWeaver applications with Azure OpenAI and other AI services for natural language processing, content generation, and intelligent assistance.

Features

  • AI Service Integration: Connect to Azure OpenAI and other AI services
  • Chat Functionality: Built-in support for chat completions and conversations
  • Function Calling: Execute functions directly from AI models
  • Progress Tracking: Real-time AI operation progress monitoring
  • Credential Management: Secure management of AI service credentials
  • Custom Model Support: Configure and use different AI models based on requirements

Usage

Basic Configuration

// In Program.cs or Startup.cs
using MeshWeaver.AI;

var builder = WebApplication.CreateBuilder(args);

// Add AI services to the DI container
builder.Services.AddAI(config => config
    .WithSystemPrompt("You are a helpful assistant.")
    .WithModels("gpt-4.1-mini", "o3-mini"));

// Configure AI credentials
builder.Services.Configure<AICredentialsConfiguration>(builder.Configuration.GetSection("AI"));

Using the Chat Service

public class MyService
{
    private readonly IChatService _chatService;

    public MyService(IChatService chatService)
    {
        _chatService = chatService;
    }

    public async Task<string> GetAIResponse(string userMessage)
    {
        var client = _chatService.Get();
        var response = await client.CompleteChat(userMessage);
        return response;
    }
}

Configuration

The AI services require proper configuration in your application's settings:

{
  "AI": {
    "Url": "https://your-azure-openai-endpoint.com",
    "ApiKey": "your-api-key-here",
    "Models": ["o3-mini"]
  }
}

Integration with MeshWeaver

  • Works with MeshWeaver.Messaging.Hub for message-based AI operations
  • Integrates with MeshWeaver.Blazor.Chat for UI components
  • Compatible with both monolithic and Orleans hosting
  • Supports real-time updates through MeshWeaver layout system

See Also

Refer to the main MeshWeaver documentation for more information about the overall architecture.

Product Compatible and additional computed target framework versions.
.NET 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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on MeshWeaver.AI:

Package Downloads
MeshWeaver.AI.Application

Package Description

MeshWeaver.Blazor.Chat

Package Description

MeshWeaver.AI.AzureOpenAI

Package Description

MeshWeaver.AI.AzureFoundry

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.0 176 8/4/2025
2.2.0 440 7/21/2025