File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
dotnet/src/SemanticKernel.UnitTests/AI/ChatCompletion Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -671,15 +671,10 @@ public async Task GetStreamingChatMessageContentsAsyncShouldMaintainFunctionCall
671671 var service = chatClient . AsChatCompletionService ( ) ;
672672
673673 // Act
674- var results = new List < StreamingChatMessageContent > ( ) ;
675- await foreach ( var update in service . GetStreamingChatMessageContentsAsync ( chatHistory ) )
676- {
677- results . Add ( update ) ;
678- }
674+ await service . GetStreamingChatMessageContentsAsync ( chatHistory ) . ToListAsync ( ) ;
679675
680676 // Assert
681677 Assert . Collection ( chatHistory ,
682- // Function calls
683678 call1 =>
684679 {
685680 Assert . Equal ( AuthorRole . Assistant , call1 . Role ) ;
@@ -704,7 +699,6 @@ public async Task GetStreamingChatMessageContentsAsyncShouldMaintainFunctionCall
704699 Assert . Equal ( "call-2" , functionCall . Id ) ;
705700 Assert . Equal ( "Func2" , functionCall . FunctionName ) ;
706701 } ,
707- // Second function result added to history
708702 result2 =>
709703 {
710704 Assert . Equal ( AuthorRole . Tool , result2 . Role ) ;
You can’t perform that action at this time.
0 commit comments