1 override of JsonSchema
Microsoft.Extensions.AI (1)
Functions\AIFunctionFactory.cs (1)
641public override JsonElement JsonSchema => FunctionDescriptor.JsonSchema;
33 references to JsonSchema
Microsoft.Extensions.AI (5)
Functions\AIFunctionFactory.cs (5)
46/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 147/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 245/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 356/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 469/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this:
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonSchemaTransformCache.cs (1)
46_functionSchemaCreateValueCallback = function => AIJsonUtilities.TransformSchema(function.JsonSchema, TransformOptions);
Microsoft.Extensions.AI.Abstractions.Tests (3)
Utilities\AIJsonUtilitiesTests.cs (3)
302AssertDeepEquals(resolvedSchema, func.JsonSchema); 355AssertDeepEquals(expected, func.JsonSchema); 371JsonElement schemaParameters = func.JsonSchema.GetProperty("properties");
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
639var 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 (1)
OpenAIChatClientTests.cs (1)
612var tool = JsonSerializer.Deserialize<ChatToolJson>(aiFunction.JsonSchema)!;
Microsoft.Extensions.AI.Tests (21)
Functions\AIFunctionFactoryTest.cs (21)
92Assert.DoesNotContain("cancellationToken", func.JsonSchema.ToString(), StringComparison.OrdinalIgnoreCase); 219Assert.DoesNotContain("firstParameter", func.JsonSchema.ToString()); 220Assert.Contains("secondParameter", func.JsonSchema.ToString()); 263Assert.Contains("myInteger", func.JsonSchema.ToString()); 264Assert.DoesNotContain("services", func.JsonSchema.ToString()); 265Assert.DoesNotContain("arguments", func.JsonSchema.ToString()); 291Assert.Contains("myInteger", func.JsonSchema.ToString()); 292Assert.DoesNotContain("services", func.JsonSchema.ToString()); 293Assert.DoesNotContain("arguments", func.JsonSchema.ToString()); 315Assert.Contains("myService", func.JsonSchema.ToString()); 328Assert.Contains("myService", func.JsonSchema.ToString()); 339Assert.DoesNotContain("myService", func.JsonSchema.ToString()); 346Assert.DoesNotContain("myService", func.JsonSchema.ToString()); 490Assert.Contains("myInteger", f.JsonSchema.ToString()); 491Assert.DoesNotContain("service", f.JsonSchema.ToString()); 511Assert.Contains("myInteger", f.JsonSchema.ToString()); 512Assert.DoesNotContain("service", f.JsonSchema.ToString()); 533Assert.Contains("myInteger", f.JsonSchema.ToString()); 534Assert.DoesNotContain("service", f.JsonSchema.ToString()); 570Assert.Contains("myInteger", f.JsonSchema.ToString()); 571Assert.DoesNotContain("service", f.JsonSchema.ToString());