27 references to DefaultOptions
Microsoft.Extensions.AI (10)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (3)
50CompleteAsync<T>(chatClient, chatMessages, AIJsonUtilities.DefaultOptions, options, useNativeJsonSchema, cancellationToken); 136schema = JsonSerializer.Serialize(schemaElement, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(JsonElement))); 150}, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(JsonObject)));
ChatCompletion\DistributedCachingChatClient.cs (1)
27private JsonSerializerOptions _jsonSerializerOptions = AIJsonUtilities.DefaultOptions;
ChatCompletion\LoggingChatClient.cs (1)
35_jsonSerializerOptions = AIJsonUtilities.DefaultOptions;
ChatCompletion\OpenTelemetryChatClient.cs (1)
80_jsonSerializerOptions = AIJsonUtilities.DefaultOptions;
Embeddings\DistributedCachingEmbeddingGenerator.cs (1)
38_jsonSerializerOptions = AIJsonUtilities.DefaultOptions;
Embeddings\LoggingEmbeddingGenerator.cs (1)
38_jsonSerializerOptions = AIJsonUtilities.DefaultOptions;
Functions\AIFunctionFactoryCreateOptions.cs (1)
18private JsonSerializerOptions _options = AIJsonUtilities.DefaultOptions;
LoggingHelpers.cs (1)
19AIJsonUtilities.DefaultOptions.TryGetTypeInfo(typeof(T), out typeInfo))
Microsoft.Extensions.AI.Abstractions (3)
Utilities\AIJsonUtilities.Schema.cs (3)
66serializerOptions ??= functionMetadata.JsonSerializerOptions ?? DefaultOptions; 112serializerOptions ??= DefaultOptions; 146serializerOptions ??= DefaultOptions;
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
21var options = AIJsonUtilities.DefaultOptions; 25Assert.Same(options, AIJsonUtilities.DefaultOptions);
Microsoft.Extensions.AI.AzureAIInference (4)
AzureAIInferenceChatClient.cs (3)
32private JsonSerializerOptions _toolCallJsonSerializerOptions = AIJsonUtilities.DefaultOptions; 315result.AdditionalProperties["top_k"] = new BinaryData(JsonSerializer.SerializeToUtf8Bytes(topK, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(int)))); 502(JsonTypeInfo<IDictionary<string, object>>)AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(IDictionary<string, object>)))!);
AzureAIInferenceEmbeddingGenerator.cs (1)
176byte[] data = JsonSerializer.SerializeToUtf8Bytes(prop.Value, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(object)));
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
38Assert.Same(client.ToolCallJsonSerializerOptions, AIJsonUtilities.DefaultOptions);
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
34private JsonSerializerOptions _toolCallJsonSerializerOptions = AIJsonUtilities.DefaultOptions;
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
35Assert.Same(client.ToolCallJsonSerializerOptions, AIJsonUtilities.DefaultOptions);
Microsoft.Extensions.AI.OpenAI (4)
OpenAIChatClient.cs (3)
41private JsonSerializerOptions _toolCallJsonSerializerOptions = AIJsonUtilities.DefaultOptions; 678(JsonTypeInfo<IDictionary<string, object>>)AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(IDictionary<string, object>)))!); 683(JsonTypeInfo<IDictionary<string, object>>)AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(IDictionary<string, object>)))!);
OpenAIRealtimeExtensions.cs (1)
117var jsonOptions = jsonSerializerOptions ?? AIJsonUtilities.DefaultOptions;
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIChatClientTests.cs (1)
43Assert.Same(client.ToolCallJsonSerializerOptions, AIJsonUtilities.DefaultOptions);