mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 11:33:47 +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
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user