1 override of JsonSchema
Microsoft.Extensions.AI.Abstractions (1)
Functions\AIFunctionFactory.cs (1)
542public override JsonElement JsonSchema => FunctionDescriptor.JsonSchema;
30 references to JsonSchema
Microsoft.Extensions.AI.Abstractions (6)
Functions\AIFunctionFactory.cs (5)
51/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 133/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 214/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 306/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 400/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this:
Utilities\AIJsonSchemaTransformCache.cs (1)
46_functionSchemaCreateValueCallback = function => AIJsonUtilities.TransformSchema(function.JsonSchema, TransformOptions);
Microsoft.Extensions.AI.Abstractions.Tests (3)
Utilities\AIJsonUtilitiesTests.cs (3)
308AssertDeepEquals(resolvedSchema, func.JsonSchema); 368AssertDeepEquals(expected, func.JsonSchema); 380JsonElement schemaParameters = func.JsonSchema.GetProperty("properties");
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
623var tool = JsonSerializer.Deserialize<AzureAIChatToolJson>(aiFunction.JsonSchema)!;
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
169var toolDescriptorsJson = JsonSerializer.Serialize(tools.OfType<AIFunction>().Select(t => t.JsonSchema), _jsonOptions);
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (1)
612var tool = JsonSerializer.Deserialize<ChatToolJson>(aiFunction.JsonSchema)!;
OpenAIResponseClientTests.cs (1)
410var tool = JsonSerializer.Deserialize<OpenAIChatClientTests.ChatToolJson>(aiFunction.JsonSchema)!;
Microsoft.Extensions.AI.Tests (17)
Functions\AIFunctionFactoryTest.cs (17)
93Assert.DoesNotContain("cancellationToken", func.JsonSchema.ToString(), StringComparison.OrdinalIgnoreCase); 225Assert.DoesNotContain("firstParameter", func.JsonSchema.ToString()); 226Assert.Contains("secondParameter", func.JsonSchema.ToString()); 271Assert.Contains("myInteger", func.JsonSchema.ToString()); 272Assert.DoesNotContain("services", func.JsonSchema.ToString()); 273Assert.DoesNotContain("arguments", func.JsonSchema.ToString()); 301Assert.Contains("myInteger", func.JsonSchema.ToString()); 302Assert.DoesNotContain("services", func.JsonSchema.ToString()); 303Assert.DoesNotContain("arguments", func.JsonSchema.ToString()); 439Assert.Contains("myInteger", f.JsonSchema.ToString()); 440Assert.DoesNotContain("service", f.JsonSchema.ToString()); 462Assert.Contains("myInteger", f.JsonSchema.ToString()); 463Assert.DoesNotContain("service", f.JsonSchema.ToString()); 486Assert.Contains("myInteger", f.JsonSchema.ToString()); 487Assert.DoesNotContain("service", f.JsonSchema.ToString()); 523Assert.Contains("myInteger", f.JsonSchema.ToString()); 524Assert.DoesNotContain("service", f.JsonSchema.ToString());