mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 16:47:21 +00:00
Parsed the argument schemas of tools without the reflection-based serializer
This commit is contained in:
1 file changed
+2
-1
@@ -80,7 +80,8 @@ public sealed class ToolParameterSchemaBuilder
|
|||||||
["additionalProperties"] = false,
|
["additionalProperties"] = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
return JsonSerializer.Deserialize<JsonElement>(schema.ToJsonString());
|
using var document = JsonDocument.Parse(schema.ToJsonString());
|
||||||
|
return document.RootElement.Clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ToolParameterSchemaBuilder Add(string name, string jsonType, string description, bool isRequired, IReadOnlyList<string>? allowedValues = null)
|
private ToolParameterSchemaBuilder Add(string name, string jsonType, string description, bool isRequired, IReadOnlyList<string>? allowedValues = null)
|
||||||
|
|||||||
Reference in new issue
Block a user