13 references to TryGetValue
Microsoft.Extensions.AI.Abstractions.Tests (3)
AdditionalPropertiesDictionaryTests.cs (3)
78Assert.True(d.TryGetValue("key", out T2? value)); 81Assert.False(d.TryGetValue("key2", out value)); 89Assert.False(d.TryGetValue("key", out T2? value));
Microsoft.Extensions.AI.Ollama (3)
OllamaChatClient.cs (1)
339if (options.AdditionalProperties?.TryGetValue(propertyName, out T? t) is true)
OllamaEmbeddingGenerator.cs (2)
95if (requestProps.TryGetValue("keep_alive", out long keepAlive)) 100if (requestProps.TryGetValue("truncate", out bool truncate))
Microsoft.Extensions.AI.OpenAI (7)
OpenAIChatClient.cs (6)
422if (additionalProperties.TryGetValue(nameof(result.EndUserId), out string? endUserId)) 427if (additionalProperties.TryGetValue(nameof(result.IncludeLogProbabilities), out bool includeLogProbabilities)) 432if (additionalProperties.TryGetValue(nameof(result.LogitBiases), out IDictionary<int, int>? logitBiases)) 440if (additionalProperties.TryGetValue(nameof(result.AllowParallelToolCalls), out bool allowParallelToolCalls)) 445if (additionalProperties.TryGetValue(nameof(result.TopLogProbabilityCount), out int topLogProbabilityCountInt)) 635if (input.AdditionalProperties?.TryGetValue(nameof(message.Refusal), out string? refusal) is true)
OpenAIEmbeddingGenerator.cs (1)
149if (additionalProperties.TryGetValue(nameof(openAIOptions.EndUserId), out string? endUserId))