1 write to Schema
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatResponseFormatJson.cs (1)
30Schema = schema;
10 references to Schema
Microsoft.Extensions.AI (1)
ChatCompletion\OpenTelemetryChatClient.cs (1)
281ChatResponseFormatJson { Schema: null } => "json_schema",
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatResponseFormatJson.cs (1)
46private string DebuggerDisplay => Schema?.ToString() ?? "JSON";
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.Ollama (1)
OllamaChatClient.cs (1)
270return jsonFormat.Schema ?? _schemalessJsonResponseFormatValue;
Microsoft.Extensions.AI.OpenAI (1)
OpenAIModelMapper.ChatCompletion.cs (1)
332result.ResponseFormat = jsonFormat.Schema is { } jsonSchema ?
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (2)
34Assert.Null(responseFormat.Schema); 181var responseFormatJsonSchema = JsonSerializer.Serialize(responseFormat.Schema, TestJsonSerializerContext.Default.JsonElement);