5 writes to AdditionalProperties
Microsoft.Extensions.AI (1)
ChatCompletion\ChatCompletion{T}.cs (1)
43AdditionalProperties = completion.AdditionalProperties;
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
152completion.AdditionalProperties = messageProps;
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatCompletion\ChatCompletionTests.cs (2)
117completion.AdditionalProperties = additionalProps; 214AdditionalProperties = new() { ["key1"] = "value1", ["key2"] = 42 },
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAISerializationTests.cs (1)
471AdditionalProperties = new()
21 references to AdditionalProperties
Microsoft.Extensions.AI (2)
ChatCompletion\ChatCompletion{T}.cs (1)
43AdditionalProperties = completion.AdditionalProperties;
ChatCompletion\OpenTelemetryChatClient.cs (1)
398if (completion.AdditionalProperties is { } props)
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\ChatCompletion.cs (2)
115if (AdditionalProperties is not null || Usage is not null) 119AdditionalProperties = AdditionalProperties
Microsoft.Extensions.AI.Abstractions.Tests (5)
ChatCompletion\ChatCompletionTests.cs (5)
115Assert.Null(completion.AdditionalProperties); 118Assert.Same(additionalProps, completion.AdditionalProperties); 164Assert.NotNull(result.AdditionalProperties); 165Assert.Single(result.AdditionalProperties); 166Assert.True(result.AdditionalProperties.TryGetValue("key", out object? value));
Microsoft.Extensions.AI.OpenAI (4)
OpenAIModelMapper.ChatCompletion.cs (4)
64refusal: chatCompletion.AdditionalProperties.GetValueOrDefault<string>(nameof(OpenAI.Chat.ChatCompletion.Refusal)), 65contentTokenLogProbabilities: chatCompletion.AdditionalProperties.GetValueOrDefault<IReadOnlyList<ChatTokenLogProbabilityDetails>>(nameof(OpenAI.Chat.ChatCompletion.ContentTokenLogProbabilities)), 66refusalTokenLogProbabilities: chatCompletion.AdditionalProperties.GetValueOrDefault<IReadOnlyList<ChatTokenLogProbabilityDetails>>(nameof(OpenAI.Chat.ChatCompletion.RefusalTokenLogProbabilities)), 67systemFingerprint: chatCompletion.AdditionalProperties.GetValueOrDefault<string>(nameof(OpenAI.Chat.ChatCompletion.SystemFingerprint)),
Microsoft.Extensions.AI.OpenAI.Tests (8)
OpenAIChatClientTests.cs (8)
210Assert.NotNull(response.AdditionalProperties); 211Assert.Equal("fp_f85bea6784", response.AdditionalProperties[nameof(OpenAI.Chat.ChatCompletion.SystemFingerprint)]); 557Assert.NotNull(response.AdditionalProperties); 558Assert.Equal("fp_f85bea6784", response.AdditionalProperties[nameof(OpenAI.Chat.ChatCompletion.SystemFingerprint)]); 656Assert.NotNull(response.AdditionalProperties); 657Assert.Equal("fp_f85bea6784", response.AdditionalProperties[nameof(OpenAI.Chat.ChatCompletion.SystemFingerprint)]); 1027Assert.NotNull(response.AdditionalProperties); 1028Assert.Equal("fp_f85bea6784", response.AdditionalProperties[nameof(OpenAI.Chat.ChatCompletion.SystemFingerprint)]);