9 writes to ProtectedData
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatResponseExtensions.cs (1)
257content.ProtectedData = protectedData;
Microsoft.Extensions.AI.Abstractions.Tests (7)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (4)
642new() { Contents = [new TextReasoningContent("A") { ProtectedData = "1" }] }, 643new() { Contents = [new TextReasoningContent("B") { ProtectedData = "2" }] }, 646new() { Contents = [new TextReasoningContent("E") { ProtectedData = "3" }] }, 647new() { Contents = [new TextReasoningContent("F") { ProtectedData = "4" }] },
Contents\TextReasoningContentTests.cs (3)
53c.ProtectedData = "protected"; 55c.ProtectedData = null; 62var content = new TextReasoningContent("reasoning text") { ProtectedData = "protected" };
Microsoft.Extensions.AI.OpenAI (1)
OpenAIResponsesChatClient.cs (1)
201ProtectedData = reasoningItem.EncryptedContent,
16 references to ProtectedData
Microsoft.Extensions.AI.Abstractions (5)
ChatCompletion\ChatResponseExtensions.cs (3)
240canMerge: static (r1, r2) => string.IsNullOrEmpty(r1.ProtectedData), // we allow merging if the first item has no ProtectedData, even if the second does 251Debug.Assert(contents[i] is TextReasoningContent { ProtectedData: null }, "Expected all but the last to have a null ProtectedData"); 255if (((TextReasoningContent)contents[end - 1]).ProtectedData is { } protectedData)
Contents\TextReasoningContent.cs (2)
45/// only <see cref="ProtectedData"/> and have an empty <see cref="Text"/> property. This data also may be associated with 49/// Note that whereas <see cref="Text"/> can be provider agnostic, <see cref="ProtectedData"/>
Microsoft.Extensions.AI.Abstractions.Tests (10)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (5)
657Assert.Equal("1", ((TextReasoningContent)message.Contents[0]).ProtectedData); 660Assert.Equal("2", ((TextReasoningContent)message.Contents[1]).ProtectedData); 663Assert.Equal("3", ((TextReasoningContent)message.Contents[2]).ProtectedData); 666Assert.Equal("4", ((TextReasoningContent)message.Contents[3]).ProtectedData); 669Assert.Null(((TextReasoningContent)message.Contents[4]).ProtectedData);
Contents\TextReasoningContentTests.cs (5)
20Assert.Null(c.ProtectedData); 52Assert.Null(c.ProtectedData); 54Assert.Equal("protected", c.ProtectedData); 56Assert.Null(c.ProtectedData); 69Assert.Equal("protected", deserializedContent.ProtectedData);
Microsoft.Extensions.AI.OpenAI (1)
OpenAIResponsesChatClient.cs (1)
1044encryptedContent: reasoningContent.ProtectedData,