ThinkBase.Blazor.Chat 1.0.10

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

ThinkBase Blazor Chat

This is a blazor component that implements a chat conversation, consuming an IChatClient as defined in Microsoft.Extensions.ai. It is based on the Chat code in this example. This component can display responses that are plain text, Markdown and Adaptive Cards.

There is also a debug facility that can record a series of responses and replay them.

Usage

The component uses Blazor FluentUI.

You will need to follow the instructions here to add the FluentUI styles and scripts to your project: FluentUI Blazor.

You will need to follow the instructions here to support dialogs to add support for dialogs.

Debug Mode

The component has a debug mode that can be enabled by setting the DebugMode property to true. In this mode, you can record a series of responses and replay them later. This is useful for testing and debugging your chat interactions.

In order to use it you can implement an interface of the following form:


    public interface IDebugHistoryStore
    {
        
        Task SaveHistory(List<ChatMessage> history, string name);
        
        Task<List<string>> GetAllHistoryNames();
 
        void ClearHistory();

        Task<List<ChatMessage>> GetNamedHistory(string name);

        Task<List<ChatMessage>> GetCurrentHistory();

        Task SetCurrentHistory(List<ChatMessage>? history);

    }

An example implementation is provided in the DebugHistoryStore class. You can use this class to save and retrieve chat history from browser local storage.

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

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.10 12 8/2/2025
1.0.9 32 8/1/2025
1.0.8 46 8/1/2025