14 implementations of GetStreamingResponseAsync
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\DelegatingChatClient.cs (1)
48public virtual IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
ChatRouting\RoutingChatClient.cs (1)
80public virtual async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatRouting\RoutingChatClientTests.cs (1)
167public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
TestChatClient.cs (1)
32public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyChatClient.cs (1)
83public async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Microsoft.Extensions.AI.Integration.Tests (2)
ChatClientIntegrationTests.cs (1)
1386public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
32public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.OpenAI (2)
OpenAIChatClient.cs (1)
111public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
OpenAIResponsesChatClient.cs (1)
325public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
Microsoft.Extensions.AI.Tests (3)
ChatRouting\OrderedFailoverChatClientTests.cs (1)
386public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
ChatRouting\SemanticRoutingChatClientTests.cs (1)
247public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
32public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.DataIngestion.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
32public IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.Core (1)
CausalLMPipelineChatClient.cs (1)
57public virtual async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(
56 references to GetStreamingResponseAsync
Microsoft.AspNetCore.Components.AI (1)
Engine\UIAgent.cs (1)
174await foreach (var update in _chatClient.GetStreamingResponseAsync(
Microsoft.Extensions.AI (12)
ChatCompletion\AnonymousDelegatingChatClient.cs (1)
144await foreach (var update in InnerClient.GetStreamingResponseAsync(messages, options, cancellationToken))
ChatCompletion\CachingChatClient.cs (2)
164/// This is used when there is a call to <see cref="IChatClient.GetStreamingResponseAsync"/>. 186/// This is used when there is a call to <see cref="IChatClient.GetStreamingResponseAsync"/>.
ChatCompletion\ChatClientBuilder.cs (7)
92/// an implementation for both <see cref="IChatClient.GetResponseAsync"/> and <see cref="IChatClient.GetStreamingResponseAsync"/>. 96/// <see cref="IChatClient.GetStreamingResponseAsync"/>. This delegate is invoked with the list of chat messages, the chat 117/// an implementation for both <see cref="IChatClient.GetResponseAsync"/> and <see cref="IChatClient.GetStreamingResponseAsync"/>. 125/// A delegate that provides the implementation for <see cref="IChatClient.GetStreamingResponseAsync"/>. When <see langword="null"/>, 126/// <paramref name="getResponseFunc"/> must be non-null, and the implementation of <see cref="IChatClient.GetStreamingResponseAsync"/> 133/// <paramref name="getStreamingResponseFunc"/> will provide the implementation of <see cref="IChatClient.GetStreamingResponseAsync"/>. 135/// is supplied without <paramref name="getStreamingResponseFunc"/>, the implementation of <see cref="IChatClient.GetStreamingResponseAsync"/>
ChatCompletion\FunctionInvocationContext.cs (1)
92/// <see cref="IChatClient.GetStreamingResponseAsync"/> call as opposed to a <see cref="IChatClient.GetResponseAsync"/> call.
ChatRouting\FailoverChatClient.cs (1)
191.GetStreamingResponseAsync(
Microsoft.Extensions.AI.Abstractions (9)
ChatCompletion\ChatClientExtensions.cs (1)
160return client.GetStreamingResponseAsync([chatMessage], options, cancellationToken);
ChatCompletion\ChatOptions.cs (2)
194/// Streamed background responses, such as those returned by default by <see cref="IChatClient.GetStreamingResponseAsync"/>, 208/// When <see cref="IChatClient.GetResponseAsync" /> or <see cref="IChatClient.GetStreamingResponseAsync" />
ChatCompletion\ChatResponseUpdate.cs (2)
142/// the input messages supplied to <see cref="IChatClient.GetStreamingResponseAsync"/> need only be the additional messages beyond 169/// passed to <see cref="ChatOptions.ContinuationToken"/> on subsequent calls to <see cref="IChatClient.GetStreamingResponseAsync"/>
ChatCompletion\DelegatingChatClient.cs (1)
50InnerClient.GetStreamingResponseAsync(messages, options, cancellationToken);
ChatCompletion\IChatClient.cs (1)
25/// <see cref="GetStreamingResponseAsync"/>, such as by configuring the options instance. Thus, consumers of the interface either
ChatRouting\RoutingChatClient.cs (1)
91client.GetStreamingResponseAsync(context.Messages, context.ChatOptions, cancellationToken)
ChatRouting\RoutingContext.cs (1)
15/// started from the sequence returned by <see cref="IChatClient.GetStreamingResponseAsync"/>.
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyChatClient.cs (1)
110_originalChatClient.GetStreamingResponseAsync(
Microsoft.Extensions.AI.Integration.Tests (4)
ChatClientIntegrationTests.cs (3)
106await foreach (var chunk in ChatClient.GetStreamingResponseAsync(chatHistory)) 162var streamingResponse = ChatClient.GetStreamingResponseAsync(history); 1387=> _innerChatClient.GetStreamingResponseAsync(messages, options, cancellationToken);
ImageGeneratingChatClientIntegrationTests.cs (1)
75return ValidateChatResponse(await chatClient.GetStreamingResponseAsync(messages, options).ToChatResponseAsync());
Microsoft.Extensions.AI.OpenAI.Tests (11)
OpenAIResponseClientIntegrationTests.cs (9)
269await client.GetStreamingResponseAsync(input, chatOptions).ToChatResponseAsync() : 300await client.GetStreamingResponseAsync(input, chatOptions).ToChatResponseAsync() : 465await foreach (var update in ChatClient.GetStreamingResponseAsync([], chatOptions)) 534await client.GetStreamingResponseAsync(input, chatOptions).ToChatResponseAsync() : 546await client.GetStreamingResponseAsync(input, chatOptions).ToChatResponseAsync() : 789var response1 = await ChatClient.GetStreamingResponseAsync(chatHistory, chatOptions).ToChatResponseAsync(); 807var response2 = await ChatClient.GetStreamingResponseAsync(chatHistory, chatOptions).ToChatResponseAsync(); 826var response3 = await ChatClient.GetStreamingResponseAsync(deserializedHistory, chatOptions).ToChatResponseAsync(); 843await foreach (var update in ChatClient.GetStreamingResponseAsync(deserializedHistory, chatOptions))
OpenAIResponseClientTests.cs (2)
1099await foreach (var update in client.GetStreamingResponseAsync([new ChatMessage(ChatRole.User, "Search the web for the temperature today in Fremont")], chatOptions)) 3312await foreach (var update in client.GetStreamingResponseAsync([], chatOptions))
Microsoft.Extensions.AI.Tests (18)
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
80await using var e = client.GetStreamingResponseAsync(Array.Empty<ChatMessage>(), providedOptions, cts.Token).GetAsyncEnumerator();
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (5)
916await service.GetStreamingResponseAsync(input, options).ToChatResponseAsync(); 998await service.GetStreamingResponseAsync(input, options).ToChatResponseAsync(); 1496var updates = service.GetStreamingResponseAsync(new EnumeratedOnceEnumerable<ChatMessage>(input), options, cts.Token); 1577var updates = service.GetStreamingResponseAsync(new EnumeratedOnceEnumerable<ChatMessage>(input), options, cts.Token); 2069var result = await service.GetStreamingResponseAsync(new EnumeratedOnceEnumerable<ChatMessage>(CloneInput(input)), options, cts.Token).ToChatResponseAsync();
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
1761await foreach (var update in client.GetStreamingResponseAsync( 2298var result = await service.GetStreamingResponseAsync(new EnumeratedOnceEnumerable<ChatMessage>(chat), options, cts.Token).ToChatResponseAsync();
ChatCompletion\LoggingChatClientTests.cs (1)
117await foreach (var update in client.GetStreamingResponseAsync(
ChatCompletion\OpenTelemetryChatClientTests.cs (3)
932await foreach (var update in chatClient.GetStreamingResponseAsync([new(ChatRole.User, "Hello")], new ChatOptions { ModelId = "mymodel" })) 1037await foreach (var update in chatClient.GetStreamingResponseAsync([new(ChatRole.User, "Hello")])) 1091await foreach (var update in chatClient.GetStreamingResponseAsync([new(ChatRole.User, "Hello")]))
ChatCompletion\UseDelegateChatClientTests.cs (6)
71response = await client.GetStreamingResponseAsync(expectedMessages, expectedOptions, expectedCts.Token).ToChatResponseAsync(); 113response = await client.GetStreamingResponseAsync(expectedMessages, expectedOptions, expectedCts.Token).ToChatResponseAsync(); 149await foreach (var update in innerClient.GetStreamingResponseAsync(messages, options, cancellationToken)) 164response = await client.GetStreamingResponseAsync(expectedMessages, expectedOptions, expectedCts.Token).ToChatResponseAsync(); 220await foreach (var update in innerClient.GetStreamingResponseAsync(messages, options, cancellationToken)) 235response = await client.GetStreamingResponseAsync(expectedMessages, expectedOptions, expectedCts.Token).ToChatResponseAsync();