77 references to ChatResponseUpdate
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
628
new
()
Microsoft.Extensions.AI.Abstractions (3)
ChatCompletion\ChatResponse.cs (2)
129
extra = new
ChatResponseUpdate
147
updates[i] = new
ChatResponseUpdate
ChatCompletion\ChatResponseUpdate.cs (1)
69
new
()
Microsoft.Extensions.AI.Abstractions.Tests (46)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (37)
35
new
() { Contents = [new UsageContent(new() { InputTokenCount = 1, OutputTokenCount = 2 })] },
36
new
() { Contents = [new UsageContent(new() { InputTokenCount = 4, OutputTokenCount = 5 })] },
577
updates.Add(
new
() { Contents = [new DataContent("data:image/png;base64,aGVsbG8=")] });
607
new
() { Contents = [new TextReasoningContent("D")] },
608
new
() { Contents = [new TextReasoningContent("E")] },
609
new
() { Contents = [new TextReasoningContent("F")] },
612
new
() { Contents = [new TextReasoningContent("I")] },
613
new
() { Contents = [new TextReasoningContent("J")] },
615
new
() { Contents = [new TextReasoningContent("L")] },
618
new
() { Contents = [new TextReasoningContent("O")] },
619
new
() { Contents = [new TextReasoningContent("P")] },
642
new
() { Contents = [new TextReasoningContent("A") { ProtectedData = "1" }] },
643
new
() { Contents = [new TextReasoningContent("B") { ProtectedData = "2" }] },
644
new
() { Contents = [new TextReasoningContent("C")] },
645
new
() { Contents = [new TextReasoningContent("D")] },
646
new
() { Contents = [new TextReasoningContent("E") { ProtectedData = "3" }] },
647
new
() { Contents = [new TextReasoningContent("F") { ProtectedData = "4" }] },
648
new
() { Contents = [new TextReasoningContent("G")] },
649
new
() { Contents = [new TextReasoningContent("H")] },
682
new
() { Contents = [new TextContent("D") { Annotations = [new()] }] },
683
new
() { Contents = [new TextContent("E") { Annotations = [new()] }] },
684
new
() { Contents = [new TextContent("F") { Annotations = [new()] }] },
685
new
() { Contents = [new TextContent("G") { Annotations = [] }] },
686
new
() { Contents = [new TextContent("H") { Annotations = [] }] },
687
new
() { Contents = [new TextContent("I") { Annotations = [new()] }] },
688
new
() { Contents = [new TextContent("J") { Annotations = [new()] }] },
690
new
() { Contents = [new TextContent("L") { Annotations = [new()] }] },
693
new
() { Contents = [new TextContent("O") { Annotations = [new()] }] },
694
new
() { Contents = [new TextContent("P") { Annotations = [new()] }] },
721
new
() { Contents = [new UsageContent(new() { TotalTokenCount = 42 })] },
843
new
() { Contents = [new ImageGenerationToolResultContent { ImageId = "img1", Outputs = [image1] }] },
846
new
() { Contents = [new ImageGenerationToolResultContent { ImageId = "img2", Outputs = [image2] }] },
849
new
() { Contents = [new ImageGenerationToolResultContent { ImageId = "img1", Outputs = [image3] }] },
852
new
() { Contents = [new ImageGenerationToolResultContent { ImageId = "img2", Outputs = [image4] }] },
897
new
() { Contents = [new ImageGenerationToolResultContent { ImageId = null, Outputs = [image1] }] },
900
new
() { Contents = [new ImageGenerationToolResultContent { ImageId = "", Outputs = [image2] }] },
903
new
() { Contents = [new ImageGenerationToolResultContent { ImageId = null, Outputs = [image3] }] },
ChatCompletion\ChatResponseUpdateTests.cs (9)
16
ChatResponseUpdate update =
new
();
33
ChatResponseUpdate update =
new
();
87
ChatResponseUpdate update =
new
()
115
ChatResponseUpdate original =
new
()
180
var original = new
ChatResponseUpdate
221
var original = new
ChatResponseUpdate
249
var original = new
ChatResponseUpdate
();
273
var original = new
ChatResponseUpdate
308
var original = new
ChatResponseUpdate
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
165
ChatResponseUpdate responseUpdate =
new
()
220
var responseUpdate = new
ChatResponseUpdate
Microsoft.Extensions.AI.OpenAI (4)
OpenAIAssistantsChatClient.cs (2)
164
ChatResponseUpdate ruUpdate =
new
()
301
yield return
new
()
OpenAIChatClient.cs (2)
349
ChatResponseUpdate responseUpdate =
new
()
416
ChatResponseUpdate responseUpdate =
new
()
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIConversionTests.cs (1)
1007
var responseUpdate = new
ChatResponseUpdate
Microsoft.Extensions.AI.Tests (20)
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
38
var expectedUpdates = Enumerable.Range(0, 3).Select(i => new
ChatResponseUpdate
()).ToArray();
ChatCompletion\DistributedCachingChatClientTest.cs (8)
249
new
()
262
new
()
267
new
()
315
new
() { Role = ChatRole.Assistant, Contents = [new FunctionCallContent("callId1", "separator")] },
368
new
() { Role = ChatRole.Assistant, Contents = [new TextContent("Hello")] },
369
new
() { Role = ChatRole.Assistant, Contents = [new TextContent(" world, ")] },
370
new
()
381
new
()
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
760
new
() { Contents = [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["text"] = "Input 1" })] },
761
new
() { Contents = [new FunctionCallContent("callId2", "Func1", new Dictionary<string, object?> { ["text"] = "Input 2" })] }
766
updates = [
new
() { Contents = [new TextContent("OK bye")] }];
ChatCompletion\OpenTelemetryChatClientTests.cs (8)
75
yield return new
ChatResponseUpdate
80
yield return new
ChatResponseUpdate
372
yield return
new
() { Contents = [new TextReasoningContent("This is reasoning")] };
373
yield return
new
() { Contents = [new FunctionCallContent("call-123", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" })] };
374
yield return
new
() { Contents = [new FunctionResultContent("call-123", "72°F and sunny")] };
375
yield return
new
() { Contents = [new DataContent(Convert.FromBase64String("aGVsbG8gd29ybGQ="), "image/png")] };
376
yield return
new
() { Contents = [new UriContent(new Uri("https://example.com/image.jpg"), "image/jpeg")] };
377
yield return
new
() { Contents = [new HostedFileContent("file-abc123")] };