13 writes to AdditionalProperties
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
221
AdditionalProperties
= firstText.AdditionalProperties?.Clone(),
Microsoft.Extensions.AI.Abstractions.Tests (10)
ChatCompletion\ChatMessageTests.cs (6)
266
AdditionalProperties
= new() { ["metadata-key-1"] = "metadata-value-1" }
270
AdditionalProperties
= new() { ["metadata-key-2"] = "metadata-value-2" }
274
AdditionalProperties
= new() { ["metadata-key-3"] = "metadata-value-3" }
278
AdditionalProperties
= new() { ["metadata-key-4"] = "metadata-value-4" }
282
AdditionalProperties
= new() { ["metadata-key-5"] = "metadata-value-5" }
286
AdditionalProperties
= new() { ["metadata-key-6"] = "metadata-value-6" }
Contents\AIContentTests.cs (1)
30
c.
AdditionalProperties
= props;
Contents\FunctionCallContentTests..cs (1)
60
c.
AdditionalProperties
= props;
Contents\FunctionResultContentTests.cs (1)
48
c.
AdditionalProperties
= props;
Contents\TextContentTests.cs (1)
34
c.
AdditionalProperties
= props;
Microsoft.Extensions.AI.OpenAI (2)
OpenAIChatClient.cs (2)
559
(imageContent.
AdditionalProperties
??= [])[nameof(contentPart.ImageDetailLevel)] = detail;
567
(aiContent.
AdditionalProperties
??= [])[nameof(contentPart.Refusal)] = refusal;
36 references to AdditionalProperties
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
221
AdditionalProperties = firstText.
AdditionalProperties
?.Clone(),
Microsoft.Extensions.AI.Abstractions.Tests (35)
ChatCompletion\ChatMessageTests.cs (18)
315
Assert.NotNull(textContent.
AdditionalProperties
);
316
Assert.Single(textContent.
AdditionalProperties
);
317
Assert.Equal("metadata-value-1", textContent.
AdditionalProperties
["metadata-key-1"]?.ToString());
323
Assert.NotNull(imageContent.
AdditionalProperties
);
324
Assert.Single(imageContent.
AdditionalProperties
);
325
Assert.Equal("metadata-value-2", imageContent.
AdditionalProperties
["metadata-key-2"]?.ToString());
331
Assert.NotNull(dataContent.
AdditionalProperties
);
332
Assert.Single(dataContent.
AdditionalProperties
);
333
Assert.Equal("metadata-value-3", dataContent.
AdditionalProperties
["metadata-key-3"]?.ToString());
339
Assert.NotNull(audioContent.
AdditionalProperties
);
340
Assert.Single(audioContent.
AdditionalProperties
);
341
Assert.Equal("metadata-value-4", audioContent.
AdditionalProperties
["metadata-key-4"]?.ToString());
347
Assert.NotNull(imageContent.
AdditionalProperties
);
348
Assert.Single(imageContent.
AdditionalProperties
);
349
Assert.Equal("metadata-value-5", imageContent.
AdditionalProperties
["metadata-key-5"]?.ToString());
354
Assert.NotNull(textContent.
AdditionalProperties
);
355
Assert.Single(textContent.
AdditionalProperties
);
356
Assert.Equal("metadata-value-6", textContent.
AdditionalProperties
["metadata-key-6"]?.ToString());
Contents\AIContentTests.cs (3)
15
Assert.Null(c.
AdditionalProperties
);
28
Assert.Null(c.
AdditionalProperties
);
31
Assert.Same(props, c.
AdditionalProperties
);
Contents\DataContentTests{T}.cs (1)
195
Assert.Equal("value", content.
AdditionalProperties
!["key"]!.ToString());
Contents\FunctionCallContentTests..cs (4)
24
Assert.Null(c.
AdditionalProperties
);
41
Assert.Null(c.
AdditionalProperties
);
58
Assert.Null(c.
AdditionalProperties
);
61
Assert.Same(props, c.
AdditionalProperties
);
Contents\FunctionResultContentTests.cs (4)
19
Assert.Null(c.
AdditionalProperties
);
29
Assert.Null(c.
AdditionalProperties
);
46
Assert.Null(c.
AdditionalProperties
);
49
Assert.Same(props, c.
AdditionalProperties
);
Contents\TextContentTests.cs (3)
18
Assert.Null(c.
AdditionalProperties
);
32
Assert.Null(c.
AdditionalProperties
);
35
Assert.Same(props, c.
AdditionalProperties
);
Contents\UsageContentTests.cs (2)
22
Assert.Null(c.
AdditionalProperties
);
39
Assert.Null(c.
AdditionalProperties
);