mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 16:53:48 +00:00
Added tool calling support (#731)
Co-authored-by: krut_ni <nils.kruthoff@dlr.de> Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
266 files changed
+11186
-740
No files matched your search
@@ -8,8 +8,6 @@ using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Dialogs;
|
||||
|
||||
public sealed record DirectChatLauncherSettingsDialogResult(Guid PluginId, string PluginName, PluginAssistantAudit? Audit);
|
||||
|
||||
/// <summary>
|
||||
/// Changes the settings of an installed direct chat launcher without asking a model.
|
||||
/// </summary>
|
||||
@@ -50,6 +48,7 @@ public partial class DirectChatLauncherSettingsDialog : MSGComponentBase
|
||||
private string profileId = string.Empty;
|
||||
private string chatTemplateId = string.Empty;
|
||||
private IEnumerable<string> dataSourceIds = [];
|
||||
private HashSet<string> toolIds = [];
|
||||
private string issue = string.Empty;
|
||||
private bool canEdit;
|
||||
private bool isLoading = true;
|
||||
@@ -116,6 +115,7 @@ public partial class DirectChatLauncherSettingsDialog : MSGComponentBase
|
||||
this.profileId = launch.ProfileId?.ToString() ?? string.Empty;
|
||||
this.chatTemplateId = launch.ChatTemplateId?.ToString() ?? string.Empty;
|
||||
this.dataSourceIds = launch.DataSourceIds?.Select(id => id.ToString()).ToArray() ?? [];
|
||||
this.toolIds = launch.ToolIds is null ? [] : [..launch.ToolIds];
|
||||
this.canEdit = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -159,7 +159,8 @@ public partial class DirectChatLauncherSettingsDialog : MSGComponentBase
|
||||
ParseOptionalGuid(this.providerId),
|
||||
ParseOptionalGuid(this.profileId),
|
||||
ParseOptionalGuid(this.chatTemplateId),
|
||||
selectedDataSourceIds.Length == 0 ? null : selectedDataSourceIds);
|
||||
selectedDataSourceIds.Length == 0 ? null : selectedDataSourceIds,
|
||||
this.toolIds.Count == 0 ? null : this.toolIds.Order(StringComparer.Ordinal).ToArray());
|
||||
}
|
||||
|
||||
private async Task SaveAsync()
|
||||
|
||||
Reference in new issue
Block a user