13 references to ToChatCompletionAsync
Microsoft.Extensions.AI (1)
ChatCompletion\AnonymousDelegatingChatClient.cs (1)
118.ToChatCompletionAsync(coalesceContent: true, cancellationToken);
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\StreamingChatCompletionUpdate.cs (1)
33/// codified in the <see cref="StreamingChatCompletionUpdateExtensions.ToChatCompletionAsync"/> and
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (1)
66return ToChatCompletionAsync(updates, coalesceContent, cancellationToken);
Microsoft.Extensions.AI.Abstractions.Tests (4)
ChatCompletion\StreamingChatCompletionUpdateExtensionsTests.cs (4)
57(false, true) => await YieldAsync(updates).ToChatCompletionAsync(), 60(true, true) => await YieldAsync(updates).ToChatCompletionAsync(coalesceContent.GetValueOrDefault()), 178ChatCompletion completion = useAsync ? await YieldAsync(updates).ToChatCompletionAsync() : updates.ToChatCompletion(); 202ChatCompletion completion = await YieldAsync(updates).ToChatCompletionAsync();
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
379Validate(await Assert.ThrowsAsync<InvalidOperationException>(() => service.CompleteStreamingAsync(chat, options).ToChatCompletionAsync())); 593var result = await service.CompleteStreamingAsync(chat, options, cts.Token).ToChatCompletionAsync();
ChatCompletion\UseDelegateChatClientTests.cs (4)
79completion = await client.CompleteStreamingAsync(expectedMessages, expectedOptions, expectedCts.Token).ToChatCompletionAsync(); 121completion = await client.CompleteStreamingAsync(expectedMessages, expectedOptions, expectedCts.Token).ToChatCompletionAsync(); 172completion = await client.CompleteStreamingAsync(expectedMessages, expectedOptions, expectedCts.Token).ToChatCompletionAsync(); 243completion = await client.CompleteStreamingAsync(expectedMessages, expectedOptions, expectedCts.Token).ToChatCompletionAsync();