15 implementations of GetResponseAsync
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\DelegatingChatClient.cs (1)
43public virtual Task<ChatResponse> GetResponseAsync(
ChatRouting\RoutingChatClient.cs (1)
64public virtual async Task<ChatResponse> GetResponseAsync(
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatRouting\RoutingChatClientTests.cs (1)
162public Task<ChatResponse> GetResponseAsync(
TestChatClient.cs (1)
29public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyChatClient.cs (1)
50public async Task<ChatResponse> GetResponseAsync(
Microsoft.Extensions.AI.Integration.Tests (2)
ChatClientIntegrationTests.cs (1)
1383public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
29public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.OpenAI (3)
OpenAIAssistantsChatClient.cs (1)
71public Task<ChatResponse> GetResponseAsync(
OpenAIChatClient.cs (1)
90public async Task<ChatResponse> GetResponseAsync(
OpenAIResponsesChatClient.cs (1)
101public async Task<ChatResponse> GetResponseAsync(
Microsoft.Extensions.AI.Tests (3)
ChatRouting\OrderedFailoverChatClientTests.cs (1)
381public Task<ChatResponse> GetResponseAsync(
ChatRouting\SemanticRoutingChatClientTests.cs (1)
242public Task<ChatResponse> GetResponseAsync(
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
29public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.DataIngestion.Tests (1)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
29public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.Core (1)
CausalLMPipelineChatClient.cs (1)
36public virtual Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
121 references to GetResponseAsync
Microsoft.Extensions.AI (14)
ChatCompletion\AnonymousDelegatingChatClient.cs (1)
103response = await InnerClient.GetResponseAsync(messages, options, cancellationToken);
ChatCompletion\CachingChatClient.cs (2)
154/// This is used when there is a call to <see cref="IChatClient.GetResponseAsync"/>. 174/// This is used when there is a call to <see cref="IChatClient.GetResponseAsync"/>.
ChatCompletion\ChatClientBuilder.cs (7)
92/// an implementation for both <see cref="IChatClient.GetResponseAsync"/> and <see cref="IChatClient.GetStreamingResponseAsync"/>. 95/// A delegate that provides the implementation for both <see cref="IChatClient.GetResponseAsync"/> and 117/// an implementation for both <see cref="IChatClient.GetResponseAsync"/> and <see cref="IChatClient.GetStreamingResponseAsync"/>. 120/// A delegate that provides the implementation for <see cref="IChatClient.GetResponseAsync"/>. When <see langword="null"/>, 121/// <paramref name="getStreamingResponseFunc"/> must be non-null, and the implementation of <see cref="IChatClient.GetResponseAsync"/> 132/// <paramref name="getResponseFunc"/> will provide the implementation of <see cref="IChatClient.GetResponseAsync"/>, and 138/// <see cref="IChatClient.GetResponseAsync"/> will be implemented by combining the updates from <paramref name="getStreamingResponseFunc"/>.
ChatCompletion\ChatClientStructuredOutputExtensions.cs (1)
200var result = await chatClient.GetResponseAsync(messages, options, cancellationToken);
ChatCompletion\FunctionInvocationContext.cs (1)
92/// <see cref="IChatClient.GetStreamingResponseAsync"/> call as opposed to a <see cref="IChatClient.GetResponseAsync"/> call.
ChatReduction\SummarizingChatReducer.cs (1)
130var response = await chatClient.GetResponseAsync(summarizerChatMessages, cancellationToken: cancellationToken);
ChatRouting\FailoverChatClient.cs (1)
119response = await selectedClient.GetResponseAsync(
Microsoft.Extensions.AI.Abstractions (10)
ChatCompletion\ChatClientExtensions.cs (1)
120return client.GetResponseAsync([chatMessage], options, cancellationToken);
ChatCompletion\ChatOptions.cs (3)
197/// Non-streamed background responses, such as those returned by <see cref="IChatClient.GetResponseAsync"/>, 199/// and passing it to this property on subsequent calls to <see cref="IChatClient.GetResponseAsync"/>. 208/// When <see cref="IChatClient.GetResponseAsync" /> or <see cref="IChatClient.GetStreamingResponseAsync" />
ChatCompletion\ChatResponse.cs (2)
69/// the input messages supplied to <see cref="IChatClient.GetResponseAsync"/> need only be the additional messages beyond 99/// <see cref="ChatOptions.ContinuationToken"/> on subsequent calls to <see cref="IChatClient.GetResponseAsync"/>
ChatCompletion\DelegatingChatClient.cs (1)
45InnerClient.GetResponseAsync(messages, options, cancellationToken);
ChatCompletion\IChatClient.cs (1)
24/// However, implementations of <see cref="IChatClient"/> might mutate the arguments supplied to <see cref="GetResponseAsync"/> and
ChatRouting\RoutingChatClient.cs (1)
73return await client.GetResponseAsync(
ChatRouting\RoutingContext.cs (1)
14/// One context is created for each call to <see cref="IChatClient.GetResponseAsync"/> and for each enumeration
Microsoft.Extensions.AI.Evaluation.Integration.Tests (11)
AgentQualityEvaluatorTests.cs (2)
212ChatResponse response = await chatClient.GetResponseAsync(messages, _chatOptions); 225ChatResponse response = await chatClient.GetResponseAsync(messages, _chatOptionsWithTools);
QualityEvaluatorTests.cs (4)
92ChatResponse response = await chatClient.GetResponseAsync(messages, _chatOptions); 132ChatResponse response = await chatClient.GetResponseAsync(messages, _chatOptions, cancellationToken); 170ChatResponse response = await chatClient.GetResponseAsync(messages, _chatOptions); 205ChatResponse response = await chatClient.GetResponseAsync(messages, _chatOptions);
SafetyEvaluatorTests.cs (5)
196ChatResponse response = await chatClient.GetResponseAsync(messages, _chatOptions); 274ChatResponse response1 = await chatClient.GetResponseAsync(messages, _chatOptions); 280ChatResponse response2 = await chatClient.GetResponseAsync(messages, _chatOptions); 594ChatResponse response1 = await chatClient.GetResponseAsync(messages, _chatOptions); 600ChatResponse response2 = await chatClient.GetResponseAsync(messages, _chatOptions);
Microsoft.Extensions.AI.Evaluation.Quality (12)
CoherenceEvaluator.cs (1)
95chatConfiguration.ChatClient.GetResponseAsync(
CompletenessEvaluator.cs (1)
100chatConfiguration.ChatClient.GetResponseAsync(
EquivalenceEvaluator.cs (1)
103chatConfiguration.ChatClient.GetResponseAsync(
FluencyEvaluator.cs (1)
87chatConfiguration.ChatClient.GetResponseAsync(
GroundednessEvaluator.cs (1)
101chatConfiguration.ChatClient.GetResponseAsync(
IntentResolutionEvaluator.cs (1)
145chatConfiguration.ChatClient.GetResponseAsync(
RelevanceEvaluator.cs (1)
100chatConfiguration.ChatClient.GetResponseAsync(
RelevanceTruthAndCompletenessEvaluator.cs (1)
122chatConfiguration.ChatClient.GetResponseAsync(
RetrievalEvaluator.cs (1)
116chatConfiguration.ChatClient.GetResponseAsync(
TaskAdherenceEvaluator.cs (1)
144chatConfiguration.ChatClient.GetResponseAsync(
ToolCallAccuracyEvaluator.cs (1)
144chatConfiguration.ChatClient.GetResponseAsync(
Utilities\JsonOutputFixer.cs (1)
72await chatConfig.ChatClient.GetResponseAsync(
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyChatClient.cs (1)
76return await _originalChatClient.GetResponseAsync(
Microsoft.Extensions.AI.Integration.Tests (18)
ChatClientIntegrationTests.cs (16)
66var response = await ChatClient.GetResponseAsync( 84var response = await ChatClient.GetResponseAsync( 181var response = await ChatClient.GetResponseAsync( 199var response = await ChatClient.GetResponseAsync( 641var firstResponse = await ChatClient.GetResponseAsync([message]); 643var secondResponse = await ChatClient.GetResponseAsync([message]); 734var response = await chatClient.GetResponseAsync([message]); 741var secondResponse = await chatClient.GetResponseAsync([message]); 773var response = await chatClient.GetResponseAsync([message]); 781var secondResponse = await chatClient.GetResponseAsync([message]); 815var response = await chatClient.GetResponseAsync([message]); 824var secondResponse = await chatClient.GetResponseAsync([message]); 842await chatClient.GetResponseAsync([new(ChatRole.User, "What's the biggest animal?")]); 941var response = await chatClient.GetResponseAsync([new(ChatRole.User, "What's the biggest animal?")]); 1247var response = await chatClient.GetResponseAsync(messages, new() { Tools = [getWeather] }); 1384=> _innerChatClient.GetResponseAsync(messages, options, cancellationToken);
ImageGeneratingChatClientIntegrationTests.cs (1)
79return ValidateChatResponse(await chatClient.GetResponseAsync(messages, options));
ReducingChatClientTests.cs (1)
52await client.GetResponseAsync(messages);
Microsoft.Extensions.AI.OpenAI (2)
OpenAIClientExtensions.cs (2)
137/// <see cref="IChatClient.GetResponseAsync"/> or <see cref="IChatClient.GetStreamingResponseAsync"/> via the <see cref="ChatOptions.ConversationId"/> 153/// <see cref="IChatClient.GetResponseAsync"/> or <see cref="IChatClient.GetStreamingResponseAsync"/> via the <see cref="ChatOptions.ConversationId"/>
Microsoft.Extensions.AI.OpenAI.Tests (32)
OpenAIChatClientTests.cs (5)
827var response = await client.GetResponseAsync(messages, new() 932var response = await client.GetResponseAsync(messages); 1030var response = await client.GetResponseAsync(messages); 1484var response = await client.GetResponseAsync(messages); 1585var response = await client.GetResponseAsync(
OpenAIResponseClientIntegrationTests.cs (9)
270await client.GetResponseAsync(input, chatOptions); 301await client.GetResponseAsync(input, chatOptions); 372response = await ChatClient.GetResponseAsync([], chatOptions); 535await client.GetResponseAsync(input, chatOptions); 547await client.GetResponseAsync(input, chatOptions); 708var response1 = await ChatClient.GetResponseAsync(chatHistory, chatOptions); 726var response2 = await ChatClient.GetResponseAsync(chatHistory, chatOptions); 745var response3 = await ChatClient.GetResponseAsync(deserializedHistory, chatOptions); 761() => ChatClient.GetResponseAsync(deserializedHistory, chatOptions));
OpenAIResponseClientTests.cs (18)
653await client.GetResponseAsync(chatHistory, new() 897var response = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "Search the web for the temperature today in Fremont")], chatOptions); 1768var response = await client.GetResponseAsync(messages); 2967var response = await client.GetResponseAsync([], new() 4821var response = await client.GetResponseAsync([ 4877var response = await client.GetResponseAsync([ 4939var response = await client.GetResponseAsync([ 4996var response = await client.GetResponseAsync([ 5053var response = await client.GetResponseAsync([ 5112var response = await client.GetResponseAsync([ 5175var response = await client.GetResponseAsync([ 5230var response = await client.GetResponseAsync([ 5285var response = await client.GetResponseAsync([ 5342var response = await client.GetResponseAsync([ 5399var response = await client.GetResponseAsync([ 5568var response = await client.GetResponseAsync([ 5818await client.GetResponseAsync( 6128var response = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "")]);
Microsoft.Extensions.AI.Tests (21)
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
76var response = await client.GetResponseAsync(Array.Empty<ChatMessage>(), providedOptions, cts.Token);
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (3)
920await service.GetResponseAsync(input, options); 1002await service.GetResponseAsync(input, options); 1987var result = await service.GetResponseAsync(new EnumeratedOnceEnumerable<ChatMessage>(CloneInput(input)), options, cts.Token);
ChatCompletion\FunctionInvokingChatClientTests.cs (1)
2234var result = await service.GetResponseAsync(new EnumeratedOnceEnumerable<ChatMessage>(chat), options, cts.Token);
ChatCompletion\LoggingChatClientTests.cs (1)
68await client.GetResponseAsync(
ChatCompletion\OpenTelemetryChatClientTests.cs (7)
160await chatClient.GetResponseAsync(messages, options); 463await chatClient.GetResponseAsync(messages); 611var response = await chatClient.GetResponseAsync(messages); 717await chatClient.GetResponseAsync(messages); 853await chatClient.GetResponseAsync(messages); 992await chatClient.GetResponseAsync([new(ChatRole.User, "Hello")]); 1046chatClient.GetResponseAsync([new(ChatRole.User, "Hello")]));
ChatCompletion\ReducingChatClientTests.cs (2)
119await client.GetResponseAsync(new List<ChatMessage> { new(ChatRole.User, "Original message") }); 160await client.GetResponseAsync([]);
ChatCompletion\UseDelegateChatClientTests.cs (6)
67ChatResponse response = await client.GetResponseAsync(expectedMessages, expectedOptions, expectedCts.Token); 102var cc = await innerClient.GetResponseAsync(messages, options, cancellationToken); 110ChatResponse response = await client.GetResponseAsync(expectedMessages, expectedOptions, expectedCts.Token); 161ChatResponse response = await client.GetResponseAsync(expectedMessages, expectedOptions, expectedCts.Token); 205var cc = await innerClient.GetResponseAsync(messages, options, cancellationToken); 232ChatResponse response = await client.GetResponseAsync(expectedMessages, expectedOptions, expectedCts.Token);