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