StreamingResponse<T>.CreateFromResponse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new instance of StreamingResponse<T> using the provided underlying HTTP response. The provided function will be used to resolve the response into an asynchronous enumeration of streamed response items.
public static Azure.AI.Inference.StreamingResponse<T> CreateFromResponse (Azure.Response response, Func<Azure.Response,System.Collections.Generic.IAsyncEnumerable<T>> asyncEnumerableProcessor);
static member CreateFromResponse : Azure.Response * Func<Azure.Response, System.Collections.Generic.IAsyncEnumerable<'T>> -> Azure.AI.Inference.StreamingResponse<'T>
Public Shared Function CreateFromResponse (response As Response, asyncEnumerableProcessor As Func(Of Response, IAsyncEnumerable(Of T))) As StreamingResponse(Of T)
Parameters
- response
- Response
The HTTP response.
- asyncEnumerableProcessor
- Func<Response,IAsyncEnumerable<T>>
The function that will resolve the provided response into an IAsyncEnumerable.
Returns
A new instance of StreamingResponse<T> that will be capable of asynchronous enumeration of
T
items from the HTTP response.
Applies to
Azure SDK for .NET