8 implementations of CompleteAsync
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\DelegatingChatClient.cs (1)
54public virtual Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Abstractions.Tests (1)
TestChatClient.cs (1)
23public Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
80public async Task<ChatCompletion> CompleteAsync(
Microsoft.Extensions.AI.Integration.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
23public Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
79public async Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.OpenAI (1)
OpenAIChatClient.cs (1)
108public async Task<ChatCompletion> CompleteAsync(
Microsoft.Extensions.AI.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
23public Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.Core (1)
CausalLMPipelineChatClient.cs (1)
37public virtual Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default)
31 references to CompleteAsync
Microsoft.Extensions.AI (13)
ChatCompletion\AnonymousDelegatingChatClient.cs (3)
99completion = await InnerClient.CompleteAsync(chatMessages, options, cancellationToken).ConfigureAwait(false); 196/// Represents a method used to call <see cref="IChatClient.CompleteAsync"/> or <see cref="IChatClient.CompleteStreamingAsync"/>. 201/// A delegate that provides the implementation for the inner client's <see cref="IChatClient.CompleteAsync"/> or
ChatCompletion\CachingChatClient.cs (2)
135/// This is used when there is a call to <see cref="IChatClient.CompleteAsync(IList{ChatMessage}, ChatOptions?, CancellationToken)"/>. 153/// This is used when there is a call to <see cref="IChatClient.CompleteAsync(IList{ChatMessage}, ChatOptions?, CancellationToken)"/>.
ChatCompletion\ChatClientBuilder.cs (7)
84/// an implementation for both <see cref="IChatClient.CompleteAsync"/> and <see cref="IChatClient.CompleteStreamingAsync"/>. 87/// A delegate that provides the implementation for both <see cref="IChatClient.CompleteAsync"/> and 107/// an implementation for both <see cref="IChatClient.CompleteAsync"/> and <see cref="IChatClient.CompleteStreamingAsync"/>. 110/// A delegate that provides the implementation for <see cref="IChatClient.CompleteAsync"/>. When <see langword="null"/>, 111/// <paramref name="completeStreamingFunc"/> must be non-null, and the implementation of <see cref="IChatClient.CompleteAsync"/> 122/// <paramref name="completeFunc"/> will provide the implementation of <see cref="IChatClient.CompleteAsync"/>, and 128/// <see cref="IChatClient.CompleteAsync"/> will be implemented by combining the updates from <paramref name="completeStreamingFunc"/>.
ChatCompletion\ChatClientStructuredOutputExtensions.cs (1)
187var result = await chatClient.CompleteAsync(chatMessages, options, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\DelegatingChatClient.cs (1)
56return InnerClient.CompleteAsync(chatMessages, options, cancellationToken);
ChatCompletion\IChatClient.cs (1)
18/// However, implementations of <see cref="IChatClient"/> might mutate the arguments supplied to <see cref="CompleteAsync"/> and
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
AzureAIInferenceChatClientTests.cs (2)
315var response = await client.CompleteAsync(messages, new() 406var response = await client.CompleteAsync(messages);
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
265var response = await client.CompleteAsync(messages, new()
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIChatClientTests.cs (4)
361var response = await client.CompleteAsync(messages, new() 460var response = await client.CompleteAsync(messages); 553var response = await client.CompleteAsync(messages); 904var response = await client.CompleteAsync(messages);
Microsoft.Extensions.AI.Tests (9)
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
76var completion = await client.CompleteAsync(Array.Empty<ChatMessage>(), providedOptions, cts.Token);
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
378Validate(await Assert.ThrowsAsync<InvalidOperationException>(() => service.CompleteAsync(chat, options))); 526var result = await service.CompleteAsync(chat, options, cts.Token);
ChatCompletion\UseDelegateChatClientTests.cs (6)
75ChatCompletion completion = await client.CompleteAsync(expectedMessages, expectedOptions, expectedCts.Token); 110var cc = await innerClient.CompleteAsync(chatMessages, options, cancellationToken); 118ChatCompletion completion = await client.CompleteAsync(expectedMessages, expectedOptions, expectedCts.Token); 169ChatCompletion completion = await client.CompleteAsync(expectedMessages, expectedOptions, expectedCts.Token); 213var cc = await innerClient.CompleteAsync(chatMessages, options, cancellationToken); 240ChatCompletion completion = await client.CompleteAsync(expectedMessages, expectedOptions, expectedCts.Token);