9 implementations of CompleteAsync
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\DelegatingChatClient.cs (1)
41public virtual Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Abstractions.Tests (1)
TestChatClient.cs (1)
29public 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)
29public Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
81public async Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.OpenAI (2)
OpenAIAssistantClient.cs (1)
72public Task<ChatCompletion> CompleteAsync(
OpenAIChatClient.cs (1)
102public async Task<ChatCompletion> CompleteAsync(
Microsoft.Extensions.AI.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
29public 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)
33 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)
229var result = await chatClient.CompleteAsync(chatMessages, options, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.Abstractions (3)
ChatCompletion\ChatCompletion.cs (1)
67/// the input messages supplied to <see cref="IChatClient.CompleteAsync"/> need only be the additional messages beyond
ChatCompletion\DelegatingChatClient.cs (1)
43return 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 (3)
AzureAIInferenceChatClientTests.cs (3)
154var response = await client.CompleteAsync(chatMessages, new() 515var response = await client.CompleteAsync(messages, new() 656var response = await client.CompleteAsync(messages);
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
267var response = await client.CompleteAsync(messages, new()
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIChatClientTests.cs (4)
447var response = await client.CompleteAsync(messages, new() 554var response = await client.CompleteAsync(messages); 655var response = await client.CompleteAsync(messages); 1032var 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)
386Validate(await Assert.ThrowsAsync<InvalidOperationException>(() => service.CompleteAsync(chat, options))); 737var 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);