AI-Studio/app/MindWork AI Studio/Tools/ToolCallingSystem/ToolExecutionResult.cs
Peer Hogeterp 4d8d30e15e
Added tool calling support (#731)
Co-authored-by: krut_ni <nils.kruthoff@dlr.de>
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
2026-09-04 15:48:07 +02:00

24 lines
589 B
C#

using System.Text.Json.Nodes;
using AIStudio.Provider;
namespace AIStudio.Tools.ToolCallingSystem;
public sealed class ToolExecutionResult
{
public string? TextContent { get; init; }
public JsonNode? JsonContent { get; init; }
public IReadOnlyList<Source> Sources { get; init; } = [];
public ConfidenceLevel RequiredProviderConfidence { get; init; } = ConfidenceLevel.NONE;
public string ToModelContent()
{
if (this.JsonContent is not null)
return this.JsonContent.ToJsonString();
return this.TextContent ?? string.Empty;
}
}