Implemented interface members:
4 writes to
Microsoft.Extensions.AI.Abstractions (1)
UsageDetails.cs (1)
49AdditionalCounts[kvp.Key] = AdditionalCounts.TryGetValue(kvp.Key, out var existingValue) ?
Microsoft.Extensions.AI.Abstractions.Tests (2)
AdditionalPropertiesDictionaryTests.cs (2)
76d["key"] = input; 88d["key"] = input;
Microsoft.Extensions.AI.OpenAI (1)
OpenAIModelMapper.ChatCompletion.cs (1)
350additionalProperties["Strict"] = strictValue;
33 references to
Microsoft.Extensions.AI.Abstractions.Tests (20)
AdditionalPropertiesDictionaryTests.cs (8)
39Assert.Equal("value2", d["key1"]); 40Assert.Equal("value2", d["kEY1"]); 42Assert.Equal("value3", d["key2"]); 43Assert.Equal("value3", d["KEY2"]); 45Assert.Equal("value5", d["Key3"]); 46Assert.Equal("value5", d["KEy3"]); 102Assert.Equal("value", d["key"]); 106Assert.Equal("value", d["key"]);
ChatCompletion\ChatMessageTests.cs (7)
307Assert.Equal("message-metadata-value-1", deserializedMessage.AdditionalProperties["message-metadata-key-1"]?.ToString()); 317Assert.Equal("metadata-value-1", textContent.AdditionalProperties["metadata-key-1"]?.ToString()); 325Assert.Equal("metadata-value-2", imageContent.AdditionalProperties["metadata-key-2"]?.ToString()); 333Assert.Equal("metadata-value-3", dataContent.AdditionalProperties["metadata-key-3"]?.ToString()); 341Assert.Equal("metadata-value-4", audioContent.AdditionalProperties["metadata-key-4"]?.ToString()); 349Assert.Equal("metadata-value-5", imageContent.AdditionalProperties["metadata-key-5"]?.ToString()); 356Assert.Equal("metadata-value-6", textContent.AdditionalProperties["metadata-key-6"]?.ToString());
ChatCompletion\StreamingChatCompletionUpdateExtensionsTests.cs (5)
76Assert.Equal("b", message.AdditionalProperties["a"]); 77Assert.Equal("d", message.AdditionalProperties["c"]); 84Assert.Equal("h", message.AdditionalProperties["g"]); 85Assert.Equal("f", message.AdditionalProperties["e"]); 86Assert.Equal(42, message.AdditionalProperties["i"]);
Microsoft.Extensions.AI.OpenAI.Tests (11)
OpenAIChatClientTests.cs (4)
211Assert.Equal("fp_f85bea6784", response.AdditionalProperties[nameof(OpenAI.Chat.ChatCompletion.SystemFingerprint)]); 558Assert.Equal("fp_f85bea6784", response.AdditionalProperties[nameof(OpenAI.Chat.ChatCompletion.SystemFingerprint)]); 657Assert.Equal("fp_f85bea6784", response.AdditionalProperties[nameof(OpenAI.Chat.ChatCompletion.SystemFingerprint)]); 1028Assert.Equal("fp_f85bea6784", response.AdditionalProperties[nameof(OpenAI.Chat.ChatCompletion.SystemFingerprint)]);
OpenAISerializationTests.cs (7)
142Assert.Equal("user", request.Options.AdditionalProperties["EndUserId"]); 143Assert.True((bool)request.Options.AdditionalProperties["IncludeLogProbabilities"]!); 144Assert.Single((IDictionary<int, int>)request.Options.AdditionalProperties["LogitBiases"]!); 145Assert.True((bool)request.Options.AdditionalProperties["AllowParallelToolCalls"]!); 146Assert.Equal(42, request.Options.AdditionalProperties["TopLogProbabilityCount"]!); 147Assert.Single((IDictionary<string, string>)request.Options.AdditionalProperties["Metadata"]!); 148Assert.True((bool)request.Options.AdditionalProperties["StoredOutputEnabled"]!);
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
631Assert.Equal(expectedTotalTokenCounts, actualUsage.AdditionalCounts["firstValue"]); 632Assert.Equal(expectedTotalTokenCounts, actualUsage.AdditionalCounts["secondValue"]);