Added the EDI assistant

This commit is contained in:
tsommer committed 2024-12-04 13:49:31 +01:00
1 parent 88026575dd
commit 42fb6cbac0
8 files changed
+112

No files matched your search

@@ -0,0 +1,19 @@
@attribute [Route(Routes.ASSISTANT_EDI)]
@inherits AssistantBaseCore
<MudText Typo="Typo.body1" Class="mb-3">
You can imagine it like this: Hypothetically, when Wikipedia implemented the EDI, it would vectorize
all pages using an embedding method. All of Wikipedia’s data would remain with Wikipedia, including the
vector database (decentralized approach). Then, any AI Studio user could add Wikipedia as a data source to
significantly reduce the hallucination of the LLM in knowledge questions.
</MudText>
<MudText Typo="Typo.body1">
<b>Related links:</b>
</MudText>
<MudList T="string" Class="mb-6">
<MudListItem T="string" Icon="@Icons.Material.Filled.Link" Target="_blank" Href="https://github.com/MindWorkAI/EDI">EDI repository with example implementation in .NET and C#</MudListItem>
<MudListItem T="string" Icon="@Icons.Material.Filled.Link" Target="_blank" Href="https://mindworkai.org/swagger-ui.html">Interactive documentation aka Swagger UI</MudListItem>
</MudList>
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
@@ -0,0 +1,46 @@
using AIStudio.Chat;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Assistants.EDI;
public partial class AssistantEDI : AssistantBaseCore
{
public override Tools.Components Component => Tools.Components.EDI_ASSISTANT;
protected override string Title => "EDI Server";
protected override string Description =>
"""
The EDI is the (E)xternal (D)ata AP(I) for AI Studio. The EDI acts as a contract between decentralized data
sources and AI Studio. The EDI is implemented by the data sources, allowing them to be integrated into AI
Studio later. This means that the data sources assume the server role and AI Studio assumes the client role
of the API. This approach serves to realize a Retrieval-Augmented Generation (RAG) process with external
data.
""";
protected override string SystemPrompt =>
$"""
""";
protected override IReadOnlyList<IButtonData> FooterButtons => [];
protected override string SubmitText => "Create the EDI server";
protected override Func<Task> SubmitAction => () => Task.CompletedTask;
protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
{
SystemPrompt = SystemPrompts.DEFAULT,
};
protected override void ResetFrom()
{
}
protected override bool MightPreselectValues()
{
return false;
}
}