3 overrides of JsonSchema
Microsoft.Extensions.AI.Abstractions (2)
Functions\AIFunctionFactory.cs (1)
543public override JsonElement JsonSchema => FunctionDescriptor.JsonSchema;
Functions\DelegatingAIFunction.cs (1)
41public override JsonElement JsonSchema => InnerFunction.JsonSchema;
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
512public override JsonElement JsonSchema { get; } = JsonSerializer.Deserialize<JsonElement>(jsonSchema, AIJsonUtilities.DefaultOptions);
40 references to JsonSchema
Microsoft.Extensions.AI.Abstractions (7)
Functions\AIFunctionFactory.cs (5)
52/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 134/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 215/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 307/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 401/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this:
Functions\DelegatingAIFunction.cs (1)
41public override JsonElement JsonSchema => InnerFunction.JsonSchema;
Utilities\AIJsonSchemaTransformCache.cs (1)
46_functionSchemaCreateValueCallback = function => AIJsonUtilities.TransformSchema(function.JsonSchema, TransformOptions);
Microsoft.Extensions.AI.Abstractions.Tests (7)
Functions\DelegatingAIFunctionTests.cs (3)
29Assert.Equal(expected.JsonSchema, actual.JsonSchema); 74Assert.Equal(inner.JsonSchema, actual.JsonSchema);
Utilities\AIJsonUtilitiesTests.cs (4)
290AssertDeepEquals(resolvedSchema, func.JsonSchema); 350AssertDeepEquals(expected, func.JsonSchema); 362JsonElement schemaParameters = func.JsonSchema.GetProperty("properties"); 423AssertDeepEquals(expectedSchema.RootElement, func.JsonSchema);
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
623var tool = JsonSerializer.Deserialize<AzureAIChatToolJson>(aiFunction.JsonSchema)!;
Microsoft.Extensions.AI.Evaluation.Quality (1)
AIToolExtensions.cs (1)
29["functionSchema"] = JsonNode.Parse(function.JsonSchema.GetRawText()),
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 (1)
OpenAIClientExtensions.cs (1)
177aiFunction.JsonSchema;
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIResponseClientTests.cs (1)
601var tool = JsonSerializer.Deserialize<OpenAIChatClientTests.ChatToolJson>(aiFunction.JsonSchema)!;
Microsoft.Extensions.AI.Tests (21)
Functions\AIFunctionFactoryTest.cs (21)
158Assert.DoesNotContain("cancellationToken", func.JsonSchema.ToString(), StringComparison.OrdinalIgnoreCase); 291Assert.DoesNotContain("firstParameter", func.JsonSchema.ToString()); 292Assert.Contains("secondParameter", func.JsonSchema.ToString()); 315Assert.Contains("firstParameter", func.JsonSchema.ToString()); 316Assert.Contains("secondParameter", func.JsonSchema.ToString()); 352Assert.Contains("myInteger", func.JsonSchema.ToString()); 353Assert.DoesNotContain("services", func.JsonSchema.ToString()); 354Assert.DoesNotContain("arguments", func.JsonSchema.ToString()); 382Assert.Contains("myInteger", func.JsonSchema.ToString()); 383Assert.DoesNotContain("services", func.JsonSchema.ToString()); 384Assert.DoesNotContain("arguments", func.JsonSchema.ToString()); 520Assert.Contains("myInteger", f.JsonSchema.ToString()); 521Assert.DoesNotContain("service", f.JsonSchema.ToString()); 543Assert.Contains("myInteger", f.JsonSchema.ToString()); 544Assert.DoesNotContain("service", f.JsonSchema.ToString()); 567Assert.Contains("myInteger", f.JsonSchema.ToString()); 568Assert.DoesNotContain("service", f.JsonSchema.ToString()); 604Assert.Contains("myInteger", f.JsonSchema.ToString()); 605Assert.DoesNotContain("service", f.JsonSchema.ToString()); 884AssertExtensions.EqualJsonValues(expectedSchema, f.JsonSchema); 917AssertExtensions.EqualJsonValues(expectedSchema, f.JsonSchema);