Skip to content
/ Aiui Public

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 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.

Notifications You must be signed in to change notification settings

ctyar/Aiui

Repository files navigation

AI as User Interface

Build Status Aiui

demo.mp4

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.

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

About

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 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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published