Aiui 0.5.0

dotnet add package Aiui --version 0.5.0
NuGet\Install-Package Aiui -Version 0.5.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="Aiui" Version="0.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aiui --version 0.5.0
#r "nuget: Aiui, 0.5.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.
// Install Aiui as a Cake Addin
#addin nuget:?package=Aiui&version=0.5.0

// Install Aiui as a Cake Tool
#tool nuget:?package=Aiui&version=0.5.0

AI as User Interface

Build Status Aiui

Demo video

This project aims to facilitate the creation of a new type of user interface for line of business applications. It will allow users to query data in their application using natural language and lower the barrier of accessing and analyzing data. This is similar to how most applications let users export data as excel files to do further analysis on their own.

Live demo: https://aiui.azurewebsites.net

Usage

  1. Install the NuGet package

  2. In the Program.cs, register the Aiui.

using Aiui;
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddAiui(new AiuiOptions
{
    Client = new OpenAIClient(builder.Configuration.GetValue<string>("OpenApiKey")),
    Plugins =
    [
        new SqlListPlugin(builder.Configuration.GetConnectionString("SqlServer")!, ["Categories", "Products"]
        new ChartJsPlugin(),
    ]
});
  1. Pass user's prompt and chat history to the BotService.
[HttpPost("")]
public async Task<IActionResult> Index(string prompt, List<string> chatHistory)
{
    var executionResult = await _botService.ExecutePromptAsync(prompt, chatHistory, null);

    return View(executionResult);
}
  1. You can optionally use the Chart.js plugin to draw charts.
[HttpPost("")]
public async Task<IActionResult> Chart(string prompt, List<string> chatHistory, List<dynamic> rows)
{
    var executionResult = await _botService.ExecutePromptAsync(prompt, chatHistory, rows);

    return View(executionResult);
}

Build

Install the required .NET SDK.

Run:

$ dotnet build
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
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.5.0 157 12/17/2023
0.4.0 132 7/15/2023
0.3.0 126 6/10/2023
0.2.0 115 5/31/2023
0.1.0 100 5/13/2023