6 writes to ResponseFormat
Microsoft.Extensions.AI (2)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (2)
163options.ResponseFormat = ChatResponseFormat.ForJsonSchema( 170options.ResponseFormat = ChatResponseFormat.Json;
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatOptions.cs (1)
81ResponseFormat = ResponseFormat,
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\ChatOptionsTests.cs (2)
75options.ResponseFormat = ChatResponseFormat.Json; 135options.ResponseFormat = ChatResponseFormat.Json;
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
116ResponseFormat = ChatResponseFormat.Json,
17 references to ResponseFormat
Microsoft.Extensions.AI (2)
ChatCompletion\OpenTelemetryChatClient.cs (2)
275if (options.ResponseFormat is not null) 277string responseFormat = options.ResponseFormat switch
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatOptions.cs (1)
81ResponseFormat = ResponseFormat,
Microsoft.Extensions.AI.Abstractions.Tests (6)
ChatCompletion\ChatOptionsTests.cs (6)
23Assert.Null(options.ResponseFormat); 38Assert.Null(clone.ResponseFormat); 89Assert.Same(ChatResponseFormat.Json, options.ResponseFormat); 104Assert.Same(ChatResponseFormat.Json, clone.ResponseFormat); 158Assert.Equal(ChatResponseFormat.Json, deserialized.ResponseFormat); 159Assert.NotSame(ChatResponseFormat.Json, deserialized.ResponseFormat);
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
361if (options.ResponseFormat is ChatResponseFormatText) 365else if (options.ResponseFormat is ChatResponseFormatJson)
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
261Format = options?.ResponseFormat is ChatResponseFormatJson ? "json" : null,
Microsoft.Extensions.AI.OpenAI (2)
OpenAIChatClient.cs (2)
475if (options.ResponseFormat is ChatResponseFormatText) 479else if (options.ResponseFormat is ChatResponseFormatJson jsonFormat)
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (3)
33var responseFormat = Assert.IsType<ChatResponseFormatJson>(options!.ResponseFormat); 177var responseFormat = Assert.IsType<ChatResponseFormatJson>(options!.ResponseFormat); 219var responseFormat = Assert.IsType<ChatResponseFormatJson>(options!.ResponseFormat);