19 references to TryGetValue
Microsoft.Extensions.AI.Abstractions.Tests (3)
AdditionalPropertiesDictionaryTests.cs (3)
78
Assert.True(d.
TryGetValue
("key", out T2? value));
81
Assert.False(d.
TryGetValue
("key2", out value));
89
Assert.False(d.
TryGetValue
("key", out T2? value));
Microsoft.Extensions.AI.Ollama (3)
OllamaChatClient.cs (1)
390
if (options.AdditionalProperties?.
TryGetValue
(propertyName, out T? t) is true)
OllamaEmbeddingGenerator.cs (2)
101
if (requestProps.
TryGetValue
("keep_alive", out long keepAlive))
106
if (requestProps.
TryGetValue
("truncate", out bool truncate))
Microsoft.Extensions.AI.OpenAI (13)
OpenAIEmbeddingGenerator.cs (1)
119
if (additionalProperties.
TryGetValue
(nameof(openAIOptions.EndUserId), out string? endUserId))
OpenAIResponseChatClient.cs (6)
334
if (additionalProperties.
TryGetValue
(nameof(result.EndUserId), out string? endUserId))
339
if (additionalProperties.
TryGetValue
(nameof(result.Instructions), out string? instructions))
344
if (additionalProperties.
TryGetValue
(nameof(result.Metadata), out IDictionary<string, string>? metadata))
352
if (additionalProperties.
TryGetValue
(nameof(result.ReasoningOptions), out ResponseReasoningOptions? reasoningOptions))
357
if (additionalProperties.
TryGetValue
(nameof(result.StoredOutputEnabled), out bool storeOutputEnabled))
362
if (additionalProperties.
TryGetValue
(nameof(result.TruncationMode), out ResponseTruncationMode truncationMode))
OpenAISpeechToTextClient.cs (6)
195
if (additionalProperties.
TryGetValue
(nameof(result.Temperature), out float? temperature))
205
if (additionalProperties.
TryGetValue
(nameof(result.ResponseFormat), out AudioTranscriptionFormat? responseFormat))
210
if (additionalProperties.
TryGetValue
(nameof(result.Prompt), out string? prompt))
258
if (additionalProperties.
TryGetValue
(nameof(result.Temperature), out float? temperature))
263
if (additionalProperties.
TryGetValue
(nameof(result.ResponseFormat), out AudioTranslationFormat? responseFormat))
268
if (additionalProperties.
TryGetValue
(nameof(result.Prompt), out string? prompt))