mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 13:13: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
@@ -61,6 +61,19 @@ public partial class DirectChatLauncherForm : MSGComponentBase
|
||||
[Parameter]
|
||||
public EventCallback<IEnumerable<string>> DataSourceIdsChanged { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The tools preselected for the chat. An empty selection keeps the normal chat defaults.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A preselection, not a limit: the user can switch tools in the chat as usual. What a tool
|
||||
/// may actually do is decided there, by the confidence of the provider in use.
|
||||
/// </remarks>
|
||||
[Parameter]
|
||||
public HashSet<string> ToolIds { get; set; } = [];
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<HashSet<string>> ToolIdsChanged { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Validates the workspace name. The hosts differ here: the Builder requires a name only while
|
||||
/// its launcher switch is on, whereas the settings dialog always requires one.
|
||||
@@ -135,6 +148,12 @@ public partial class DirectChatLauncherForm : MSGComponentBase
|
||||
await this.DataSourceIdsChanged.InvokeAsync(selectedDataSourceIds);
|
||||
}
|
||||
|
||||
private async Task SetToolIds(HashSet<string> toolIds)
|
||||
{
|
||||
this.ToolIds = toolIds;
|
||||
await this.ToolIdsChanged.InvokeAsync(toolIds);
|
||||
}
|
||||
|
||||
private string GetSelectedDataSourceText(List<string?>? selectedValues)
|
||||
{
|
||||
if (selectedValues is null || selectedValues.Count == 0)
|
||||
|
||||
Reference in new issue
Block a user