mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 11:33:47 +00:00
Add ERI server assistant (#231)
This commit is contained in:
1 parent
cdf717ad5f
commit
8cbef49d89
76 files changed
+3581
-153
No files matched your search
@@ -106,7 +106,7 @@ public partial class AssistantAgenda : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputContent = string.Empty;
|
||||
this.contentLines.Clear();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<InnerScrolling HeaderHeight="6em">
|
||||
<ChildContent>
|
||||
<MudForm @ref="@(this.form)" @bind-IsValid="@(this.inputIsValid)" @bind-Errors="@(this.inputIssues)" Class="pr-2">
|
||||
<MudForm @ref="@(this.form)" @bind-IsValid="@(this.inputIsValid)" @bind-Errors="@(this.inputIssues)" FieldChanged="@this.TriggerFormChange" Class="pr-2">
|
||||
<MudText Typo="Typo.body1" Align="Align.Justify" Class="mb-6">
|
||||
@this.Description
|
||||
</MudText>
|
||||
@@ -35,11 +35,22 @@
|
||||
<div id="@BEFORE_RESULT_DIV_ID" class="mt-3">
|
||||
</div>
|
||||
|
||||
@if (this.ShowResult && this.resultingContentBlock is not null)
|
||||
@if (this.ShowResult && !this.ShowEntireChatThread && this.resultingContentBlock is not null)
|
||||
{
|
||||
<ContentBlockComponent Role="@(this.resultingContentBlock.Role)" Type="@(this.resultingContentBlock.ContentType)" Time="@(this.resultingContentBlock.Time)" Content="@(this.resultingContentBlock.Content)"/>
|
||||
}
|
||||
|
||||
@if(this.ShowResult && this.ShowEntireChatThread && this.chatThread is not null)
|
||||
{
|
||||
foreach (var block in this.chatThread.Blocks.OrderBy(n => n.Time))
|
||||
{
|
||||
@if (!block.HideFromUser)
|
||||
{
|
||||
<ContentBlockComponent Role="@block.Role" Type="@block.ContentType" Time="@block.Time" Content="@block.Content"/>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<div id="@AFTER_RESULT_DIV_ID" class="mt-3">
|
||||
</div>
|
||||
</ChildContent>
|
||||
|
||||
@@ -4,7 +4,10 @@ using AIStudio.Settings;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
using MudBlazor.Utilities;
|
||||
|
||||
using RustService = AIStudio.Tools.RustService;
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace AIStudio.Assistants;
|
||||
|
||||
@@ -55,7 +58,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
_ => string.Empty,
|
||||
};
|
||||
|
||||
protected abstract void ResetFrom();
|
||||
protected abstract void ResetForm();
|
||||
|
||||
protected abstract bool MightPreselectValues();
|
||||
|
||||
@@ -68,6 +71,8 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
private protected virtual RenderFragment? Body => null;
|
||||
|
||||
protected virtual bool ShowResult => true;
|
||||
|
||||
protected virtual bool ShowEntireChatThread => false;
|
||||
|
||||
protected virtual bool AllowProfiles => true;
|
||||
|
||||
@@ -91,8 +96,10 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
protected MudForm? form;
|
||||
protected bool inputIsValid;
|
||||
protected Profile currentProfile = Profile.NO_PROFILE;
|
||||
|
||||
protected ChatThread? chatThread;
|
||||
|
||||
private readonly Timer formChangeTimer = new(TimeSpan.FromSeconds(1.6));
|
||||
|
||||
private ContentBlock? resultingContentBlock;
|
||||
private string[] inputIssues = [];
|
||||
private bool isProcessing;
|
||||
@@ -101,6 +108,13 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
this.formChangeTimer.AutoReset = false;
|
||||
this.formChangeTimer.Elapsed += async (_, _) =>
|
||||
{
|
||||
this.formChangeTimer.Stop();
|
||||
await this.OnFormChange();
|
||||
};
|
||||
|
||||
this.MightPreselectValues();
|
||||
this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component);
|
||||
this.currentProfile = this.SettingsManager.GetPreselectedProfile(this.Component);
|
||||
@@ -161,7 +175,35 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void TriggerFormChange(FormFieldChangedEventArgs _)
|
||||
{
|
||||
this.formChangeTimer.Stop();
|
||||
this.formChangeTimer.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called after any form field has changed.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This method is called after a delay of 1.6 seconds. This is to prevent
|
||||
/// the method from being called too often. This method is called after
|
||||
/// the user has stopped typing or selecting options.
|
||||
/// </remarks>
|
||||
protected virtual Task OnFormChange() => Task.CompletedTask;
|
||||
|
||||
/// <summary>
|
||||
/// Add an issue to the UI.
|
||||
/// </summary>
|
||||
/// <param name="issue">The issue to add.</param>
|
||||
protected void AddInputIssue(string issue)
|
||||
{
|
||||
Array.Resize(ref this.inputIssues, this.inputIssues.Length + 1);
|
||||
this.inputIssues[^1] = issue;
|
||||
this.inputIsValid = false;
|
||||
this.StateHasChanged();
|
||||
}
|
||||
|
||||
protected void CreateChatThread()
|
||||
{
|
||||
this.chatThread = new()
|
||||
@@ -221,7 +263,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
return time;
|
||||
}
|
||||
|
||||
protected async Task<string> AddAIResponseAsync(DateTimeOffset time)
|
||||
protected async Task<string> AddAIResponseAsync(DateTimeOffset time, bool hideContentFromUser = false)
|
||||
{
|
||||
var aiText = new ContentText
|
||||
{
|
||||
@@ -236,6 +278,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
ContentType = ContentType.TEXT,
|
||||
Role = ChatRole.AI,
|
||||
Content = aiText,
|
||||
HideFromUser = hideContentFromUser,
|
||||
};
|
||||
|
||||
if (this.chatThread is not null)
|
||||
@@ -313,7 +356,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
await this.JsRuntime.ClearDiv(RESULT_DIV_ID);
|
||||
await this.JsRuntime.ClearDiv(AFTER_RESULT_DIV_ID);
|
||||
|
||||
this.ResetFrom();
|
||||
this.ResetForm();
|
||||
this.providerSettings = this.SettingsManager.GetPreselectedProvider(this.Component);
|
||||
|
||||
this.inputIsValid = false;
|
||||
@@ -341,6 +384,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
public void Dispose()
|
||||
{
|
||||
this.MessageBus.Unregister(this);
|
||||
this.formChangeTimer.Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Text;
|
||||
|
||||
using AIStudio.Components;
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Settings.DataModel;
|
||||
|
||||
namespace AIStudio.Assistants.BiasDay;
|
||||
@@ -50,7 +50,7 @@ public partial class BiasOfTheDayAssistant : AssistantBaseCore
|
||||
|
||||
protected override bool ShowReset => false;
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
if (!this.MightPreselectValues())
|
||||
{
|
||||
@@ -124,7 +124,7 @@ public partial class BiasOfTheDayAssistant : AssistantBaseCore
|
||||
{
|
||||
var biasChat = new LoadChat
|
||||
{
|
||||
WorkspaceId = Workspaces.WORKSPACE_ID_BIAS,
|
||||
WorkspaceId = KnownWorkspaces.BIAS_WORKSPACE_ID,
|
||||
ChatId = this.SettingsManager.ConfigurationData.BiasOfTheDay.BiasOfTheDayChatId,
|
||||
};
|
||||
|
||||
@@ -147,7 +147,7 @@ public partial class BiasOfTheDayAssistant : AssistantBaseCore
|
||||
BiasCatalog.ALL_BIAS[this.SettingsManager.ConfigurationData.BiasOfTheDay.BiasOfTheDayId] :
|
||||
BiasCatalog.GetRandomBias(this.SettingsManager.ConfigurationData.BiasOfTheDay.UsedBias);
|
||||
|
||||
var chatId = this.CreateChatThread(Workspaces.WORKSPACE_ID_BIAS, this.biasOfTheDay.Name);
|
||||
var chatId = this.CreateChatThread(KnownWorkspaces.BIAS_WORKSPACE_ID, this.biasOfTheDay.Name);
|
||||
this.SettingsManager.ConfigurationData.BiasOfTheDay.BiasOfTheDayId = this.biasOfTheDay.Id;
|
||||
this.SettingsManager.ConfigurationData.BiasOfTheDay.BiasOfTheDayChatId = chatId;
|
||||
this.SettingsManager.ConfigurationData.BiasOfTheDay.DateLastBiasDrawn = DateOnly.FromDateTime(DateTime.Now);
|
||||
|
||||
@@ -32,7 +32,7 @@ public partial class AssistantCoding : AssistantBaseCore
|
||||
|
||||
protected override Func<Task> SubmitAction => this.GetSupport;
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.codingContexts.Clear();
|
||||
this.compilerMessages = string.Empty;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<MudTextField T="string" @bind-Text="@this.CodingContext.Id" AdornmentIcon="@Icons.Material.Filled.Numbers" Adornment="Adornment.Start" Label="(Optional) Identifier" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
|
||||
<MudStack Row="@true" AlignItems="AlignItems.Center" Class="mb-3">
|
||||
<MudStack Row="@true" Class="mb-3">
|
||||
<MudSelect T="CommonCodingLanguages" @bind-Value="@this.CodingContext.Language" AdornmentIcon="@Icons.Material.Filled.Code" Adornment="Adornment.Start" Label="Language" Variant="Variant.Outlined" Margin="Margin.Dense">
|
||||
@foreach (var language in Enum.GetValues<CommonCodingLanguages>())
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ public partial class AssistantEMail : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputBulletPoints = string.Empty;
|
||||
this.bulletPointsLines.Clear();
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public enum AllowedLLMProviders
|
||||
{
|
||||
NONE,
|
||||
|
||||
ANY,
|
||||
SELF_HOSTED,
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public static class AllowedLLMProvidersExtensions
|
||||
{
|
||||
public static string Description(this AllowedLLMProviders provider)
|
||||
{
|
||||
return provider switch
|
||||
{
|
||||
AllowedLLMProviders.NONE => "Please select what kind of LLM provider are allowed for this data source",
|
||||
AllowedLLMProviders.ANY => "Any LLM provider is allowed: users might choose a cloud-based or a self-hosted provider",
|
||||
AllowedLLMProviders.SELF_HOSTED => "Self-hosted LLM providers are allowed: users cannot choose any cloud-based provider",
|
||||
|
||||
_ => "Unknown option was selected"
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,349 @@
|
||||
@attribute [Route(Routes.ASSISTANT_ERI)]
|
||||
@using AIStudio.Settings.DataModel
|
||||
@using MudExtensions
|
||||
@inherits AssistantBaseCore
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-3">
|
||||
You can imagine it like this: Hypothetically, when Wikipedia implemented the ERI, 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/ERI">ERI 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>
|
||||
|
||||
<PreviewPrototype/>
|
||||
<div class="mb-6"></div>
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mb-3">
|
||||
ERI server presets
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-3">
|
||||
Here you have the option to save different configurations for various ERI servers and switch between them. This is useful if
|
||||
you are responsible for multiple ERI servers.
|
||||
</MudText>
|
||||
|
||||
@if(this.SettingsManager.ConfigurationData.ERI.ERIServers.Count is 0)
|
||||
{
|
||||
<MudText Typo="Typo.body1" Class="mb-3">
|
||||
You have not yet added any ERI server presets.
|
||||
</MudText>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudList Disabled="@this.AreServerPresetsBlocked" T="DataERIServer" Class="mb-1" SelectedValue="@this.selectedERIServer" SelectedValueChanged="@this.SelectedERIServerChanged">
|
||||
@foreach (var server in this.SettingsManager.ConfigurationData.ERI.ERIServers)
|
||||
{
|
||||
<MudListItem T="DataERIServer" Icon="@Icons.Material.Filled.Settings" Value="@server">
|
||||
@server.ServerName
|
||||
</MudListItem>
|
||||
}
|
||||
</MudList>
|
||||
}
|
||||
|
||||
<MudStack Row="@true" Class="mt-1">
|
||||
<MudButton Disabled="@this.AreServerPresetsBlocked" OnClick="@this.AddERIServer" Variant="Variant.Filled" Color="Color.Primary">
|
||||
Add ERI server preset
|
||||
</MudButton>
|
||||
<MudButton OnClick="@this.RemoveERIServer" Disabled="@(this.AreServerPresetsBlocked || this.IsNoneERIServerSelected)" Variant="Variant.Filled" Color="Color.Primary">
|
||||
Delete this server preset
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
|
||||
@if(this.AreServerPresetsBlocked)
|
||||
{
|
||||
<MudText Typo="Typo.body1" Class="mb-3 mt-3">
|
||||
Hint: to allow this assistant to manage multiple presets, you must enable the preselection of values in the settings.
|
||||
</MudText>
|
||||
}
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mb-3 mt-6">
|
||||
Auto save
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-3">
|
||||
The ERI specification will change over time. You probably want to keep your ERI server up to date. This means you might want to
|
||||
regenerate the code for your ERI server. To avoid having to make all inputs each time, all your inputs and decisions can be
|
||||
automatically saved. Would you like this?
|
||||
</MudText>
|
||||
|
||||
@if(this.AreServerPresetsBlocked)
|
||||
{
|
||||
<MudText Typo="Typo.body1" Class="mb-3">
|
||||
Hint: to allow this assistant to automatically save your changes, you must enable the preselection of values in the settings.
|
||||
</MudText>
|
||||
}
|
||||
|
||||
<MudTextSwitch Label="Should we automatically save any input made?" Disabled="@this.AreServerPresetsBlocked" @bind-Value="@this.autoSave" LabelOn="Yes, please save my inputs" LabelOff="No, I will enter everything again or configure it manually in the settings" />
|
||||
|
||||
<hr style="width: 100%; border-width: 0.25ch;" class="mt-6"/>
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mt-6 mb-1">
|
||||
Common ERI server settings
|
||||
</MudText>
|
||||
<MudTextField T="string" Disabled="@this.IsNoneERIServerSelected" @bind-Text="@this.serverName" Validation="@this.ValidateServerName" Immediate="@true" Label="ERI server name" HelperText="Please give your ERI server a name that provides information about the data source and/or its intended purpose. The name will be displayed to users in AI Studio." Counter="60" MaxLength="60" Variant="Variant.Outlined" Margin="Margin.Normal" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3" OnKeyUp="() => this.ServerNameWasChanged()"/>
|
||||
<MudTextField T="string" Disabled="@this.IsNoneERIServerSelected" @bind-Text="@this.serverDescription" Validation="@this.ValidateServerDescription" Immediate="@true" Label="ERI server description" HelperText="Please provide a brief description of your ERI server. Describe or explain what your ERI server does and what data it uses for this purpose. This description will be shown to users in AI Studio." Counter="512" MaxLength="512" Variant="Variant.Outlined" Margin="Margin.Normal" Lines="3" AutoGrow="@true" MaxLines="6" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
|
||||
|
||||
<MudStack Row="@true" Class="mb-3">
|
||||
<MudSelect Disabled="@this.IsNoneERIServerSelected" T="ProgrammingLanguages" @bind-Value="@this.selectedProgrammingLanguage" AdornmentIcon="@Icons.Material.Filled.Code" Adornment="Adornment.Start" Label="Programming language" Variant="Variant.Outlined" Margin="Margin.Dense" Validation="@this.ValidateProgrammingLanguage">
|
||||
@foreach (var language in Enum.GetValues<ProgrammingLanguages>())
|
||||
{
|
||||
<MudSelectItem Value="@language">@language.Name()</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
@if (this.selectedProgrammingLanguage is ProgrammingLanguages.OTHER)
|
||||
{
|
||||
<MudTextField Disabled="@this.IsNoneERIServerSelected" T="string" @bind-Text="@this.otherProgrammingLanguage" Validation="@this.ValidateOtherLanguage" Label="Other language" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||
}
|
||||
</MudStack>
|
||||
|
||||
<MudStack Row="@true" AlignItems="AlignItems.Center" Class="mb-3">
|
||||
<MudSelect Disabled="@this.IsNoneERIServerSelected" T="ERIVersion" @bind-Value="@this.selectedERIVersion" Label="ERI specification version" Variant="Variant.Outlined" Margin="Margin.Dense" Validation="@this.ValidateERIVersion">
|
||||
@foreach (var version in Enum.GetValues<ERIVersion>())
|
||||
{
|
||||
<MudSelectItem Value="@version">@version</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
<MudButton Variant="Variant.Outlined" Size="Size.Small" Disabled="@(!this.selectedERIVersion.WasSpecificationSelected() || this.IsNoneERIServerSelected)" Href="@this.selectedERIVersion.SpecificationURL()" Target="_blank">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Link" Class="mr-2"/> Download specification
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mt-9 mb-3">
|
||||
Data source settings
|
||||
</MudText>
|
||||
|
||||
<MudStack Row="@false" Spacing="1" Class="mb-3">
|
||||
<MudSelect Disabled="@this.IsNoneERIServerSelected" T="DataSources" @bind-Value="@this.selectedDataSource" AdornmentIcon="@Icons.Material.Filled.Dataset" Adornment="Adornment.Start" Label="Data source" Variant="Variant.Outlined" Margin="Margin.Dense" Validation="@this.ValidateDataSource" SelectedValuesChanged="@this.DataSourceWasChanged">
|
||||
@foreach (var dataSource in Enum.GetValues<DataSources>())
|
||||
{
|
||||
<MudSelectItem Value="@dataSource">@dataSource.Name()</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
@if (this.selectedDataSource is DataSources.CUSTOM)
|
||||
{
|
||||
<MudTextField Disabled="@this.IsNoneERIServerSelected" T="string" @bind-Text="@this.otherDataSource" Validation="@this.ValidateOtherDataSource" Label="Describe your data source" Variant="Variant.Outlined" Margin="Margin.Normal" Lines="3" AutoGrow="@true" MaxLines="6" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||
}
|
||||
</MudStack>
|
||||
|
||||
@if(this.selectedDataSource > DataSources.FILE_SYSTEM)
|
||||
{
|
||||
<MudTextField Disabled="@this.IsNoneERIServerSelected" T="string" @bind-Text="@this.dataSourceProductName" Label="Data source: product name" Validation="@this.ValidateDataSourceProductName" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
|
||||
}
|
||||
|
||||
@if (this.NeedHostnamePort())
|
||||
{
|
||||
<div class="mb-3">
|
||||
<MudStack Row="@true">
|
||||
<MudTextField Disabled="@this.IsNoneERIServerSelected" T="string" @bind-Text="@this.dataSourceHostname" Label="Data source: hostname" Validation="@this.ValidateHostname" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||
<MudNumericField Disabled="@this.IsNoneERIServerSelected" Label="Data source: port" Immediate="@true" Min="1" Max="65535" Validation="@this.ValidatePort" @bind-Value="@this.dataSourcePort" Variant="Variant.Outlined" Margin="Margin.Dense" OnKeyUp="() => this.DataSourcePortWasTyped()"/>
|
||||
</MudStack>
|
||||
@if (this.dataSourcePort < 1024)
|
||||
{
|
||||
<MudText Typo="Typo.body2">
|
||||
<b>Warning:</b> Ports below 1024 are reserved for system services. Your ERI server need to run with elevated permissions (root user).
|
||||
</MudText>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mt-9 mb-3">
|
||||
Authentication settings
|
||||
</MudText>
|
||||
|
||||
<MudStack Row="@false" Spacing="1" Class="mb-1">
|
||||
<MudSelectExtended
|
||||
T="Auth"
|
||||
Disabled="@this.IsNoneERIServerSelected"
|
||||
ShrinkLabel="@true"
|
||||
MultiSelection="@true"
|
||||
MultiSelectionTextFunc="@this.GetMultiSelectionAuthText"
|
||||
SelectedValues="@this.selectedAuthenticationMethods"
|
||||
Validation="@this.ValidateAuthenticationMethods"
|
||||
SelectedValuesChanged="@this.AuthenticationMethodWasChanged"
|
||||
Label="Authentication method(s)"
|
||||
Variant="Variant.Outlined"
|
||||
Margin="Margin.Dense">
|
||||
@foreach (var authMethod in Enum.GetValues<Auth>())
|
||||
{
|
||||
<MudSelectItemExtended Value="@authMethod">@authMethod.Name()</MudSelectItemExtended>
|
||||
}
|
||||
</MudSelectExtended>
|
||||
<MudTextField Disabled="@this.IsNoneERIServerSelected" T="string" @bind-Text="@this.authDescription" Label="@this.AuthDescriptionTitle()" Validation="@this.ValidateAuthDescription" Variant="Variant.Outlined" Margin="Margin.Normal" Lines="3" AutoGrow="@true" MaxLines="6" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||
</MudStack>
|
||||
|
||||
@if (this.selectedAuthenticationMethods.Contains(Auth.KERBEROS))
|
||||
{
|
||||
<MudSelect Disabled="@this.IsNoneERIServerSelected" T="OperatingSystem" @bind-Value="@this.selectedOperatingSystem" Label="Operating system on which your ERI will run" Variant="Variant.Outlined" Margin="Margin.Dense" Validation="@this.ValidateOperatingSystem" Class="mb-1">
|
||||
@foreach (var os in Enum.GetValues<OperatingSystem>())
|
||||
{
|
||||
<MudSelectItem Value="@os">@os.Name()</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
}
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mt-11 mb-3">
|
||||
Data protection settings
|
||||
</MudText>
|
||||
|
||||
<MudSelect Disabled="@this.IsNoneERIServerSelected" T="AllowedLLMProviders" @bind-Value="@this.allowedLLMProviders" Label="Allowed LLM providers for this data source" Variant="Variant.Outlined" Margin="Margin.Dense" Validation="@this.ValidateAllowedLLMProviders" Class="mb-1">
|
||||
@foreach (var option in Enum.GetValues<AllowedLLMProviders>())
|
||||
{
|
||||
<MudSelectItem Value="@option">@option.Description()</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mt-11 mb-3">
|
||||
Embedding settings
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-2">
|
||||
You will likely use one or more embedding methods to encode the meaning of your data into a typically high-dimensional vector
|
||||
space. In this case, you will use a vector database to store and search these vectors (called embeddings). However, you don't
|
||||
have to use embedding methods. When your retrieval method works without any embedding, you can ignore this section. An example: You
|
||||
store files on a file server, and your retrieval method works exclusively with file names in the file system, so you don't
|
||||
need embeddings.
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-3">
|
||||
You can specify more than one embedding method. This can be useful when you want to use different embeddings for different queries
|
||||
or data types. For example, one embedding for texts, another for images, and a third for videos, etc.
|
||||
</MudText>
|
||||
|
||||
@if (!this.IsNoneERIServerSelected)
|
||||
{
|
||||
<MudTable Items="@this.embeddings" Hover="@true" Class="border-dashed border rounded-lg">
|
||||
<ColGroup>
|
||||
<col/>
|
||||
<col style="width: 34em;"/>
|
||||
<col style="width: 34em;"/>
|
||||
</ColGroup>
|
||||
<HeaderContent>
|
||||
<MudTh>Name</MudTh>
|
||||
<MudTh>Type</MudTh>
|
||||
<MudTh Style="text-align: left;">Actions</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd>@context.EmbeddingName</MudTd>
|
||||
<MudTd>@context.EmbeddingType</MudTd>
|
||||
<MudTd Style="text-align: left;">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Edit" Class="ma-2" OnClick="() => this.EditEmbedding(context)">
|
||||
Edit
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Error" StartIcon="@Icons.Material.Filled.Delete" Class="ma-2" OnClick="() => this.DeleteEmbedding(context)">
|
||||
Delete
|
||||
</MudButton>
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
|
||||
@if (this.embeddings.Count == 0)
|
||||
{
|
||||
<MudText Typo="Typo.h6" Class="mt-3">No embedding methods configured yet.</MudText>
|
||||
}
|
||||
}
|
||||
|
||||
<MudButton Disabled="@this.IsNoneERIServerSelected" Variant="Variant.Filled" Color="@Color.Primary" StartIcon="@Icons.Material.Filled.AddRoad" Class="mt-3 mb-6" OnClick="@this.AddEmbedding">
|
||||
Add Embedding Method
|
||||
</MudButton>
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mt-6 mb-1">
|
||||
Data retrieval settings
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-2">
|
||||
For your ERI server, you need to retrieve data that matches a chat or prompt in some way. We call this the retrieval process.
|
||||
You must describe at least one such process. You may offer several retrieval processes from which users can choose. This allows
|
||||
you to test with beta users which process works better. Or you might generally want to give users the choice so they can select
|
||||
the process that best suits their circumstances.
|
||||
</MudText>
|
||||
|
||||
@if (!this.IsNoneERIServerSelected)
|
||||
{
|
||||
<MudTable Items="@this.retrievalProcesses" Hover="@true" Class="border-dashed border rounded-lg">
|
||||
<ColGroup>
|
||||
<col/>
|
||||
<col style="width: 34em;"/>
|
||||
</ColGroup>
|
||||
<HeaderContent>
|
||||
<MudTh>Name</MudTh>
|
||||
<MudTh Style="text-align: left;">Actions</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd>@context.Name</MudTd>
|
||||
<MudTd Style="text-align: left;">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Edit" Class="ma-2" OnClick="() => this.EditRetrievalProcess(context)">
|
||||
Edit
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Error" StartIcon="@Icons.Material.Filled.Delete" Class="ma-2" OnClick="() => this.DeleteRetrievalProcess(context)">
|
||||
Delete
|
||||
</MudButton>
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
|
||||
@if (this.retrievalProcesses.Count == 0)
|
||||
{
|
||||
<MudText Typo="Typo.h6" Class="mt-3">No retrieval process configured yet.</MudText>
|
||||
}
|
||||
}
|
||||
|
||||
<MudButton Disabled="@this.IsNoneERIServerSelected" Variant="Variant.Filled" Color="@Color.Primary" StartIcon="@Icons.Material.Filled.AddRoad" Class="mt-3 mb-6" OnClick="@this.AddRetrievalProcess">
|
||||
Add Retrieval Process
|
||||
</MudButton>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-1">
|
||||
You can integrate additional libraries. Perhaps you want to evaluate the prompts in advance using a machine learning method or analyze them with a text
|
||||
mining approach? Or maybe you want to preprocess images in the prompts? For such advanced scenarios, you can specify which libraries you want to use here.
|
||||
It's best to describe which library you want to integrate for which purpose. This way, the LLM that writes the ERI server for you can try to use these
|
||||
libraries effectively. This should result in less rework being necessary. If you don't know the necessary libraries, you can instead attempt to describe
|
||||
the intended use. The LLM can then attempt to choose suitable libraries. However, hallucinations can occur, and fictional libraries might be selected.
|
||||
</MudText>
|
||||
|
||||
<MudTextField Disabled="@this.IsNoneERIServerSelected" T="string" @bind-Text="@this.additionalLibraries" Label="(Optional) Additional libraries" HelperText="Do you want to include additional libraries? Then name them and briefly describe what you want to achieve with them." Variant="Variant.Outlined" Margin="Margin.Normal" Lines="3" AutoGrow="@true" MaxLines="12" UserAttributes="@USER_INPUT_ATTRIBUTES" Class="mb-3"/>
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mt-9 mb-1">
|
||||
Provider selection for generation
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-2">
|
||||
The task of writing the ERI server for you is very complex. Therefore, a very powerful LLM is needed to successfully accomplish this task.
|
||||
Small local models will probably not be sufficient. Instead, try using a large cloud-based or a large self-hosted model.
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-2">
|
||||
<b>Important:</b> The LLM may need to generate many files. This reaches the request limit of most providers. Typically, only a certain number
|
||||
of requests can be made per minute, and only a maximum number of tokens can be generated per minute. AI Studio automatically considers this.
|
||||
<b>However, generating all the files takes a certain amount of time.</b> Local or self-hosted models may work without these limitations
|
||||
and can generate responses faster. AI Studio dynamically adapts its behavior and always tries to achieve the fastest possible data processing.
|
||||
</MudText>
|
||||
|
||||
<ProviderSelection @bind-ProviderSettings="@this.providerSettings" ValidateProvider="@this.ValidatingProvider"/>
|
||||
|
||||
<MudText Typo="Typo.h4" Class="mt-9 mb-1">
|
||||
Write code to file system
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-2">
|
||||
AI Studio can save the generated code to the file system. You can select a base folder for this. AI Studio ensures that no files are created
|
||||
outside of this base folder. Furthermore, we recommend that you create a Git repository in this folder. This way, you can see what changes the
|
||||
AI has made in which files.
|
||||
</MudText>
|
||||
|
||||
<MudText Typo="Typo.body1" Class="mb-2">
|
||||
When you rebuild / re-generate the ERI server code, AI Studio proceeds as follows: All files generated last time will be deleted. All
|
||||
other files you have created remain. Then, the AI generates the new files. <b>But beware:</b> It may happen that the AI generates a
|
||||
file this time that you manually created last time. In this case, your manually created file will then be overwritten. Therefore,
|
||||
you should always create a Git repository and commit or revert all changes before using this assistant. With a diff visualization,
|
||||
you can immediately see where the AI has made changes. It is best to use an IDE suitable for your selected language for this purpose.
|
||||
</MudText>
|
||||
|
||||
<MudTextSwitch Label="Should we write the generated code to the file system?" Disabled="@this.IsNoneERIServerSelected" @bind-Value="@this.writeToFilesystem" LabelOn="Yes, please write or update all generated code to the file system" LabelOff="No, just show me the code" />
|
||||
<SelectDirectory Label="Base directory where to write the code" @bind-Directory="@this.baseDirectory" Disabled="@(this.IsNoneERIServerSelected || !this.writeToFilesystem)" DirectoryDialogTitle="Select the target directory for the ERI server"/>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,9 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public enum Auth
|
||||
{
|
||||
NONE,
|
||||
KERBEROS,
|
||||
USERNAME_PASSWORD,
|
||||
TOKEN,
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public static class AuthExtensions
|
||||
{
|
||||
public static string Name(this Auth auth) => auth switch
|
||||
{
|
||||
Auth.NONE => "No login necessary: useful for public data sources",
|
||||
|
||||
Auth.KERBEROS => "Login by single-sign-on (SSO) using Kerberos: very complex to implement and to operate, useful for many users",
|
||||
Auth.USERNAME_PASSWORD => "Login by username and password: simple to implement and to operate, useful for few users; easy to use for users",
|
||||
Auth.TOKEN => "Login by token: simple to implement and to operate, useful for few users; unusual for many users",
|
||||
|
||||
_ => "Unknown login method"
|
||||
};
|
||||
|
||||
public static string ToPrompt(this Auth auth) => auth switch
|
||||
{
|
||||
Auth.NONE => "No login is necessary, the data source is public.",
|
||||
|
||||
Auth.KERBEROS => "Login by single-sign-on (SSO) using Kerberos.",
|
||||
Auth.USERNAME_PASSWORD => "Login by username and password.",
|
||||
Auth.TOKEN => "Login by static token per user.",
|
||||
|
||||
_ => string.Empty,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public enum DataSources
|
||||
{
|
||||
NONE,
|
||||
CUSTOM,
|
||||
|
||||
FILE_SYSTEM,
|
||||
|
||||
OBJECT_STORAGE,
|
||||
KEY_VALUE_STORE,
|
||||
DOCUMENT_STORE,
|
||||
RELATIONAL_DATABASE,
|
||||
GRAPH_DATABASE,
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public static class DataSourcesExtensions
|
||||
{
|
||||
public static string Name(this DataSources dataSource) => dataSource switch
|
||||
{
|
||||
DataSources.NONE => "No data source selected",
|
||||
DataSources.CUSTOM => "Custom description",
|
||||
|
||||
DataSources.FILE_SYSTEM => "File system (local or network share)",
|
||||
DataSources.OBJECT_STORAGE => "Object storage, like Amazon S3, MinIO, etc.",
|
||||
DataSources.KEY_VALUE_STORE => "Key-Value store, like Redis, etc.",
|
||||
DataSources.DOCUMENT_STORE => "Document store, like MongoDB, etc.",
|
||||
DataSources.RELATIONAL_DATABASE => "Relational database, like MySQL, PostgreSQL, etc.",
|
||||
DataSources.GRAPH_DATABASE => "Graph database, like Neo4j, ArangoDB, etc.",
|
||||
|
||||
_ => "Unknown data source"
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public enum ERIVersion
|
||||
{
|
||||
NONE,
|
||||
|
||||
V1,
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public static class ERIVersionExtensions
|
||||
{
|
||||
public static async Task<string> ReadSpecification(this ERIVersion version, HttpClient httpClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
var url = version.SpecificationURL();
|
||||
var response = await httpClient.GetAsync(url);
|
||||
return await response.Content.ReadAsStringAsync();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static string SpecificationURL(this ERIVersion version)
|
||||
{
|
||||
var nameLower = version.ToString().ToLowerInvariant();
|
||||
var filename = $"{nameLower}.json";
|
||||
return $"specs/eri/{filename}";
|
||||
}
|
||||
|
||||
public static bool WasSpecificationSelected(this ERIVersion version) => version != ERIVersion.NONE;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
/// <summary>
|
||||
/// Represents information about the used embedding for a data source.
|
||||
/// </summary>
|
||||
/// <param name="EmbeddingType">What kind of embedding is used. For example, "Transformer Embedding," "Contextual Word
|
||||
/// Embedding," "Graph Embedding," etc.</param>
|
||||
/// <param name="EmbeddingName">Name the embedding used. This can be a library, a framework, or the name of the used
|
||||
/// algorithm.</param>
|
||||
/// <param name="Description">A short description of the embedding. Describe what the embedding is doing.</param>
|
||||
/// <param name="UsedWhen">Describe when the embedding is used. For example, when the user prompt contains certain
|
||||
/// keywords, or anytime?</param>
|
||||
/// <param name="Link">A link to the embedding's documentation or the source code. Might be null.</param>
|
||||
public readonly record struct EmbeddingInfo(
|
||||
string EmbeddingType,
|
||||
string EmbeddingName,
|
||||
string Description,
|
||||
string UsedWhen,
|
||||
string? Link);
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public enum OperatingSystem
|
||||
{
|
||||
NONE,
|
||||
|
||||
WINDOWS,
|
||||
LINUX,
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public static class OperatingSystemExtensions
|
||||
{
|
||||
public static string Name(this OperatingSystem os) => os switch
|
||||
{
|
||||
OperatingSystem.NONE => "No operating system specified",
|
||||
|
||||
OperatingSystem.WINDOWS => "Windows",
|
||||
OperatingSystem.LINUX => "Linux",
|
||||
|
||||
_ => "Unknown operating system"
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public enum ProgrammingLanguages
|
||||
{
|
||||
NONE,
|
||||
|
||||
C,
|
||||
CPP,
|
||||
CSHARP,
|
||||
GO,
|
||||
JAVA,
|
||||
JAVASCRIPT,
|
||||
JULIA,
|
||||
MATLAB,
|
||||
PHP,
|
||||
PYTHON,
|
||||
RUST,
|
||||
|
||||
OTHER,
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public static class ProgrammingLanguagesExtensions
|
||||
{
|
||||
public static string Name(this ProgrammingLanguages language) => language switch
|
||||
{
|
||||
ProgrammingLanguages.NONE => "No programming language selected",
|
||||
|
||||
ProgrammingLanguages.C => "C",
|
||||
ProgrammingLanguages.CPP => "C++",
|
||||
ProgrammingLanguages.CSHARP => "C#",
|
||||
ProgrammingLanguages.GO => "Go",
|
||||
ProgrammingLanguages.JAVA => "Java",
|
||||
ProgrammingLanguages.JAVASCRIPT => "JavaScript",
|
||||
ProgrammingLanguages.JULIA => "Julia",
|
||||
ProgrammingLanguages.MATLAB => "MATLAB",
|
||||
ProgrammingLanguages.PHP => "PHP",
|
||||
ProgrammingLanguages.PYTHON => "Python",
|
||||
ProgrammingLanguages.RUST => "Rust",
|
||||
|
||||
ProgrammingLanguages.OTHER => "Other",
|
||||
_ => "Unknown"
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
/// <summary>
|
||||
/// Information about a retrieval process, which this data source implements.
|
||||
/// </summary>
|
||||
/// <param name="Name">The name of the retrieval process, e.g., "Keyword-Based Wikipedia Article Retrieval".</param>
|
||||
/// <param name="Description">A short description of the retrieval process. What kind of retrieval process is it?</param>
|
||||
/// <param name="Link">A link to the retrieval process's documentation, paper, Wikipedia article, or the source code. Might be null.</param>
|
||||
/// <param name="ParametersDescription">A dictionary that describes the parameters of the retrieval process. The key is the parameter name,
|
||||
/// and the value is a description of the parameter. Although each parameter will be sent as a string, the description should indicate the
|
||||
/// expected type and range, e.g., 0.0 to 1.0 for a float parameter.</param>
|
||||
/// <param name="Embeddings">A list of embeddings used in this retrieval process. It might be empty in case no embedding is used.</param>
|
||||
public readonly record struct RetrievalInfo(
|
||||
string Name,
|
||||
string Description,
|
||||
string? Link,
|
||||
Dictionary<string, string>? ParametersDescription,
|
||||
List<EmbeddingInfo>? Embeddings);
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace AIStudio.Assistants.ERI;
|
||||
|
||||
public sealed class RetrievalParameter
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of the parameter.
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The description of the parameter.
|
||||
/// </summary>
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public partial class AssistantGrammarSpelling : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputText = string.Empty;
|
||||
this.correctedText = string.Empty;
|
||||
|
||||
@@ -33,7 +33,7 @@ public partial class AssistantIconFinder : AssistantBaseCore
|
||||
|
||||
protected override Func<Task> SubmitAction => this.FindIcon;
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputContext = string.Empty;
|
||||
if (!this.MightPreselectValues())
|
||||
|
||||
@@ -59,7 +59,7 @@ public partial class AssistantJobPostings : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputEntryDate = string.Empty;
|
||||
this.inputValidUntil = string.Empty;
|
||||
|
||||
@@ -37,7 +37,7 @@ public partial class AssistantLegalCheck : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputLegalDocument = string.Empty;
|
||||
this.inputQuestions = string.Empty;
|
||||
|
||||
@@ -41,7 +41,7 @@ public partial class AssistantMyTasks : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputText = string.Empty;
|
||||
if (!this.MightPreselectValues())
|
||||
|
||||
@@ -49,7 +49,7 @@ public partial class AssistantRewriteImprove : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputText = string.Empty;
|
||||
this.rewrittenText = string.Empty;
|
||||
|
||||
@@ -60,7 +60,7 @@ public partial class AssistantSynonyms : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputText = string.Empty;
|
||||
this.inputContext = string.Empty;
|
||||
|
||||
@@ -40,7 +40,7 @@ public partial class AssistantTextSummarizer : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputText = string.Empty;
|
||||
if(!this.MightPreselectValues())
|
||||
|
||||
@@ -36,7 +36,7 @@ public partial class AssistantTranslation : AssistantBaseCore
|
||||
SystemPrompt = SystemPrompts.DEFAULT,
|
||||
};
|
||||
|
||||
protected override void ResetFrom()
|
||||
protected override void ResetForm()
|
||||
{
|
||||
this.inputText = string.Empty;
|
||||
this.inputTextLastTranslation = string.Empty;
|
||||
|
||||
Reference in new issue
Block a user