47 writes to RawRepresentation
Microsoft.Extensions.AI.Abstractions.Tests (12)
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)
55c.RawRepresentation = raw;
Contents\FunctionResultContentTests.cs (1)
41c.RawRepresentation = raw;
Contents\HostedFileContentTests.cs (1)
45c.RawRepresentation = raw;
Contents\HostedVectorStoreContentTests.cs (1)
45c.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.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
109callContent.RawRepresentation = toolCall;
Microsoft.Extensions.AI.OpenAI (30)
MicrosoftExtensionsAIChatExtensions.cs (2)
192fcc.RawRepresentation = toolCall; 220RawRepresentation = tcm,
OpenAIAssistantsChatClient.cs (3)
192fcc.RawRepresentation = ru; 206RawRepresentation = details, 224RawRepresentation = details,
OpenAIChatClient.cs (5)
370RawRepresentation = audioUpdate, 405RawRepresentation = tokenUsage, 488RawRepresentation = audio, 498callContent.RawRepresentation = toolCall; 738aiContent.RawRepresentation = contentPart;
OpenAIResponsesChatClient.cs (20)
202RawRepresentation = outputItem, 208fcc.RawRepresentation = outputItem; 213message.Contents.Add(new FunctionResultContent(functionCallOutputItem.CallId, functionCallOutputItem.FunctionOutput) { RawRepresentation = functionCallOutputItem }); 224RawRepresentation = mtcari, 227RawRepresentation = mtcari, 232message.Contents.Add(new McpServerToolApprovalResponseContent(mtcari.ApprovalRequestId, mtcari.Approved) { RawRepresentation = mtcari }); 240message.Contents.Add(new() { RawRepresentation = outputItem }); 403yield return CreateUpdate(new AIContent { RawRepresentation = mtdli }); 410RawRepresentation = mtcari, 413RawRepresentation = mtcari, 1084TextContent text = new(part.Text) { RawRepresentation = part }; 1092results.Add(new HostedFileContent(part.InputImageFileId) { MediaType = "image/*", RawRepresentation = part }); 1096results.Add(new HostedFileContent(part.InputFileId) { Name = part.InputFilename, RawRepresentation = part }); 1103RawRepresentation = part, 1113RawRepresentation = part, 1118results.Add(new() { RawRepresentation = part }); 1180RawRepresentation = mtci, 1215CodeInterpreterCallImageOutput cicio => new UriContent(cicio.ImageUri, OpenAIClientExtensions.ImageUriToMediaType(cicio.ImageUri)) { RawRepresentation = cicio }, 1216CodeInterpreterCallLogsOutput ciclo => new TextContent(ciclo.Logs) { RawRepresentation = ciclo }, 1219RawRepresentation = cicri,
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIConversionTests.cs (4)
563new AIContent { RawRepresentation = ResponseItem.CreateWebSearchCallItem() }, 564new AIContent { RawRepresentation = ResponseItem.CreateReferenceItem("123") }, 571new AIContent { RawRepresentation = ResponseItem.CreateReasoningItem("text") }, 575new AIContent { RawRepresentation = ResponseItem.CreateSystemMessageItem("test") },
50 references to RawRepresentation
Microsoft.Extensions.AI.Abstractions.Tests (39)
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); 40Assert.Null(c.RawRepresentation); 53Assert.Null(c.RawRepresentation); 56Assert.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\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)
530case AIContent when content.RawRepresentation is MessageContent rawRep:
OpenAIChatClient.cs (2)
250if (content.RawRepresentation is ChatMessageContentPart raw) 275case AIContent when content.RawRepresentation is ChatMessageContentPart rawContentPart:
OpenAIResponsesChatClient.cs (4)
767{ RawRepresentation: ResponseItem rawRep } => rawRep, 791case AIContent when item.RawRepresentation is ResponseContentPart rawRep: 846case AIContent when item.RawRepresentation is ResponseItem rawRep: 980case AIContent when item.RawRepresentation is ResponseItem rawRep:
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIConversionTests.cs (4)
583Assert.Same(messages[0].Contents[1].RawRepresentation, items[1]); 584Assert.Same(messages[0].Contents[2].RawRepresentation, items[2]); 588Assert.Same(messages[1].Contents[1].RawRepresentation, items[5]); 589Assert.Same(messages[2].Contents[0].RawRepresentation, items[6]);