13 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)
339
if (options.AdditionalProperties?.
TryGetValue
(propertyName, out T? t) is true)
OllamaEmbeddingGenerator.cs (2)
95
if (requestProps.
TryGetValue
("keep_alive", out long keepAlive))
100
if (requestProps.
TryGetValue
("truncate", out bool truncate))
Microsoft.Extensions.AI.OpenAI (7)
OpenAIChatClient.cs (6)
422
if (additionalProperties.
TryGetValue
(nameof(result.EndUserId), out string? endUserId))
427
if (additionalProperties.
TryGetValue
(nameof(result.IncludeLogProbabilities), out bool includeLogProbabilities))
432
if (additionalProperties.
TryGetValue
(nameof(result.LogitBiases), out IDictionary<int, int>? logitBiases))
440
if (additionalProperties.
TryGetValue
(nameof(result.AllowParallelToolCalls), out bool allowParallelToolCalls))
445
if (additionalProperties.
TryGetValue
(nameof(result.TopLogProbabilityCount), out int topLogProbabilityCountInt))
635
if (input.AdditionalProperties?.
TryGetValue
(nameof(message.Refusal), out string? refusal) is true)
OpenAIEmbeddingGenerator.cs (1)
149
if (additionalProperties.
TryGetValue
(nameof(openAIOptions.EndUserId), out string? endUserId))