9 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.AzureAIInference.Tests (3)
AzureAIInferenceChatClientTests.cs (3)
334ResponseFormat = ChatResponseFormat.Text, 370ResponseFormat = ChatResponseFormat.Json, 409ResponseFormat = ChatResponseFormat.ForJsonSchema(JsonSerializer.Deserialize<JsonElement>("""
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
126ResponseFormat = ChatResponseFormat.Json,
16 references to ResponseFormat
Microsoft.Extensions.AI (2)
ChatCompletion\OpenTelemetryChatClient.cs (2)
276if (options.ResponseFormat is not null) 278string responseFormat = options.ResponseFormat switch
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatOptions.cs (1)
81ResponseFormat = ResponseFormat,
Microsoft.Extensions.AI.Abstractions.Tests (5)
ChatCompletion\ChatOptionsTests.cs (5)
23Assert.Null(options.ResponseFormat); 38Assert.Null(clone.ResponseFormat); 89Assert.Same(ChatResponseFormat.Json, options.ResponseFormat); 104Assert.Same(ChatResponseFormat.Json, clone.ResponseFormat); 158Assert.IsType<ChatResponseFormatJson>(deserialized.ResponseFormat);
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
363if (options.ResponseFormat is ChatResponseFormatText) 367else if (options.ResponseFormat is ChatResponseFormatJson)
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
282Format = ToOllamaChatResponseFormat(options?.ResponseFormat),
Microsoft.Extensions.AI.OpenAI (2)
OpenAIModelMapper.ChatCompletion.cs (2)
326if (options.ResponseFormat is ChatResponseFormatText) 330else 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); 221var responseFormat = Assert.IsType<ChatResponseFormatJson>(options!.ResponseFormat);