mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-13 19:33:37 +00:00
Co-authored-by: krut_ni <nils.kruthoff@dlr.de> Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
24 lines
589 B
C#
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;
|
|
}
|
|
} |