1 write to Schema
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatResponseFormatJson.cs (1)
30Schema = schema;
14 references to Schema
Microsoft.Extensions.AI.Abstractions (3)
ChatCompletion\ChatResponseFormatJson.cs (1)
46private string DebuggerDisplay => Schema?.ToString() ?? "JSON";
Utilities\AIJsonSchemaTransformCache.cs (2)
47_responseFormatCreateValueCallback = responseFormat => AIJsonUtilities.TransformSchema(responseFormat.Schema!.Value, TransformOptions); 74return responseFormat.Schema is not null
Microsoft.Extensions.AI.Abstractions.Tests (4)
ChatCompletion\ChatResponseFormatTests.cs (4)
33Assert.Null(f.Schema); 42Assert.Equal("{}", JsonSerializer.Serialize(f.Schema, TestJsonSerializerContext.Default.JsonElement)); 65Assert.Null(actual.Schema); 80Assert.Equal("[1,2,3]", JsonSerializer.Serialize(actual.Schema, TestJsonSerializerContext.Default.JsonElement));
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
944Assert.Null(responseFormat.Schema);
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (6)
37Assert.NotNull(responseFormat.Schema); 69""").RootElement, responseFormat.Schema.Value); 120Assert.Null(responseFormat.Schema); 189""", responseFormat.Schema.ToString()); 336Assert.NotNull(responseFormat.Schema); 363""").RootElement, responseFormat.Schema.Value);