49 writes to RawRepresentation
Microsoft.Extensions.AI.Abstractions.Tests (14)
Contents\AIContentTests.cs (2)
27c.RawRepresentation = raw; 41RawRepresentation = new object(),
Contents\CodeInterpreterToolCallContentTests.cs (1)
38c.RawRepresentation = raw;
Contents\CodeInterpreterToolResultContentTests.cs (1)
38c.RawRepresentation = raw;
Contents\FunctionCallContentTests.cs (1)
56c.RawRepresentation = raw;
Contents\FunctionResultContentTests.cs (1)
41c.RawRepresentation = raw;
Contents\HostedFileContentTests.cs (1)
45c.RawRepresentation = raw;
Contents\HostedVectorStoreContentTests.cs (1)
45c.RawRepresentation = raw;
Contents\ImageGenerationToolCallContentTests.cs (1)
31c.RawRepresentation = raw;
Contents\ImageGenerationToolResultContentTests.cs (1)
38c.RawRepresentation = raw;
Contents\McpServerToolCallContentTests.cs (1)
33c.RawRepresentation = raw;
Contents\McpServerToolResultContentTests.cs (1)
30c.RawRepresentation = raw;
Contents\TextContentTests.cs (1)
30c.RawRepresentation = raw;
Contents\TextReasoningContentTests.cs (1)
31c.RawRepresentation = raw;
Microsoft.Extensions.AI.OpenAI (29)
MicrosoftExtensionsAIChatExtensions.cs (2)
199fcc.RawRepresentation = toolCall; 229RawRepresentation = tcm,
OpenAIAssistantsChatClient.cs (3)
195fcc.RawRepresentation = ru; 209RawRepresentation = details, 227RawRepresentation = details,
OpenAIChatClient.cs (5)
388RawRepresentation = audioUpdate, 423RawRepresentation = tokenUsage, 515RawRepresentation = audio, 525callContent.RawRepresentation = toolCall; 792aiContent.RawRepresentation = contentPart;
OpenAIResponsesChatClient.cs (19)
194RawRepresentation = outputItem, 200fcc.RawRepresentation = outputItem; 205message.Contents.Add(new FunctionResultContent(functionCallOutputItem.CallId, functionCallOutputItem.FunctionOutput) { RawRepresentation = functionCallOutputItem }); 216RawRepresentation = mtcari, 219RawRepresentation = mtcari, 224message.Contents.Add(new McpServerToolApprovalResponseContent(mtcari.ApprovalRequestId, mtcari.Approved) { RawRepresentation = mtcari }); 246message.Contents.Add(new() { RawRepresentation = outputItem }); 418RawRepresentation = imageGenInProgress, 431RawRepresentation = codeInterpreterDeltaUpdate, 453RawRepresentation = mtcari, 456RawRepresentation = mtcari, 497yield return CreateUpdate(new AIContent { RawRepresentation = outputItemDoneUpdate.Item }); 1316content.RawRepresentation = part; 1379RawRepresentation = mtci, 1403CodeInterpreterCallImageOutput cicio => new UriContent(cicio.ImageUri, OpenAIClientExtensions.ImageUriToMediaType(cicio.ImageUri)) { RawRepresentation = cicio }, 1404CodeInterpreterCallLogsOutput ciclo => new TextContent(ciclo.Logs) { RawRepresentation = ciclo }, 1407RawRepresentation = cicri, 1423RawRepresentation = outputItem, 1436RawRepresentation = update,
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIConversionTests.cs (4)
766new AIContent { RawRepresentation = ResponseItem.CreateWebSearchCallItem() }, 767new AIContent { RawRepresentation = ResponseItem.CreateReferenceItem("123") }, 774new AIContent { RawRepresentation = ResponseItem.CreateReasoningItem("text") }, 778new AIContent { RawRepresentation = ResponseItem.CreateSystemMessageItem("test") },
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
408RawRepresentation = "CustomRaw" 2267RawRepresentation = fcc.RawRepresentation
64 references to RawRepresentation
Microsoft.Extensions.AI.Abstractions.Tests (45)
Contents\AIContentTests.cs (5)
16Assert.Null(c.RawRepresentation); 25Assert.Null(c.RawRepresentation); 28Assert.Same(raw, c.RawRepresentation); 45Assert.NotNull(original.RawRepresentation); 53Assert.Null(deserialized.RawRepresentation);
Contents\CodeInterpreterToolCallContentTests.cs (3)
16Assert.Null(c.RawRepresentation); 36Assert.Null(c.RawRepresentation); 39Assert.Same(raw, c.RawRepresentation);
Contents\CodeInterpreterToolResultContentTests.cs (3)
16Assert.Null(c.RawRepresentation); 36Assert.Null(c.RawRepresentation); 39Assert.Same(raw, c.RawRepresentation);
Contents\FunctionCallContentTests.cs (4)
23Assert.Null(c.RawRepresentation); 41Assert.Null(c.RawRepresentation); 54Assert.Null(c.RawRepresentation); 57Assert.Same(raw, c.RawRepresentation);
Contents\FunctionResultContentTests.cs (4)
17Assert.Null(c.RawRepresentation); 27Assert.Null(c.RawRepresentation); 39Assert.Null(c.RawRepresentation); 42Assert.Same(raw, c.RawRepresentation);
Contents\HostedFileContentTests.cs (3)
25Assert.Null(c.RawRepresentation); 43Assert.Null(c.RawRepresentation); 46Assert.Same(raw, c.RawRepresentation);
Contents\HostedVectorStoreContentTests.cs (3)
24Assert.Null(c.RawRepresentation); 43Assert.Null(c.RawRepresentation); 46Assert.Same(raw, c.RawRepresentation);
Contents\ImageGenerationToolCallContentTests.cs (3)
15Assert.Null(c.RawRepresentation); 29Assert.Null(c.RawRepresentation); 32Assert.Same(raw, c.RawRepresentation);
Contents\ImageGenerationToolResultContentTests.cs (3)
16Assert.Null(c.RawRepresentation); 36Assert.Null(c.RawRepresentation); 39Assert.Same(raw, c.RawRepresentation);
Contents\McpServerToolCallContentTests.cs (3)
17Assert.Null(c.RawRepresentation); 31Assert.Null(c.RawRepresentation); 34Assert.Same(raw, c.RawRepresentation);
Contents\McpServerToolResultContentTests.cs (3)
18Assert.Null(c.RawRepresentation); 28Assert.Null(c.RawRepresentation); 31Assert.Same(raw, c.RawRepresentation);
Contents\TextContentTests.cs (3)
18Assert.Null(c.RawRepresentation); 28Assert.Null(c.RawRepresentation); 31Assert.Same(raw, c.RawRepresentation);
Contents\TextReasoningContentTests.cs (3)
18Assert.Null(c.RawRepresentation); 29Assert.Null(c.RawRepresentation); 32Assert.Same(raw, c.RawRepresentation);
Contents\UsageContentTests.cs (2)
22Assert.Null(c.RawRepresentation); 39Assert.Null(c.RawRepresentation);
Microsoft.Extensions.AI.OpenAI (7)
OpenAIAssistantsChatClient.cs (1)
536case AIContent when content.RawRepresentation is MessageContent rawRep:
OpenAIChatClient.cs (2)
258if (content.RawRepresentation is ChatMessageContentPart raw) 283case AIContent when content.RawRepresentation is ChatMessageContentPart rawContentPart:
OpenAIResponsesChatClient.cs (4)
921{ RawRepresentation: ResponseItem rawRep } => rawRep, 945case AIContent when item.RawRepresentation is ResponseContentPart rawRep: 1000case AIContent when item.RawRepresentation is ResponseItem rawRep: 1134case AIContent when item.RawRepresentation is ResponseItem rawRep:
Microsoft.Extensions.AI.OpenAI.Tests (10)
OpenAIConversionTests.cs (4)
786Assert.Same(messages[0].Contents[1].RawRepresentation, items[1]); 787Assert.Same(messages[0].Contents[2].RawRepresentation, items[2]); 791Assert.Same(messages[1].Contents[1].RawRepresentation, items[5]); 792Assert.Same(messages[2].Contents[0].RawRepresentation, items[6]);
OpenAIResponseClientIntegrationTests.cs (3)
593Assert.NotNull(reasoningContent.RawRepresentation); 613Assert.Null(deserializedReasoning.RawRepresentation); 693Assert.Null(deserializedReasoning.RawRepresentation);
OpenAIResponseClientTests.cs (3)
824Assert.NotNull(computerUserItem.RawRepresentation); 826Assert.IsType<ComputerCallResponseItem>(computerUserItem.RawRepresentation); 926var ccri = Assert.IsType<ComputerCallResponseItem>(content.RawRepresentation);
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
434Assert.Equal("CustomRaw", capturedFrc.RawRepresentation); 2267RawRepresentation = fcc.RawRepresentation