20 references to CreateFunctionJsonSchema
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (1)
838JsonSchema = AIJsonUtilities.CreateFunctionJsonSchema(
Utilities\AIJsonSchemaCreateOptions.cs (2)
29/// <see cref="AIJsonUtilities.CreateFunctionJsonSchema"/> in order to determine whether it should 41/// <see cref="AIJsonUtilities.CreateFunctionJsonSchema"/> to obtain a description for the parameter.
Microsoft.Extensions.AI.Abstractions.Tests (17)
Utilities\AIJsonUtilitiesTests.cs (17)
295JsonElement resolvedSchema = AIJsonUtilities.CreateFunctionJsonSchema(func.UnderlyingMethod, title: string.Empty); 358JsonElement resolvedSchema = AIJsonUtilities.CreateFunctionJsonSchema(func.UnderlyingMethod, title: string.Empty, description: string.Empty, inferenceOptions: inferenceOptions); 434JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method, title: string.Empty); 496JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method, title: string.Empty, serializerOptions: options); 557JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method); 570JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method); 595JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method, title: "override_title"); 611JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method); 630ArgumentException ex = Assert.Throws<ArgumentException>(() => AIJsonUtilities.CreateFunctionJsonSchema(((Action<string, string>)DuplicateByAttribute).Method)); 639ArgumentException ex2 = Assert.Throws<ArgumentException>(() => AIJsonUtilities.CreateFunctionJsonSchema(((Action<string, string>)DuplicateByCollision).Method)); 653string schema = AIJsonUtilities.CreateFunctionJsonSchema(((Action<RecursiveNode>)TestMethod).Method, serializerOptions: options).ToString(); 1514JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method.Method, inferenceOptions: new() 1542JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method.Method, inferenceOptions: new() 1559JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method.Method, inferenceOptions: new() 1583JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method.Method, inferenceOptions: new() 1602JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method.Method, inferenceOptions: new() 1620JsonElement schema = AIJsonUtilities.CreateFunctionJsonSchema(method.Method, inferenceOptions: new()