mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 12:27:21 +00:00
Refused JSON contracts built by reflection and checked all of them in the trimmed build (#1152)
This commit is contained in:
1 parent
f864359290
commit
0b42c0288e
23 files changed
+535
-99
No files matched your search
@@ -21,7 +21,11 @@ public sealed class ToolExecutionResult
|
||||
/// with every umlaut as six characters. The relaxed encoder escapes only what JSON requires.
|
||||
/// </remarks>
|
||||
// Internal, so a tool which keeps its result within a budget measures exactly what the model gets:
|
||||
internal static readonly JsonSerializerOptions MODEL_CONTENT_OPTIONS = new() { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping };
|
||||
internal static readonly JsonSerializerOptions MODEL_CONTENT_OPTIONS = new JsonSerializerOptions
|
||||
{
|
||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
|
||||
TypeInfoResolver = ToolExecutionResultJsonContext.Default,
|
||||
}.AsReadOnly();
|
||||
|
||||
public string? TextContent { get; init; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user