Sysinfocus.AspNetCore.Components.AIChat 0.0.0.3

dotnet add package Sysinfocus.AspNetCore.Components.AIChat --version 0.0.0.3
                    
NuGet\Install-Package Sysinfocus.AspNetCore.Components.AIChat -Version 0.0.0.3
                    
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="Sysinfocus.AspNetCore.Components.AIChat" Version="0.0.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sysinfocus.AspNetCore.Components.AIChat" Version="0.0.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Sysinfocus.AspNetCore.Components.AIChat" />
                    
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 Sysinfocus.AspNetCore.Components.AIChat --version 0.0.0.3
                    
#r "nuget: Sysinfocus.AspNetCore.Components.AIChat, 0.0.0.3"
                    
#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 Sysinfocus.AspNetCore.Components.AIChat@0.0.0.3
                    
#: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=Sysinfocus.AspNetCore.Components.AIChat&version=0.0.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Sysinfocus.AspNetCore.Components.AIChat&version=0.0.0.3
                    
Install as a Cake Tool

Sysinfocus.AspNetCore.Components.AIChat

An AI chat component which is part of Sysinfocus simple/ui library.

Setup Instructions

  1. Download the NuGet package Sysinfocus.AspNetCore.Components.AIChat to your project. Note: This depends upon the Sysinfocus.AspNetCore.Components library.

  2. Add @using Sysinfocus.AspNetCore.Components.AIChat to your _import.razor file.

  3. Add builder.Services.AddSysinfocus(false); to your Program.cs file.

  4. Add the following CSS to your project's appropriate file as this depends upon the type of project being used.

    /// For .NET 8
    <link rel="stylesheet" href="_content/Sysinfocus.AspNetCore.Components/styles.css" />
    <link rel="stylesheet" href="_content/Sysinfocus.AspNetCore.Components/Sysinfocus.AspNetCore.Components.bundle.scp.css" />
    <link rel="stylesheet" href="_content/Sysinfocus.AspNetCore.Components.AIChat/Sysinfocus.AspNetCore.Components.AIChat.bundle.scp.css" />
    
    /// For .NET 9
    <link rel="stylesheet" href="@Assets["_content/Sysinfocus.AspNetCore.Components/styles.css"]" />
    <link rel="stylesheet" href="@Assets["_content/Sysinfocus.AspNetCore.Components/Sysinfocus.AspNetCore.Components.bundle.scp.css"]" />
    <link rel="stylesheet" href="@Assets["_content/Sysinfocus.AspNetCore.Components.AIChat/Sysinfocus.AspNetCore.Components.AIChat.bundle.scp.css"]" />
    
    /// For .NET 9 - if UI is initialized in .html page
    <link rel="stylesheet" href="_content/Sysinfocus.AspNetCore.Components/styles.css" />
    <link rel="stylesheet" href="_content/Sysinfocus.AspNetCore.Components/Sysinfocus.AspNetCore.Components.bundle.scp.css" />
    <link rel="stylesheet" href="_content/Sysinfocus.AspNetCore.Components.AIChat/Sysinfocus.AspNetCore.Components.AIChat.bundle.scp.css" />
    
  5. Add the following initialization code to your MainLayout.razor or any layout file which you host the components.

    @inherits LayoutComponentBase
    @inject Initialization init
    
    <div @onclick="init.HandleMainLayoutClickEvent"> // this is required for some components to close on click outside of its hosting component.
      @Body
    </div>
    
    @code
    {
      protected override async Task OnAfterRenderAsync(bool firstRender)
      {
        // This initializes the theme for the components.
        // Then you can use init.ToggleTheme() to toggle between light and dark modes.    
        if (firstRender) await init.InitializeTheme(); 
      }
    }
    
  6. This component requires Interactivity either Server or WebAssembly to works.

  7. To see the demo of each component, check out Demo

Releases

Version 0.0.0.2

  • Added OnResult event handler to handle output in an array of AIChatResponseChoiceMessage object.
  • Added OnError event handler to handle error message.
  • Added IsHeadless parameter and SendAsync method to use it without UI.

Version 0.0.0.1

  • First release with Chat UI
  • Compatible with any OpenAI API specifications

Have issues?

Open an issue on this repo or email to issues@sysinfocus.com

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.  net9.0 was computed.  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

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
0.0.0.3 81 5/10/2025
0.0.0.2 198 3/23/2025
0.0.0.1 153 2/25/2025

Check the release notes @ https://blazor.art/