mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-20 14:38:00 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eccf65f0a6 | ||
|
|
2429788ccc | ||
|
|
0125f48f61 | ||
|
|
94028b2c06 | ||
|
|
c5acce7278 | ||
|
|
4eb51f947a | ||
|
|
e11211d215 | ||
|
|
032c7ee56e | ||
|
|
030990ee90 | ||
|
|
371731ac13 | ||
|
|
99622cec48 | ||
|
|
6a4a7dc0d6 | ||
|
|
df01ce188e | ||
|
|
3bfca45e11 | ||
|
|
ccaf2e894a | ||
|
|
1d22232005 |
No files matched your search
@@ -199,7 +199,7 @@ public sealed class AgentDataSourceSelection (ILogger<AgentDataSourceSelection>
|
||||
// Call the ERI server to get the server description:
|
||||
//
|
||||
using var eriClient = ERIClientFactory.Get(eriDataSource.Version, eriDataSource)!;
|
||||
var authResponse = await eriClient.AuthenticateAsync(eriDataSource, rustService, token);
|
||||
var authResponse = await eriClient.AuthenticateAsync(rustService, cancellationToken: token);
|
||||
if (authResponse.Successful)
|
||||
{
|
||||
var serverDescriptionResponse = await eriClient.GetDataSourceInfoAsync(token);
|
||||
|
||||
@@ -293,7 +293,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
|
||||
// Use the selected provider to get the AI response.
|
||||
// By awaiting this line, we wait for the entire
|
||||
// content to be streamed.
|
||||
await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(this.Logger), this.providerSettings.Model, this.lastUserPrompt, this.chatThread);
|
||||
this.chatThread = await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(this.Logger), this.providerSettings.Model, this.lastUserPrompt, this.chatThread);
|
||||
|
||||
this.isProcessing = false;
|
||||
this.StateHasChanged();
|
||||
|
||||
@@ -290,6 +290,7 @@ public partial class AssistantERI : AssistantBaseCore
|
||||
- You consider the security of the implementation by applying the Security by Design principle.
|
||||
- Your output is formatted as Markdown. Code is formatted as code blocks. For every file, you
|
||||
create a separate code block with its file path and name as chapter title.
|
||||
- Important: The JSON objects of the API messages use camel case for the data field names.
|
||||
""");
|
||||
|
||||
return sb.ToString();
|
||||
|
||||
@@ -12,7 +12,6 @@ public enum ChatRole
|
||||
USER,
|
||||
AI,
|
||||
AGENT,
|
||||
RAG,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -40,6 +40,16 @@ public sealed record ChatThread
|
||||
/// </summary>
|
||||
public IReadOnlyList<DataSourceAgentSelected> AISelectedDataSources { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// The augmented data for this chat thread. Will be inserted into the system prompt.
|
||||
/// </summary>
|
||||
public string AugmentedData { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The data security to use, derived from the data sources used so far.
|
||||
/// </summary>
|
||||
public DataSourceSecurity DataSecurity { get; set; } = DataSourceSecurity.NOT_SPECIFIED;
|
||||
|
||||
/// <summary>
|
||||
/// The name of the chat thread. Usually generated by an AI model or manually edited by the user.
|
||||
/// </summary>
|
||||
@@ -74,31 +84,48 @@ public sealed record ChatThread
|
||||
/// <returns>The prepared system prompt.</returns>
|
||||
public string PrepareSystemPrompt(SettingsManager settingsManager, ChatThread chatThread, ILogger logger)
|
||||
{
|
||||
var isAugmentedDataAvailable = !string.IsNullOrWhiteSpace(chatThread.AugmentedData);
|
||||
var systemPromptWithAugmentedData = isAugmentedDataAvailable switch
|
||||
{
|
||||
true => $"""
|
||||
{chatThread.SystemPrompt}
|
||||
|
||||
{chatThread.AugmentedData}
|
||||
""",
|
||||
|
||||
false => chatThread.SystemPrompt,
|
||||
};
|
||||
|
||||
if(isAugmentedDataAvailable)
|
||||
logger.LogInformation("Augmented data is available for the chat thread.");
|
||||
else
|
||||
logger.LogInformation("No augmented data is available for the chat thread.");
|
||||
|
||||
//
|
||||
// Prepare the system prompt:
|
||||
//
|
||||
string systemPromptText;
|
||||
var logMessage = $"Using no profile for chat thread '{chatThread.Name}'.";
|
||||
if (string.IsNullOrWhiteSpace(chatThread.SelectedProfile))
|
||||
systemPromptText = chatThread.SystemPrompt;
|
||||
systemPromptText = systemPromptWithAugmentedData;
|
||||
else
|
||||
{
|
||||
if(!Guid.TryParse(chatThread.SelectedProfile, out var profileId))
|
||||
systemPromptText = chatThread.SystemPrompt;
|
||||
systemPromptText = systemPromptWithAugmentedData;
|
||||
else
|
||||
{
|
||||
if(chatThread.SelectedProfile == Profile.NO_PROFILE.Id || profileId == Guid.Empty)
|
||||
systemPromptText = chatThread.SystemPrompt;
|
||||
systemPromptText = systemPromptWithAugmentedData;
|
||||
else
|
||||
{
|
||||
var profile = settingsManager.ConfigurationData.Profiles.FirstOrDefault(x => x.Id == chatThread.SelectedProfile);
|
||||
if(profile == default)
|
||||
systemPromptText = chatThread.SystemPrompt;
|
||||
systemPromptText = systemPromptWithAugmentedData;
|
||||
else
|
||||
{
|
||||
logMessage = $"Using profile '{profile.Name}' for chat thread '{chatThread.Name}'.";
|
||||
systemPromptText = $"""
|
||||
{chatThread.SystemPrompt}
|
||||
{systemPromptWithAugmentedData}
|
||||
|
||||
{profile.ToSystemPrompt()}
|
||||
""";
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
using AIStudio.Provider.SelfHosted;
|
||||
using AIStudio.Settings.DataModel;
|
||||
|
||||
namespace AIStudio.Chat;
|
||||
|
||||
public static class ChatThreadExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Checks if the specified provider is allowed for the chat thread.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// We don't check if the provider is allowed to use the data sources of the chat thread.
|
||||
/// That kind of check is done in the RAG process itself.<br/><br/>
|
||||
///
|
||||
/// One thing which is not so obvious: after RAG was used on this thread, the entire chat
|
||||
/// thread is kind of a data source by itself. Why? Because the augmentation data collected
|
||||
/// from the data sources is stored in the chat thread. This means we must check if the
|
||||
/// selected provider is allowed to use this thread's data.
|
||||
/// </remarks>
|
||||
/// <param name="chatThread">The chat thread to check.</param>
|
||||
/// <param name="provider">The provider to check.</param>
|
||||
/// <returns>True, when the provider is allowed for the chat thread. False, otherwise.</returns>
|
||||
public static bool IsLLMProviderAllowed<T>(this ChatThread? chatThread, T provider)
|
||||
{
|
||||
// No chat thread available means we have a new chat. That's fine:
|
||||
if (chatThread is null)
|
||||
return true;
|
||||
|
||||
// The chat thread is available, but the data security is not specified.
|
||||
// Means, we never used RAG or RAG was enabled, but no data sources were selected.
|
||||
// That's fine as well:
|
||||
if (chatThread.DataSecurity is DataSourceSecurity.NOT_SPECIFIED)
|
||||
return true;
|
||||
|
||||
//
|
||||
// Is the provider self-hosted?
|
||||
//
|
||||
var isSelfHostedProvider = provider switch
|
||||
{
|
||||
ProviderSelfHosted => true,
|
||||
AIStudio.Settings.Provider p => p.IsSelfHosted,
|
||||
|
||||
_ => false,
|
||||
};
|
||||
|
||||
//
|
||||
// Check the chat data security against the selected provider:
|
||||
//
|
||||
return isSelfHostedProvider switch
|
||||
{
|
||||
// The provider is self-hosted -- we can use any data source:
|
||||
true => true,
|
||||
|
||||
// The provider is not self-hosted -- it depends on the data security of the chat thread:
|
||||
false => chatThread.DataSecurity is not DataSourceSecurity.SELF_HOSTED,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
@if (this.IsLastContentBlock && this.Role is ChatRole.AI && this.RegenerateFunc is not null)
|
||||
{
|
||||
<MudTooltip Text="Regenerate" Placement="Placement.Bottom">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Recycling" Color="Color.Default" OnClick="@this.RegenerateBlock"/>
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Recycling" Color="Color.Default" Disabled="@(!this.RegenerateEnabled())" OnClick="@this.RegenerateBlock"/>
|
||||
</MudTooltip>
|
||||
}
|
||||
@if (this.RemoveBlockFunc is not null)
|
||||
|
||||
@@ -28,7 +28,7 @@ public sealed class ContentImage : IContent, IImageSource
|
||||
public Func<Task> StreamingEvent { get; set; } = () => Task.CompletedTask;
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task CreateFromProviderAsync(IProvider provider, Model chatModel, IContent? lastPrompt, ChatThread? chatChatThread, CancellationToken token = default)
|
||||
public Task<ChatThread> CreateFromProviderAsync(IProvider provider, Model chatModel, IContent? lastPrompt, ChatThread? chatChatThread, CancellationToken token = default)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -36,16 +36,31 @@ public sealed class ContentText : IContent
|
||||
public Func<Task> StreamingEvent { get; set; } = () => Task.CompletedTask;
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task CreateFromProviderAsync(IProvider provider, Model chatModel, IContent? lastPrompt, ChatThread? chatThread, CancellationToken token = default)
|
||||
public async Task<ChatThread> CreateFromProviderAsync(IProvider provider, Model chatModel, IContent? lastPrompt, ChatThread? chatThread, CancellationToken token = default)
|
||||
{
|
||||
if(chatThread is null)
|
||||
return;
|
||||
return new();
|
||||
|
||||
if(!chatThread.IsLLMProviderAllowed(provider))
|
||||
{
|
||||
var logger = Program.SERVICE_PROVIDER.GetService<ILogger<ContentText>>()!;
|
||||
logger.LogError("The provider is not allowed for this chat thread due to data security reasons. Skipping the AI process.");
|
||||
return chatThread;
|
||||
}
|
||||
|
||||
// Call the RAG process. Right now, we only have one RAG process:
|
||||
if (lastPrompt is not null)
|
||||
{
|
||||
var rag = new AISrcSelWithRetCtxVal();
|
||||
chatThread = await rag.ProcessAsync(provider, lastPrompt, chatThread, token);
|
||||
try
|
||||
{
|
||||
var rag = new AISrcSelWithRetCtxVal();
|
||||
chatThread = await rag.ProcessAsync(provider, lastPrompt, chatThread, token);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
var logger = Program.SERVICE_PROVIDER.GetService<ILogger<ContentText>>()!;
|
||||
logger.LogError(e, "Skipping the RAG process due to an error.");
|
||||
}
|
||||
}
|
||||
|
||||
// Store the last time we got a response. We use this later
|
||||
@@ -107,6 +122,7 @@ public sealed class ContentText : IContent
|
||||
|
||||
// Inform the UI that the streaming is done:
|
||||
await this.StreamingDone();
|
||||
return chatThread;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -41,7 +41,7 @@ public interface IContent
|
||||
/// <summary>
|
||||
/// Uses the provider to create the content.
|
||||
/// </summary>
|
||||
public Task CreateFromProviderAsync(IProvider provider, Model chatModel, IContent? lastPrompt, ChatThread? chatChatThread, CancellationToken token = default);
|
||||
public Task<ChatThread> CreateFromProviderAsync(IProvider provider, Model chatModel, IContent? lastPrompt, ChatThread? chatChatThread, CancellationToken token = default);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the corresponding ERI content type.
|
||||
|
||||
@@ -13,6 +13,9 @@ public partial class Changelog
|
||||
|
||||
public static readonly Log[] LOGS =
|
||||
[
|
||||
new (209, "v0.9.34, build 209 (2025-03-11 13:02 UTC)", "v0.9.34.md"),
|
||||
new (208, "v0.9.33, build 208 (2025-03-11 08:14 UTC)", "v0.9.33.md"),
|
||||
new (207, "v0.9.32, build 207 (2025-03-08 20:15 UTC)", "v0.9.32.md"),
|
||||
new (206, "v0.9.31, build 206 (2025-03-03 15:33 UTC)", "v0.9.31.md"),
|
||||
new (205, "v0.9.30, build 205 (2025-02-24 19:55 UTC)", "v0.9.30.md"),
|
||||
new (204, "v0.9.29, build 204 (2025-02-24 13:48 UTC)", "v0.9.29.md"),
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
IsLastContentBlock="@isLastBlock"
|
||||
IsSecondToLastBlock="@isSecondLastBlock"
|
||||
RegenerateFunc="@this.RegenerateBlock"
|
||||
RegenerateEnabled="@(() => this.IsProviderSelected)"
|
||||
RegenerateEnabled="@(() => this.IsProviderSelected && this.ChatThread.IsLLMProviderAllowed(this.Provider))"
|
||||
EditLastBlockFunc="@this.EditLastBlock"
|
||||
EditLastUserBlockFunc="@this.EditLastUserBlock"/>
|
||||
}
|
||||
@@ -46,7 +46,7 @@
|
||||
Adornment="Adornment.End"
|
||||
AdornmentIcon="@Icons.Material.Filled.Send"
|
||||
OnAdornmentClick="() => this.SendMessage()"
|
||||
ReadOnly="!this.IsProviderSelected || this.isStreaming"
|
||||
Disabled="@this.IsInputForbidden()"
|
||||
Immediate="@true"
|
||||
OnKeyUp="this.InputKeyEvent"
|
||||
UserAttributes="@USER_INPUT_ATTRIBUTES"
|
||||
@@ -113,6 +113,14 @@
|
||||
{
|
||||
<DataSourceSelection @ref="@this.dataSourceSelectionComponent" PopoverTriggerMode="PopoverTriggerMode.BUTTON" PopoverButtonClasses="ma-3" LLMProvider="@this.Provider" DataSourceOptions="@this.GetCurrentDataSourceOptions()" DataSourceOptionsChanged="@(async options => await this.SetCurrentDataSourceOptions(options))" DataSourcesAISelected="@this.GetAgentSelectedDataSources()"/>
|
||||
}
|
||||
|
||||
@if (!this.ChatThread.IsLLMProviderAllowed(this.Provider))
|
||||
{
|
||||
<MudTooltip Text="The selected provider is not allowed in this chat due to data security reasons." Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Error" Color="Color.Error"/>
|
||||
</MudTooltip>
|
||||
}
|
||||
<MudIconButton />
|
||||
</MudToolBar>
|
||||
</FooterContent>
|
||||
</InnerScrolling>
|
||||
@@ -275,6 +275,9 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
{
|
||||
var chatDefaultOptions = this.SettingsManager.ConfigurationData.Chat.PreselectedDataSourceOptions.CreateCopy();
|
||||
this.earlyDataSourceOptions = chatDefaultOptions;
|
||||
if(this.ChatThread is not null)
|
||||
this.ChatThread.DataSourceOptions = chatDefaultOptions;
|
||||
|
||||
this.dataSourceSelectionComponent?.ChangeOptionWithoutSaving(chatDefaultOptions);
|
||||
}
|
||||
|
||||
@@ -337,6 +340,20 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
this.earlyDataSourceOptions = updatedOptions;
|
||||
}
|
||||
|
||||
private bool IsInputForbidden()
|
||||
{
|
||||
if (!this.IsProviderSelected)
|
||||
return true;
|
||||
|
||||
if(this.isStreaming)
|
||||
return true;
|
||||
|
||||
if(!this.ChatThread.IsLLMProviderAllowed(this.Provider))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private async Task InputKeyEvent(KeyboardEventArgs keyEvent)
|
||||
{
|
||||
if(this.dataSourceSelectionComponent?.IsVisible ?? false)
|
||||
@@ -371,6 +388,9 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
if (!this.IsProviderSelected)
|
||||
return;
|
||||
|
||||
if(!this.ChatThread.IsLLMProviderAllowed(this.Provider))
|
||||
return;
|
||||
|
||||
// We need to blur the focus away from the input field
|
||||
// to be able to clear the field:
|
||||
await this.inputField.BlurAsync();
|
||||
@@ -475,7 +495,7 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
// Use the selected provider to get the AI response.
|
||||
// By awaiting this line, we wait for the entire
|
||||
// content to be streamed.
|
||||
await aiText.CreateFromProviderAsync(this.Provider.CreateProvider(this.Logger), this.Provider.Model, lastUserPrompt, this.ChatThread, this.cancellationTokenSource.Token);
|
||||
this.ChatThread = await aiText.CreateFromProviderAsync(this.Provider.CreateProvider(this.Logger), this.Provider.Model, lastUserPrompt, this.ChatThread, this.cancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
this.cancellationTokenSource = null;
|
||||
@@ -773,6 +793,9 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
||||
if(this.ChatThread is null)
|
||||
return;
|
||||
|
||||
if(!this.ChatThread.IsLLMProviderAllowed(this.Provider))
|
||||
return;
|
||||
|
||||
this.ChatThread.Remove(aiBlock, removeForRegenerate: true);
|
||||
this.hasUnsavedChanges = true;
|
||||
this.StateHasChanged();
|
||||
|
||||
@@ -42,52 +42,49 @@
|
||||
else
|
||||
{
|
||||
<MudExpansionPanels Class="mb-3">
|
||||
@for (var index = 0; index < this.retrievalInfoformation.Count; index++)
|
||||
{
|
||||
var info = this.retrievalInfoformation[index];
|
||||
<ExpansionPanel HeaderText="@this.RetrievalName(info)" HeaderIcon="@Icons.Material.Filled.Info" IsExpanded="index == 0">
|
||||
<TextInfoLines Label="Description" MaxLines="14" Value="@info.Description" ClipboardTooltipSubject="the retrieval description"/>
|
||||
<TextInfoLines Label="Parameters" MaxLines="14" Value="@this.RetrievalParameters(info)" ClipboardTooltipSubject="the retrieval parameters"/>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(info.Link))
|
||||
{
|
||||
<MudButton Href="@info.Link" Target="_blank" Class="mt-3" Color="Color.Primary" StartIcon="@Icons.Material.Filled.OpenInNew">
|
||||
Open web link, show more information
|
||||
</MudButton>
|
||||
}
|
||||
<ExpansionPanel HeaderText="@this.RetrievalName(this.selectedRetrievalInfo)" HeaderIcon="@Icons.Material.Filled.Info">
|
||||
<TextInfoLines Label="Description" MaxLines="14" Value="@this.selectedRetrievalInfo.Description" ClipboardTooltipSubject="the retrieval description"/>
|
||||
<TextInfoLines Label="Parameters" MaxLines="14" Value="@this.RetrievalParameters(this.selectedRetrievalInfo)" ClipboardTooltipSubject="the retrieval parameters"/>
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mt-3">
|
||||
Embeddings
|
||||
</MudText>
|
||||
@if (!info.Embeddings.Any())
|
||||
{
|
||||
<MudJustifiedText Typo="Typo.body1" Color="Color.Info" Class="mb-3">
|
||||
The data source does not provide any embedding information.
|
||||
</MudJustifiedText>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudExpansionPanels>
|
||||
@for (var embeddingIndex = 0; embeddingIndex < info.Embeddings.Count; embeddingIndex++)
|
||||
{
|
||||
var embedding = info.Embeddings[embeddingIndex];
|
||||
<ExpansionPanel HeaderText="@embedding.EmbeddingName" HeaderIcon="@Icons.Material.Filled.Info" IsExpanded="embeddingIndex == 0">
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.FormatShapes" Label="Type" Value="@embedding.EmbeddingType" ClipboardTooltipSubject="the embedding type"/>
|
||||
<TextInfoLines Label="Description" MaxLines="14" Value="@embedding.Description" ClipboardTooltipSubject="the embedding description"/>
|
||||
<TextInfoLines Label="When to use" MaxLines="3" Value="@embedding.UsedWhen" ClipboardTooltipSubject="when is the embedding used"/>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(embedding.Link))
|
||||
{
|
||||
<MudButton Href="@embedding.Link" Target="_blank" Class="mt-3" Color="Color.Primary" StartIcon="@Icons.Material.Filled.OpenInNew">
|
||||
Open web link, show more information
|
||||
</MudButton>
|
||||
}
|
||||
</ExpansionPanel>
|
||||
}
|
||||
</MudExpansionPanels>
|
||||
}
|
||||
</ExpansionPanel>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(this.selectedRetrievalInfo.Link))
|
||||
{
|
||||
<MudButton Href="@this.selectedRetrievalInfo.Link" Target="_blank" Class="mt-3" Color="Color.Primary" StartIcon="@Icons.Material.Filled.OpenInNew">
|
||||
Open web link, show more information
|
||||
</MudButton>
|
||||
}
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mt-3">
|
||||
Embeddings
|
||||
</MudText>
|
||||
@* ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract *@
|
||||
@if (this.selectedRetrievalInfo.Embeddings is null || !this.selectedRetrievalInfo.Embeddings.Any())
|
||||
{
|
||||
<MudJustifiedText Typo="Typo.body1" Color="Color.Info" Class="mb-3">
|
||||
The data source does not provide any embedding information.
|
||||
</MudJustifiedText>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudExpansionPanels>
|
||||
@for (var embeddingIndex = 0; embeddingIndex < this.selectedRetrievalInfo.Embeddings.Count; embeddingIndex++)
|
||||
{
|
||||
var embedding = this.selectedRetrievalInfo.Embeddings[embeddingIndex];
|
||||
<ExpansionPanel HeaderText="@embedding.EmbeddingName" HeaderIcon="@Icons.Material.Filled.Info" IsExpanded="embeddingIndex == 0">
|
||||
<TextInfoLine Icon="@Icons.Material.Filled.FormatShapes" Label="Type" Value="@embedding.EmbeddingType" ClipboardTooltipSubject="the embedding type"/>
|
||||
<TextInfoLines Label="Description" MaxLines="14" Value="@embedding.Description" ClipboardTooltipSubject="the embedding description"/>
|
||||
<TextInfoLines Label="When to use" MaxLines="3" Value="@embedding.UsedWhen" ClipboardTooltipSubject="when is the embedding used"/>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(embedding.Link))
|
||||
{
|
||||
<MudButton Href="@embedding.Link" Target="_blank" Class="mt-3" Color="Color.Primary" StartIcon="@Icons.Material.Filled.OpenInNew">
|
||||
Open web link, show more information
|
||||
</MudButton>
|
||||
}
|
||||
</ExpansionPanel>
|
||||
}
|
||||
</MudExpansionPanels>
|
||||
}
|
||||
</ExpansionPanel>
|
||||
</MudExpansionPanels>
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ public partial class DataSourceERI_V1InfoDialog : ComponentBase, IAsyncDisposabl
|
||||
private string serverDescription = string.Empty;
|
||||
private ProviderType securityRequirements = ProviderType.NONE;
|
||||
private IReadOnlyList<RetrievalInfo> retrievalInfoformation = [];
|
||||
private RetrievalInfo selectedRetrievalInfo;
|
||||
|
||||
private bool IsOperationInProgress { get; set; } = true;
|
||||
|
||||
@@ -97,7 +98,7 @@ public partial class DataSourceERI_V1InfoDialog : ComponentBase, IAsyncDisposabl
|
||||
return;
|
||||
}
|
||||
|
||||
var loginResult = await client.AuthenticateAsync(this.DataSource, this.RustService);
|
||||
var loginResult = await client.AuthenticateAsync(this.RustService);
|
||||
if (!loginResult.Successful)
|
||||
{
|
||||
this.dataIssues.Add(loginResult.Message);
|
||||
@@ -130,7 +131,7 @@ public partial class DataSourceERI_V1InfoDialog : ComponentBase, IAsyncDisposabl
|
||||
}
|
||||
|
||||
this.retrievalInfoformation = retrievalInfoResult.Data ?? [];
|
||||
|
||||
this.selectedRetrievalInfo = this.retrievalInfoformation.FirstOrDefault(x => x.Id == this.DataSource.SelectedRetrievalId);
|
||||
this.StateHasChanged();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -109,11 +109,25 @@
|
||||
InputType="InputType.Password"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"/>
|
||||
}
|
||||
|
||||
@if (this.availableRetrievalProcesses.Count > 0)
|
||||
{
|
||||
<MudSelect @bind-Value="@this.dataSelectedRetrievalProcess" Text="@this.dataSelectedRetrievalProcess.Name" Label="Select one retrieval process" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.dataSourceValidation.ValidateRetrievalProcess">
|
||||
@foreach (var retrievalProcess in this.availableRetrievalProcesses)
|
||||
{
|
||||
<MudSelectItem Value="@retrievalProcess">
|
||||
@retrievalProcess.Name
|
||||
</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
}
|
||||
|
||||
<MudSelect @bind-Value="@this.dataSecurityPolicy" Text="@this.dataSecurityPolicy.ToSelectionText()" Label="Your security policy" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.dataSourceValidation.ValidateSecurityPolicy">
|
||||
@foreach (var policy in Enum.GetValues<DataSourceSecurity>())
|
||||
{
|
||||
<MudSelectItem Value="@policy">@policy.ToSelectionText()</MudSelectItem>
|
||||
<MudSelectItem Value="@policy">
|
||||
@policy.ToSelectionText()
|
||||
</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ using AIStudio.Tools.Validation;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
using RetrievalInfo = AIStudio.Tools.ERIClient.DataModel.RetrievalInfo;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
namespace AIStudio.Dialogs;
|
||||
|
||||
@@ -59,6 +61,8 @@ public partial class DataSourceERI_V1Dialog : ComponentBase, ISecretId
|
||||
private int dataPort;
|
||||
private AuthMethod dataAuthMethod;
|
||||
private string dataUsername = string.Empty;
|
||||
private List<RetrievalInfo> availableRetrievalProcesses = [];
|
||||
private RetrievalInfo dataSelectedRetrievalProcess;
|
||||
|
||||
// We get the form reference from Blazor code to validate it manually:
|
||||
private MudForm form = null!;
|
||||
@@ -91,6 +95,9 @@ public partial class DataSourceERI_V1Dialog : ComponentBase, ISecretId
|
||||
// When editing, we need to load the data:
|
||||
if(this.IsEditing)
|
||||
{
|
||||
//
|
||||
// Assign the data to the form fields:
|
||||
//
|
||||
this.dataEditingPreviousInstanceName = this.DataSource.Name.ToLowerInvariant();
|
||||
this.dataNum = this.DataSource.Num;
|
||||
this.dataId = this.DataSource.Id;
|
||||
@@ -114,6 +121,12 @@ public partial class DataSourceERI_V1Dialog : ComponentBase, ISecretId
|
||||
await this.form.Validate();
|
||||
}
|
||||
}
|
||||
|
||||
// Load the data:
|
||||
await this.TestConnection();
|
||||
|
||||
// Select the retrieval process:
|
||||
this.dataSelectedRetrievalProcess = this.availableRetrievalProcesses.FirstOrDefault(n => n.Id == this.DataSource.SelectedRetrievalId);
|
||||
}
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
@@ -153,6 +166,7 @@ public partial class DataSourceERI_V1Dialog : ComponentBase, ISecretId
|
||||
Username = this.dataUsername,
|
||||
Type = DataSourceType.ERI_V1,
|
||||
SecurityPolicy = this.dataSecurityPolicy,
|
||||
SelectedRetrievalId = this.dataSelectedRetrievalProcess.Id,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -174,13 +188,8 @@ public partial class DataSourceERI_V1Dialog : ComponentBase, ISecretId
|
||||
try
|
||||
{
|
||||
var cts = new CancellationTokenSource(TimeSpan.FromSeconds(14));
|
||||
var dataSource = new DataSourceERI_V1
|
||||
{
|
||||
Hostname = this.dataHostname,
|
||||
Port = this.dataPort
|
||||
};
|
||||
|
||||
using var client = ERIClientFactory.Get(ERIVersion.V1, dataSource);
|
||||
this.DataSource = this.CreateDataSource();
|
||||
using var client = ERIClientFactory.Get(ERIVersion.V1, this.DataSource);
|
||||
if(client is null)
|
||||
{
|
||||
await this.form.Validate();
|
||||
@@ -202,7 +211,7 @@ public partial class DataSourceERI_V1Dialog : ComponentBase, ISecretId
|
||||
|
||||
this.availableAuthMethods = authSchemes.Data!.Select(n => n.AuthMethod).ToList();
|
||||
|
||||
var loginResult = await client.AuthenticateAsync(this.DataSource, this.RustService, cts.Token);
|
||||
var loginResult = await client.AuthenticateAsync(this.RustService, this.dataSecret, cts.Token);
|
||||
if (!loginResult.Successful)
|
||||
{
|
||||
await this.form.Validate();
|
||||
@@ -224,6 +233,18 @@ public partial class DataSourceERI_V1Dialog : ComponentBase, ISecretId
|
||||
|
||||
this.dataSourceSecurityRequirements = securityRequirementsRequest.Data;
|
||||
|
||||
var retrievalInfoRequest = await client.GetRetrievalInfoAsync(cts.Token);
|
||||
if (!retrievalInfoRequest.Successful)
|
||||
{
|
||||
await this.form.Validate();
|
||||
|
||||
Array.Resize(ref this.dataIssues, this.dataIssues.Length + 1);
|
||||
this.dataIssues[^1] = retrievalInfoRequest.Message;
|
||||
return;
|
||||
}
|
||||
|
||||
this.availableRetrievalProcesses = retrievalInfoRequest.Data ?? [];
|
||||
|
||||
this.connectionTested = true;
|
||||
this.connectionSuccessfulTested = true;
|
||||
this.Logger.LogInformation("Connection to the ERI v1 server was successful tested.");
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="7.1.0" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.72" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.74" />
|
||||
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.2" />
|
||||
<PackageReference Include="MudBlazor" Version="7.16.0" />
|
||||
<PackageReference Include="MudBlazor.Markdown" Version="7.14.0" />
|
||||
|
||||
@@ -22,6 +22,29 @@
|
||||
Check for updates
|
||||
</MudButton>
|
||||
</ExpansionPanel>
|
||||
|
||||
<ExpansionPanel HeaderIcon="@Icons.Custom.Brands.GitHub" HeaderText="Community & Code">
|
||||
<MudList T="string" Class="mb-1">
|
||||
<MudListItem T="string" Icon="@Icons.Material.Outlined.Home" Target="_blank" Href="http://mindworkai.org/">
|
||||
Discover MindWork AI's mission and vision on our official homepage.
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Custom.Brands.GitHub" Target="_blank" Href="https://github.com/MindWorkAI/AI-Studio">
|
||||
Browse AI Studio's source code on GitHub — we welcome your contributions.
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Outlined.PrivateConnectivity" Target="_blank" Href="https://github.com/MindWorkAI/ERI">
|
||||
Connect AI Studio to your organization's data with our External Retrieval Interface (ERI).
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Outlined.Timeline" Target="_blank" Href="https://github.com/orgs/MindWorkAI/projects/2/views/3">
|
||||
View our project roadmap and help shape AI Studio's future development.
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Outlined.BugReport" Target="_blank" Href="https://github.com/MindWorkAI/AI-Studio/issues">
|
||||
Did you find a bug or are you experiencing issues? Report your concern here.
|
||||
</MudListItem>
|
||||
<MudListItem T="string" Icon="@Icons.Material.Outlined.Lightbulb" Target="_blank" Href="https://github.com/MindWorkAI/Planning/issues">
|
||||
Have feature ideas? Submit suggestions for future AI Studio enhancements.
|
||||
</MudListItem>
|
||||
</MudList>
|
||||
</ExpansionPanel>
|
||||
|
||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.EventNote" HeaderText="Changelog">
|
||||
<Changelog/>
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
<MudList T="string">
|
||||
<Supporter Name="DevNullx64" Type="SupporterType.INDIVIDUAL" URL="https://github.com/DevNullx64" Acknowledgment="Thanks Luc for your build script contribution."/>
|
||||
<Supporter Name="SolsticeSpectrum" Type="SupporterType.INDIVIDUAL" URL="https://github.com/SolsticeSpectrum" Acknowledgment="Thanks for your build script contribution."/>
|
||||
<Supporter Name="peerschuett" Type="SupporterType.INDIVIDUAL" URL="https://github.com/peerschuett" Acknowledgment="Thanks for your contributions to the project."/>
|
||||
</MudList>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
|
||||
@@ -139,7 +139,7 @@ public partial class Writer : MSGComponentBase, IAsyncDisposable
|
||||
this.isStreaming = true;
|
||||
this.StateHasChanged();
|
||||
|
||||
await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(this.Logger), this.providerSettings.Model, lastUserPrompt, this.chatThread);
|
||||
this.chatThread = await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(this.Logger), this.providerSettings.Model, lastUserPrompt, this.chatThread);
|
||||
this.suggestion = aiText.Text;
|
||||
|
||||
this.isStreaming = false;
|
||||
|
||||
@@ -38,7 +38,6 @@ public sealed class ProviderAnthropic(ILogger logger) : BaseProvider("https://ap
|
||||
ChatRole.USER => "user",
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.RAG => "assistant",
|
||||
|
||||
_ => "user",
|
||||
},
|
||||
|
||||
@@ -49,7 +49,6 @@ public sealed class ProviderDeepSeek(ILogger logger) : BaseProvider("https://api
|
||||
ChatRole.USER => "user",
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.RAG => "assistant",
|
||||
ChatRole.SYSTEM => "system",
|
||||
|
||||
_ => "user",
|
||||
|
||||
@@ -49,7 +49,6 @@ public class ProviderFireworks(ILogger logger) : BaseProvider("https://api.firew
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.SYSTEM => "system",
|
||||
ChatRole.RAG => "assistant",
|
||||
|
||||
_ => "user",
|
||||
},
|
||||
|
||||
@@ -49,7 +49,6 @@ public sealed class ProviderGWDG(ILogger logger) : BaseProvider("https://chat-ai
|
||||
ChatRole.USER => "user",
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.RAG => "assistant",
|
||||
ChatRole.SYSTEM => "system",
|
||||
|
||||
_ => "user",
|
||||
|
||||
@@ -50,7 +50,6 @@ public class ProviderGoogle(ILogger logger) : BaseProvider("https://generativela
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.SYSTEM => "system",
|
||||
ChatRole.RAG => "assistant",
|
||||
|
||||
_ => "user",
|
||||
},
|
||||
|
||||
@@ -50,7 +50,6 @@ public class ProviderGroq(ILogger logger) : BaseProvider("https://api.groq.com/o
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.SYSTEM => "system",
|
||||
ChatRole.RAG => "assistant",
|
||||
|
||||
_ => "user",
|
||||
},
|
||||
|
||||
@@ -49,7 +49,6 @@ public sealed class ProviderHelmholtz(ILogger logger) : BaseProvider("https://ap
|
||||
ChatRole.USER => "user",
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.RAG => "assistant",
|
||||
ChatRole.SYSTEM => "system",
|
||||
|
||||
_ => "user",
|
||||
|
||||
@@ -48,7 +48,6 @@ public sealed class ProviderMistral(ILogger logger) : BaseProvider("https://api.
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.SYSTEM => "system",
|
||||
ChatRole.RAG => "assistant",
|
||||
|
||||
_ => "user",
|
||||
},
|
||||
|
||||
@@ -76,7 +76,6 @@ public sealed class ProviderOpenAI(ILogger logger) : BaseProvider("https://api.o
|
||||
ChatRole.USER => "user",
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.RAG => "assistant",
|
||||
ChatRole.SYSTEM => systemPromptRole,
|
||||
|
||||
_ => "user",
|
||||
|
||||
@@ -46,7 +46,6 @@ public sealed class ProviderSelfHosted(ILogger logger, Host host, string hostnam
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.SYSTEM => "system",
|
||||
ChatRole.RAG => "assistant",
|
||||
|
||||
_ => "user",
|
||||
},
|
||||
|
||||
@@ -50,7 +50,6 @@ public sealed class ProviderX(ILogger logger) : BaseProvider("https://api.x.ai/v
|
||||
ChatRole.AI => "assistant",
|
||||
ChatRole.AGENT => "assistant",
|
||||
ChatRole.SYSTEM => "system",
|
||||
ChatRole.RAG => "assistant",
|
||||
|
||||
_ => "user",
|
||||
},
|
||||
|
||||
@@ -51,6 +51,9 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
/// <inheritdoc />
|
||||
public ERIVersion Version { get; init; } = ERIVersion.V1;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string SelectedRetrievalId { get; init; } = string.Empty;
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(IContent lastPrompt, ChatThread thread, CancellationToken token = default)
|
||||
{
|
||||
@@ -59,7 +62,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
var logger = Program.SERVICE_PROVIDER.GetRequiredService<ILogger<DataSourceERI_V1>>();
|
||||
|
||||
using var eriClient = ERIClientFactory.Get(this.Version, this)!;
|
||||
var authResponse = await eriClient.AuthenticateAsync(this, rustService, token);
|
||||
var authResponse = await eriClient.AuthenticateAsync(rustService, cancellationToken: token);
|
||||
if (authResponse.Successful)
|
||||
{
|
||||
var retrievalRequest = new RetrievalRequest
|
||||
@@ -74,7 +77,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
|
||||
Thread = await thread.ToERIChatThread(token),
|
||||
MaxMatches = 10,
|
||||
RetrievalProcessId = null, // The ERI server selects the retrieval process when multiple processes are available
|
||||
RetrievalProcessId = string.IsNullOrWhiteSpace(this.SelectedRetrievalId) ? null : this.SelectedRetrievalId,
|
||||
Parameters = null, // The ERI server selects useful default parameters
|
||||
};
|
||||
|
||||
@@ -97,7 +100,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
Links = eriContext.Links,
|
||||
Category = eriContext.Type.ToRetrievalContentCategory(),
|
||||
MatchedText = eriContext.MatchedContent,
|
||||
DataSourceName = eriContext.Name,
|
||||
DataSourceName = this.Name,
|
||||
SurroundingContent = eriContext.SurroundingContent,
|
||||
});
|
||||
break;
|
||||
@@ -111,7 +114,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
|
||||
Source = eriContext.MatchedContent,
|
||||
Category = eriContext.Type.ToRetrievalContentCategory(),
|
||||
SourceType = ContentImageSource.BASE64,
|
||||
DataSourceName = eriContext.Name,
|
||||
DataSourceName = this.Name,
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
@@ -29,4 +29,9 @@ public interface IERIDataSource : IExternalDataSource
|
||||
/// The ERI specification to use.
|
||||
/// </summary>
|
||||
public ERIVersion Version { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The ID of the selected retrieval process.
|
||||
/// </summary>
|
||||
public string SelectedRetrievalId { get; init; }
|
||||
}
|
||||
@@ -1,17 +1,22 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using AIStudio.Settings;
|
||||
|
||||
namespace AIStudio.Tools.ERIClient;
|
||||
|
||||
public abstract class ERIClientBase(string baseAddress) : IDisposable
|
||||
public abstract class ERIClientBase(IERIDataSource dataSource) : IDisposable
|
||||
{
|
||||
protected readonly IERIDataSource dataSource = dataSource;
|
||||
|
||||
protected static readonly JsonSerializerOptions JSON_OPTIONS = new()
|
||||
{
|
||||
WriteIndented = true,
|
||||
AllowTrailingCommas = true,
|
||||
PropertyNamingPolicy = null,
|
||||
DictionaryKeyPolicy = JsonNamingPolicy.CamelCase,
|
||||
PropertyNameCaseInsensitive = true,
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||
DictionaryKeyPolicy = JsonNamingPolicy.CamelCase,
|
||||
UnmappedMemberHandling = JsonUnmappedMemberHandling.Disallow,
|
||||
Converters =
|
||||
{
|
||||
new JsonStringEnumConverter(JsonNamingPolicy.SnakeCaseUpper),
|
||||
@@ -20,7 +25,7 @@ public abstract class ERIClientBase(string baseAddress) : IDisposable
|
||||
|
||||
protected readonly HttpClient httpClient = new()
|
||||
{
|
||||
BaseAddress = new Uri(baseAddress),
|
||||
BaseAddress = new Uri($"{dataSource.Hostname}:{dataSource.Port}"),
|
||||
};
|
||||
|
||||
protected string securityToken = string.Empty;
|
||||
|
||||
@@ -7,7 +7,7 @@ public static class ERIClientFactory
|
||||
{
|
||||
public static IERIClient? Get(ERIVersion version, IERIDataSource dataSource) => version switch
|
||||
{
|
||||
ERIVersion.V1 => new ERIClientV1($"{dataSource.Hostname}:{dataSource.Port}"),
|
||||
ERIVersion.V1 => new ERIClientV1(dataSource),
|
||||
|
||||
_ => null
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ using AIStudio.Tools.Services;
|
||||
|
||||
namespace AIStudio.Tools.ERIClient;
|
||||
|
||||
public class ERIClientV1(string baseAddress) : ERIClientBase(baseAddress), IERIClient
|
||||
public class ERIClientV1(IERIDataSource dataSource) : ERIClientBase(dataSource), IERIClient
|
||||
{
|
||||
#region Implementation of IERIClient
|
||||
|
||||
@@ -59,13 +59,13 @@ public class ERIClientV1(string baseAddress) : ERIClientBase(baseAddress), IERIC
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<APIResponse<AuthResponse>> AuthenticateAsync(IERIDataSource dataSource, RustService rustService, CancellationToken cancellationToken = default)
|
||||
public async Task<APIResponse<AuthResponse>> AuthenticateAsync(RustService rustService, string? temporarySecret = null, CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
var authMethod = dataSource.AuthMethod;
|
||||
var username = dataSource.Username;
|
||||
switch (dataSource.AuthMethod)
|
||||
var authMethod = this.dataSource.AuthMethod;
|
||||
var username = this.dataSource.Username;
|
||||
switch (this.dataSource.AuthMethod)
|
||||
{
|
||||
case AuthMethod.NONE:
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Post, $"auth?authMethod={authMethod}"))
|
||||
@@ -99,17 +99,24 @@ public class ERIClientV1(string baseAddress) : ERIClientBase(baseAddress), IERIC
|
||||
}
|
||||
|
||||
case AuthMethod.USERNAME_PASSWORD:
|
||||
var passwordResponse = await rustService.GetSecret(dataSource);
|
||||
if (!passwordResponse.Success)
|
||||
string password;
|
||||
if (string.IsNullOrWhiteSpace(temporarySecret))
|
||||
{
|
||||
return new()
|
||||
var passwordResponse = await rustService.GetSecret(this.dataSource);
|
||||
if (!passwordResponse.Success)
|
||||
{
|
||||
Successful = false,
|
||||
Message = "Failed to retrieve the password."
|
||||
};
|
||||
}
|
||||
return new()
|
||||
{
|
||||
Successful = false,
|
||||
Message = "Failed to retrieve the password."
|
||||
};
|
||||
}
|
||||
|
||||
password = await passwordResponse.Secret.Decrypt(Program.ENCRYPTION);
|
||||
}
|
||||
else
|
||||
password = temporarySecret;
|
||||
|
||||
var password = await passwordResponse.Secret.Decrypt(Program.ENCRYPTION);
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Post, $"auth?authMethod={authMethod}"))
|
||||
{
|
||||
// We must send both values inside the header. The username field is named 'user'.
|
||||
@@ -146,17 +153,24 @@ public class ERIClientV1(string baseAddress) : ERIClientBase(baseAddress), IERIC
|
||||
}
|
||||
|
||||
case AuthMethod.TOKEN:
|
||||
var tokenResponse = await rustService.GetSecret(dataSource);
|
||||
if (!tokenResponse.Success)
|
||||
string token;
|
||||
if (string.IsNullOrWhiteSpace(temporarySecret))
|
||||
{
|
||||
return new()
|
||||
var tokenResponse = await rustService.GetSecret(this.dataSource);
|
||||
if (!tokenResponse.Success)
|
||||
{
|
||||
Successful = false,
|
||||
Message = "Failed to retrieve the access token."
|
||||
};
|
||||
}
|
||||
return new()
|
||||
{
|
||||
Successful = false,
|
||||
Message = "Failed to retrieve the access token."
|
||||
};
|
||||
}
|
||||
|
||||
token = await tokenResponse.Secret.Decrypt(Program.ENCRYPTION);
|
||||
}
|
||||
else
|
||||
token = temporarySecret;
|
||||
|
||||
var token = await tokenResponse.Secret.Decrypt(Program.ENCRYPTION);
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Post, $"auth?authMethod={authMethod}"))
|
||||
{
|
||||
request.Headers.Add("Authorization", $"Bearer {token}");
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Tools.ERIClient.DataModel;
|
||||
using AIStudio.Tools.Services;
|
||||
|
||||
@@ -19,11 +18,11 @@ public interface IERIClient : IDisposable
|
||||
/// <summary>
|
||||
/// Authenticate the user to the ERI server.
|
||||
/// </summary>
|
||||
/// <param name="dataSource">The data source to use.</param>
|
||||
/// <param name="rustService">The Rust service.</param>
|
||||
/// <param name="temporarySecret">The temporary secret when adding a new data source, and the secret is not yet stored in the OS.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>The authentication response.</returns>
|
||||
public Task<APIResponse<AuthResponse>> AuthenticateAsync(IERIDataSource dataSource, RustService rustService, CancellationToken cancellationToken = default);
|
||||
public Task<APIResponse<AuthResponse>> AuthenticateAsync(RustService rustService, string? temporarySecret = null, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the data source information from the ERI server.
|
||||
|
||||
@@ -66,22 +66,8 @@ public sealed class AugmentationOne : IAugmentationProcess
|
||||
// Let's convert all retrieval contexts to Markdown:
|
||||
await retrievalContexts.AsMarkdown(sb, token);
|
||||
|
||||
//
|
||||
// Append the entire augmentation to the chat thread,
|
||||
// just before the user prompt:
|
||||
//
|
||||
chatThread.Blocks.Insert(chatThread.Blocks.Count - 1, new()
|
||||
{
|
||||
Role = ChatRole.RAG,
|
||||
Time = DateTimeOffset.UtcNow,
|
||||
ContentType = ContentType.TEXT,
|
||||
HideFromUser = true,
|
||||
Content = new ContentText
|
||||
{
|
||||
Text = sb.ToString(),
|
||||
}
|
||||
});
|
||||
|
||||
// Add the augmented data to the chat thread:
|
||||
chatThread.AugmentedData = sb.ToString();
|
||||
return chatThread;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using AIStudio.Chat;
|
||||
using AIStudio.Provider;
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Settings.DataModel;
|
||||
using AIStudio.Tools.RAG.AugmentationProcesses;
|
||||
using AIStudio.Tools.RAG.DataSourceSelectionProcesses;
|
||||
using AIStudio.Tools.Services;
|
||||
@@ -38,6 +39,30 @@ public sealed class AISrcSelWithRetCtxVal : IRagProcess
|
||||
// makes sense to proceed with the RAG process:
|
||||
var proceedWithRAG = true;
|
||||
|
||||
//
|
||||
// We read the last block in the chat thread. We need to re-arrange
|
||||
// the order of blocks later, after the augmentation process takes
|
||||
// place:
|
||||
//
|
||||
if(chatThread.Blocks.Count == 0)
|
||||
{
|
||||
logger.LogError("The chat thread is empty. Skipping the RAG process.");
|
||||
return chatThread;
|
||||
}
|
||||
|
||||
if (chatThread.Blocks.Last().Role != ChatRole.AI)
|
||||
{
|
||||
logger.LogError("The last block in the chat thread is not the AI block. There is something wrong with the chat thread. Skipping the RAG process.");
|
||||
return chatThread;
|
||||
}
|
||||
|
||||
//
|
||||
// At this point in time, the chat thread contains already the
|
||||
// last block, which is the waiting AI block. We need to remove
|
||||
// this block before we call some parts of the RAG process:
|
||||
//
|
||||
var chatThreadWithoutWaitingAIBlock = chatThread with { Blocks = chatThread.Blocks[..^1] };
|
||||
|
||||
//
|
||||
// When the user wants to bind data sources to the chat, we
|
||||
// have to check if the data sources are available for the
|
||||
@@ -72,6 +97,56 @@ public sealed class AISrcSelWithRetCtxVal : IRagProcess
|
||||
logger.LogWarning("No data sources are selected. The RAG process is skipped.");
|
||||
proceedWithRAG = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var previousDataSecurity = chatThread.DataSecurity;
|
||||
|
||||
//
|
||||
// Update the data security of the chat thread. We consider the current data security
|
||||
// of the chat thread and the data security of the selected data sources:
|
||||
//
|
||||
var dataSecurityRestrictedToSelfHosted = selectedDataSources.Any(x => x.SecurityPolicy is DataSourceSecurity.SELF_HOSTED);
|
||||
chatThread.DataSecurity = dataSecurityRestrictedToSelfHosted switch
|
||||
{
|
||||
//
|
||||
//
|
||||
// Case: the data sources which are selected have a security policy
|
||||
// of SELF_HOSTED (at least one data source).
|
||||
//
|
||||
// When the policy was already set to ALLOW_ANY, we restrict it
|
||||
// to SELF_HOSTED.
|
||||
//
|
||||
true => DataSourceSecurity.SELF_HOSTED,
|
||||
|
||||
//
|
||||
// Case: the data sources which are selected have a security policy
|
||||
// of ALLOW_ANY (none of the data sources has a SELF_HOSTED policy).
|
||||
//
|
||||
// When the policy was already set to SELF_HOSTED, we must keep that.
|
||||
//
|
||||
false => chatThread.DataSecurity switch
|
||||
{
|
||||
//
|
||||
// When the policy was not specified yet, we set it to ALLOW_ANY.
|
||||
//
|
||||
DataSourceSecurity.NOT_SPECIFIED => DataSourceSecurity.ALLOW_ANY,
|
||||
DataSourceSecurity.ALLOW_ANY => DataSourceSecurity.ALLOW_ANY,
|
||||
|
||||
//
|
||||
// When the policy was already set to SELF_HOSTED, we must keep that.
|
||||
// This is important since the thread might already contain data
|
||||
// from a data source with a SELF_HOSTED policy.
|
||||
//
|
||||
DataSourceSecurity.SELF_HOSTED => DataSourceSecurity.SELF_HOSTED,
|
||||
|
||||
// Default case: we use the current data security of the chat thread.
|
||||
_ => chatThread.DataSecurity,
|
||||
}
|
||||
};
|
||||
|
||||
if (previousDataSecurity != chatThread.DataSecurity)
|
||||
logger.LogInformation($"The data security of the chat thread was updated from '{previousDataSecurity}' to '{chatThread.DataSecurity}'.");
|
||||
}
|
||||
|
||||
//
|
||||
// Trigger the retrieval part of the (R)AG process:
|
||||
@@ -84,7 +159,7 @@ public sealed class AISrcSelWithRetCtxVal : IRagProcess
|
||||
//
|
||||
var retrievalTasks = new List<Task<IReadOnlyList<IRetrievalContext>>>(selectedDataSources.Count);
|
||||
foreach (var dataSource in selectedDataSources)
|
||||
retrievalTasks.Add(dataSource.RetrieveDataAsync(lastPrompt, chatThread, token));
|
||||
retrievalTasks.Add(dataSource.RetrieveDataAsync(lastPrompt, chatThreadWithoutWaitingAIBlock, token));
|
||||
|
||||
//
|
||||
// Wait for all retrieval tasks to finish:
|
||||
|
||||
@@ -113,7 +113,7 @@ public sealed class DataSourceService
|
||||
}
|
||||
|
||||
this.logger.LogInformation($"Authenticating with ERI source '{source.Name}' (id={source.Id})...");
|
||||
var loginResult = await client.AuthenticateAsync(eriSource, this.rustService, cancellationTokenSource.Token);
|
||||
var loginResult = await client.AuthenticateAsync(this.rustService, cancellationToken: cancellationTokenSource.Token);
|
||||
if (!loginResult.Successful)
|
||||
{
|
||||
this.logger.LogWarning($"Authentication with ERI source '{source.Name}' (id={source.Id}) failed. We skip this source. Reason: {loginResult.Message}");
|
||||
|
||||
@@ -92,6 +92,14 @@ public sealed class DataSourceValidation
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public string? ValidateRetrievalProcess(RetrievalInfo retrievalInfo)
|
||||
{
|
||||
if(retrievalInfo == default)
|
||||
return "Please select one retrieval process.";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public string? ValidatingName(string dataSourceName)
|
||||
{
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
},
|
||||
"HtmlAgilityPack": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.11.72, )",
|
||||
"resolved": "1.11.72",
|
||||
"contentHash": "RNLgXxTFdIGFI+o5l8c2aJ2L5StIRn9Uv8HKR76p7QP4ZUL26wzpWUCWh08xWUdkL2kocl+Xhv6VUu0rA1npVg=="
|
||||
"requested": "[1.11.74, )",
|
||||
"resolved": "1.11.74",
|
||||
"contentHash": "q0wRGbegtr4sZXjCNoV3OeRLTOcTNJQKiO9etNVSKPoTo33unmSK8Ahg36C4jIg/Hd3aw8YnTQjtKpBy+wlOpg=="
|
||||
},
|
||||
"Microsoft.Extensions.FileProviders.Embedded": {
|
||||
"type": "Direct",
|
||||
@@ -207,6 +207,6 @@
|
||||
"contentHash": "7WaVMHklpT3Ye2ragqRIwlFRsb6kOk63BOGADV0fan3ulVfGLUYkDi5yNUsZS/7FVNkWbtHAlDLmu4WnHGfqvQ=="
|
||||
}
|
||||
},
|
||||
"net8.0/osx-x64": {}
|
||||
"net8.0/osx-arm64": {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
# v0.9.32, build 207 (2025-03-08 20:15 UTC)
|
||||
- Added the "Community & Code" section to the about page. It includes links to the GitHub repositories and the project website.
|
||||
- Added the retrieval process section for ERI data sources in the configuration dialog. Like all RAG functions, this is hidden behind the RAG feature flag in the app settings due to its preview status.
|
||||
- Improved data security by preventing the use of cloud LLMs after confidential data has been retrieved previously.
|
||||
- Improved the ERI client to expect JSON responses and send JSON requests using camel case.
|
||||
- Improved the ERI client to raise an error when the server responds with additional JSON data that is not expected.
|
||||
- Improved the error handling in the ERI data source info dialog in cases where servers respond with an invalid message.
|
||||
- Improved the error handling for the entire RAG process.
|
||||
- Improved chat thread persistence after modifications through the RAG process.
|
||||
- Improved the augmentation and generation part of RAG by passing the augmented data into the system prompt.
|
||||
- Fixed the chat thread we use for the data retrieval by removing the last block, which is meant to be for the final AI answer.
|
||||
- Fixed the data source name for ERI data sources when performing data retrieval.
|
||||
- Fixed the default data source selection when replacing the current chat with a new one.
|
||||
- Fixed the state of the re-generate button in the chat thread, when no provider is selected or the data security is preventing the use of cloud LLMs.
|
||||
- Updated the code contributions section in the supporter page. Thanks `peerschuett` for being our next contributor.
|
||||
- Upgraded code dependencies.
|
||||
@@ -0,0 +1,2 @@
|
||||
# v0.9.33, build 208 (2025-03-11 08:14 UTC)
|
||||
- Fixed a bug where the authentication methods for added ERI servers were not applied correctly. Thanks Kerstin `KeSah001` for reporting this issue.
|
||||
@@ -0,0 +1,2 @@
|
||||
# v0.9.34, build 209 (2025-03-11 13:02 UTC)
|
||||
- Fixed another bug related to ERI server authentication when adding new servers.
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
0.9.31
|
||||
2025-03-03 15:33:03 UTC
|
||||
206
|
||||
0.9.34
|
||||
2025-03-11 13:02:01 UTC
|
||||
209
|
||||
8.0.113 (commit 8f216348dc)
|
||||
8.0.13 (commit eba546b0f0)
|
||||
1.85.0 (commit 4d91de4e4)
|
||||
7.16.0
|
||||
1.8.1
|
||||
2e84f10a977, release
|
||||
2429788ccc0, release
|
||||
Generated
+31
-22
@@ -377,9 +377,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.1.6"
|
||||
version = "1.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f"
|
||||
checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
|
||||
dependencies = [
|
||||
"shlex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cesu8"
|
||||
@@ -2181,9 +2184,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "keyring"
|
||||
version = "3.6.1"
|
||||
version = "3.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f8fe839464d4e4b37d756d7e910063696af79a7e877282cb1825e4ec5f10833"
|
||||
checksum = "1961983669d57bdfe6c0f3ef8e4c229b5ef751afcc7d87e4271d2f71f6ccfa8b"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"dbus-secret-service",
|
||||
@@ -2214,9 +2217,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.155"
|
||||
version = "0.2.170"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
|
||||
checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
|
||||
|
||||
[[package]]
|
||||
name = "libdbus-sys"
|
||||
@@ -2261,9 +2264,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.22"
|
||||
version = "0.4.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
||||
checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
|
||||
|
||||
[[package]]
|
||||
name = "loom"
|
||||
@@ -2347,7 +2350,7 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||
|
||||
[[package]]
|
||||
name = "mindwork-ai-studio"
|
||||
version = "0.9.31"
|
||||
version = "0.9.34"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"arboard",
|
||||
@@ -2365,6 +2368,7 @@ dependencies = [
|
||||
"rand_chacha 0.9.0",
|
||||
"rcgen",
|
||||
"reqwest 0.12.12",
|
||||
"ring",
|
||||
"rocket",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -2758,9 +2762,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.20.2"
|
||||
version = "1.20.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
||||
checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
|
||||
|
||||
[[package]]
|
||||
name = "open"
|
||||
@@ -3557,15 +3561,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ring"
|
||||
version = "0.17.8"
|
||||
version = "0.17.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
|
||||
checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"getrandom 0.2.15",
|
||||
"libc",
|
||||
"spin",
|
||||
"untrusted",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
@@ -3873,18 +3876,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.217"
|
||||
version = "1.0.218"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
|
||||
checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.217"
|
||||
version = "1.0.218"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
|
||||
checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -4028,6 +4031,12 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shlex"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook-registry"
|
||||
version = "1.4.2"
|
||||
@@ -4719,9 +4728,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.42.0"
|
||||
version = "1.44.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551"
|
||||
checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"bytes",
|
||||
@@ -4736,9 +4745,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio-macros"
|
||||
version = "2.4.0"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
|
||||
checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
+7
-6
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "mindwork-ai-studio"
|
||||
version = "0.9.31"
|
||||
version = "0.9.34"
|
||||
edition = "2021"
|
||||
description = "MindWork AI Studio"
|
||||
authors = ["Thorsten Sommer"]
|
||||
@@ -11,14 +11,14 @@ tauri-build = { version = "1.5", features = [] }
|
||||
[dependencies]
|
||||
tauri = { version = "1.8", features = [ "http-all", "updater", "shell-sidecar", "shell-open", "dialog"] }
|
||||
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
||||
serde = { version = "1.0.217", features = ["derive"] }
|
||||
serde = { version = "1.0.218", features = ["derive"] }
|
||||
serde_json = "1.0.134"
|
||||
keyring = { version = "3.6.1", features = ["apple-native", "windows-native", "sync-secret-service"] }
|
||||
keyring = { version = "3.6.2", features = ["apple-native", "windows-native", "sync-secret-service"] }
|
||||
arboard = "3.4.1"
|
||||
tokio = { version = "1.42", features = ["rt", "rt-multi-thread", "macros"] }
|
||||
tokio = { version = "1.44", features = ["rt", "rt-multi-thread", "macros"] }
|
||||
flexi_logger = "0.29.8"
|
||||
log = { version = "0.4", features = ["kv"] }
|
||||
once_cell = "1.20"
|
||||
log = { version = "0.4.26", features = ["kv"] }
|
||||
once_cell = "1.20.3"
|
||||
rocket = { version = "0.5.1", features = ["json", "tls"] }
|
||||
rand = "0.9"
|
||||
rand_chacha = "0.9"
|
||||
@@ -33,6 +33,7 @@ rcgen = { version = "0.13.2", features = ["pem"] }
|
||||
|
||||
# Fixes security vulnerability downstream, where the upstream is not fixed yet:
|
||||
url = "2.5"
|
||||
ring = "0.17.13"
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
# See issue https://github.com/tauri-apps/tauri/issues/4470
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "MindWork AI Studio",
|
||||
"version": "0.9.31"
|
||||
"version": "0.9.34"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
||||
Reference in new issue
Block a user