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)
66
return
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()),
178
ChatCompletion completion = useAsync ? await YieldAsync(updates).
ToChatCompletionAsync
() : updates.ToChatCompletion();
202
ChatCompletion completion = await YieldAsync(updates).
ToChatCompletionAsync
();
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
379
Validate(await Assert.ThrowsAsync<InvalidOperationException>(() => service.CompleteStreamingAsync(chat, options).
ToChatCompletionAsync
()));
593
var result = await service.CompleteStreamingAsync(chat, options, cts.Token).
ToChatCompletionAsync
();
ChatCompletion\UseDelegateChatClientTests.cs (4)
79
completion = await client.CompleteStreamingAsync(expectedMessages, expectedOptions, expectedCts.Token).
ToChatCompletionAsync
();
121
completion = await client.CompleteStreamingAsync(expectedMessages, expectedOptions, expectedCts.Token).
ToChatCompletionAsync
();
172
completion = await client.CompleteStreamingAsync(expectedMessages, expectedOptions, expectedCts.Token).
ToChatCompletionAsync
();
243
completion = await client.CompleteStreamingAsync(expectedMessages, expectedOptions, expectedCts.Token).
ToChatCompletionAsync
();