Add brave mode for Read Web Page tool

This commit is contained in:
Peer Hogeterp committed 2026-09-23 13:06:42 +02:00
1 parent e9ebc02a96
commit 672abb4082
9 files changed
+70 -17

No files matched your search

@@ -1,3 +1,4 @@
using System.Text.Json.Serialization;
using AIStudio.Provider;
namespace AIStudio.Tools.ToolCallingSystem;
@@ -16,6 +17,14 @@ public sealed class ToolDefinition
public string SystemPromptInstructions { get; init; } = string.Empty;
/// <summary>
/// Resolves instructions that depend on a current global setting when a request is built.
/// </summary>
[JsonIgnore]
public Func<string>? SystemPromptInstructionsFactory { get; init; }
public string GetSystemPromptInstructions() => this.SystemPromptInstructionsFactory?.Invoke() ?? this.SystemPromptInstructions;
/// <summary>
/// The lowest provider confidence this tool may be used with, unless an administrator or the
/// user says otherwise.
@@ -27,4 +36,4 @@ public sealed class ToolDefinition
public ConfidenceLevel MinimumProviderConfidence { get; init; } = ConfidenceLevel.NONE;
public ToolFunctionDefinition Function { get; init; } = new();
}
}