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
<PackageReference Include="Sysinfocus.AspNetCore.Components.AIChat" Version="0.0.0.3" />
<PackageVersion Include="Sysinfocus.AspNetCore.Components.AIChat" Version="0.0.0.3" />
<PackageReference Include="Sysinfocus.AspNetCore.Components.AIChat" />
paket add Sysinfocus.AspNetCore.Components.AIChat --version 0.0.0.3
#r "nuget: Sysinfocus.AspNetCore.Components.AIChat, 0.0.0.3"
#:package Sysinfocus.AspNetCore.Components.AIChat@0.0.0.3
#addin nuget:?package=Sysinfocus.AspNetCore.Components.AIChat&version=0.0.0.3
#tool nuget:?package=Sysinfocus.AspNetCore.Components.AIChat&version=0.0.0.3
Sysinfocus.AspNetCore.Components.AIChat
An AI chat component which is part of Sysinfocus simple/ui library.
Setup Instructions
Download the NuGet package
Sysinfocus.AspNetCore.Components.AIChat
to your project. Note: This depends upon theSysinfocus.AspNetCore.Components
library.Add
@using Sysinfocus.AspNetCore.Components.AIChat
to your_import.razor
file.Add
builder.Services.AddSysinfocus(false);
to yourProgram.cs
file.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" />
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(); } }
This component requires Interactivity either Server or WebAssembly to works.
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 ofAIChatResponseChoiceMessage
object. - Added
OnError
event handler to handle error message. - Added
IsHeadless
parameter andSendAsync
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 | Versions 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. |
-
net8.0
- Markdig.Signed (>= 0.38.0)
- Microsoft.AspNetCore.Components.Web (>= 8.0.12)
- Sysinfocus.AspNetCore.Components (>= 0.0.2.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Check the release notes @ https://blazor.art/