13 writes to AdditionalProperties
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
237AdditionalProperties = firstText.AdditionalProperties?.Clone(),
Microsoft.Extensions.AI.Abstractions.Tests (10)
ChatCompletion\ChatMessageTests.cs (6)
266AdditionalProperties = new() { ["metadata-key-1"] = "metadata-value-1" } 270AdditionalProperties = new() { ["metadata-key-2"] = "metadata-value-2" } 274AdditionalProperties = new() { ["metadata-key-3"] = "metadata-value-3" } 278AdditionalProperties = new() { ["metadata-key-4"] = "metadata-value-4" } 282AdditionalProperties = new() { ["metadata-key-5"] = "metadata-value-5" } 286AdditionalProperties = new() { ["metadata-key-6"] = "metadata-value-6" }
Contents\AIContentTests.cs (1)
30c.AdditionalProperties = props;
Contents\FunctionCallContentTests..cs (1)
60c.AdditionalProperties = props;
Contents\FunctionResultContentTests.cs (1)
48c.AdditionalProperties = props;
Contents\TextContentTests.cs (1)
34c.AdditionalProperties = props;
Microsoft.Extensions.AI.OpenAI (2)
OpenAIModelMapper.ChatCompletion.cs (2)
540(imageContent.AdditionalProperties ??= [])[nameof(contentPart.ImageDetailLevel)] = detail; 548(aiContent.AdditionalProperties ??= [])[nameof(contentPart.Refusal)] = refusal;
56 references to AdditionalProperties
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
237AdditionalProperties = firstText.AdditionalProperties?.Clone(),
Microsoft.Extensions.AI.Abstractions.Tests (35)
ChatCompletion\ChatMessageTests.cs (18)
315Assert.NotNull(textContent.AdditionalProperties); 316Assert.Single(textContent.AdditionalProperties); 317Assert.Equal("metadata-value-1", textContent.AdditionalProperties["metadata-key-1"]?.ToString()); 323Assert.NotNull(imageContent.AdditionalProperties); 324Assert.Single(imageContent.AdditionalProperties); 325Assert.Equal("metadata-value-2", imageContent.AdditionalProperties["metadata-key-2"]?.ToString()); 331Assert.NotNull(dataContent.AdditionalProperties); 332Assert.Single(dataContent.AdditionalProperties); 333Assert.Equal("metadata-value-3", dataContent.AdditionalProperties["metadata-key-3"]?.ToString()); 339Assert.NotNull(audioContent.AdditionalProperties); 340Assert.Single(audioContent.AdditionalProperties); 341Assert.Equal("metadata-value-4", audioContent.AdditionalProperties["metadata-key-4"]?.ToString()); 347Assert.NotNull(imageContent.AdditionalProperties); 348Assert.Single(imageContent.AdditionalProperties); 349Assert.Equal("metadata-value-5", imageContent.AdditionalProperties["metadata-key-5"]?.ToString()); 354Assert.NotNull(textContent.AdditionalProperties); 355Assert.Single(textContent.AdditionalProperties); 356Assert.Equal("metadata-value-6", textContent.AdditionalProperties["metadata-key-6"]?.ToString());
Contents\AIContentTests.cs (3)
15Assert.Null(c.AdditionalProperties); 28Assert.Null(c.AdditionalProperties); 31Assert.Same(props, c.AdditionalProperties);
Contents\DataContentTests{T}.cs (1)
195Assert.Equal("value", content.AdditionalProperties!["key"]!.ToString());
Contents\FunctionCallContentTests..cs (4)
24Assert.Null(c.AdditionalProperties); 41Assert.Null(c.AdditionalProperties); 58Assert.Null(c.AdditionalProperties); 61Assert.Same(props, c.AdditionalProperties);
Contents\FunctionResultContentTests.cs (4)
19Assert.Null(c.AdditionalProperties); 29Assert.Null(c.AdditionalProperties); 46Assert.Null(c.AdditionalProperties); 49Assert.Same(props, c.AdditionalProperties);
Contents\TextContentTests.cs (3)
18Assert.Null(c.AdditionalProperties); 32Assert.Null(c.AdditionalProperties); 35Assert.Same(props, c.AdditionalProperties);
Contents\UsageContentTests.cs (2)
22Assert.Null(c.AdditionalProperties); 39Assert.Null(c.AdditionalProperties);
Microsoft.Extensions.AI.OpenAI.Tests (20)
OpenAISerializationTests.cs (20)
52Assert.Null(textContent.AdditionalProperties); 85Assert.Null(textContent.AdditionalProperties); 159Assert.Null(text.AdditionalProperties); 161Assert.Null(text.AdditionalProperties); 171Assert.Null(text.AdditionalProperties); 173Assert.Null(text.AdditionalProperties); 183Assert.Null(text.AdditionalProperties); 185Assert.Null(text.AdditionalProperties); 195Assert.Null(text.AdditionalProperties); 197Assert.Null(text.AdditionalProperties); 256Assert.Null(text.AdditionalProperties); 258Assert.Null(text.AdditionalProperties); 264Assert.Null(text.AdditionalProperties); 266Assert.Null(text.AdditionalProperties); 277Assert.Null(text.AdditionalProperties); 279Assert.Null(text.AdditionalProperties); 413Assert.Null(text.AdditionalProperties); 415Assert.Null(text.AdditionalProperties); 427Assert.Null(frc.AdditionalProperties); 429Assert.Null(frc.AdditionalProperties);