Language

KnowledgeBaseRetrievalClient.RetrieveStreamAsync Method

Definition

Overloads

Name Description
RetrieveStreamAsync(RequestContent, String, String, RequestContext)

Retrieves raw server-sent events with Work IQ authorization.

RetrieveStreamAsync(RequestContent, String, RequestContext)

Retrieves relevant data as server-sent events.

RetrieveStreamAsync(KnowledgeBaseRetrievalRequest, String, CancellationToken)

KnowledgeBase retrieves relevant data from backing stores, streaming progress and results as server-sent events on the same connection as they become available, instead of waiting for the full retrieval to complete.

RetrieveStreamAsync(KnowledgeBaseRetrievalRequest, String, String, CancellationToken)

Retrieves typed server-sent events with Work IQ authorization.

RetrieveStreamAsync(RequestContent, String, String, RequestContext)

Source:
KnowledgeBaseRetrievalClient.cs

Retrieves raw server-sent events with Work IQ authorization.

public virtual System.Threading.Tasks.Task<System.ClientModel.AsyncStreamingResult<System.Net.ServerSentEvents.SseItem<BinaryData>>> RetrieveStreamAsync(Azure.Core.RequestContent content, string querySourceAuthorization, string queryWorkIQSourceAuthorization, Azure.RequestContext context);
abstract member RetrieveStreamAsync : Azure.Core.RequestContent * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<System.ClientModel.AsyncStreamingResult<System.Net.ServerSentEvents.SseItem<BinaryData>>>
override this.RetrieveStreamAsync : Azure.Core.RequestContent * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<System.ClientModel.AsyncStreamingResult<System.Net.ServerSentEvents.SseItem<BinaryData>>>
Public Overridable Function RetrieveStreamAsync (content As RequestContent, querySourceAuthorization As String, queryWorkIQSourceAuthorization As String, context As RequestContext) As Task(Of AsyncStreamingResult(Of SseItem(Of BinaryData)))

Parameters

content
RequestContent

The request body.

querySourceAuthorization
String

The user authorization token, or null when not needed.

queryWorkIQSourceAuthorization
String

The Work IQ user assertion token.

context
RequestContext

The request context.

Returns

The response returned from the service.

Exceptions

content is null.

Service returned a non-success status code.

Applies to

RetrieveStreamAsync(RequestContent, String, RequestContext)

Source:
KnowledgeBaseRetrievalClient.cs

Retrieves relevant data as server-sent events.

public virtual System.Threading.Tasks.Task<System.ClientModel.AsyncStreamingResult<System.Net.ServerSentEvents.SseItem<BinaryData>>> RetrieveStreamAsync(Azure.Core.RequestContent content, string querySourceAuthorization = default, Azure.RequestContext context = default);
abstract member RetrieveStreamAsync : Azure.Core.RequestContent * string * Azure.RequestContext -> System.Threading.Tasks.Task<System.ClientModel.AsyncStreamingResult<System.Net.ServerSentEvents.SseItem<BinaryData>>>
override this.RetrieveStreamAsync : Azure.Core.RequestContent * string * Azure.RequestContext -> System.Threading.Tasks.Task<System.ClientModel.AsyncStreamingResult<System.Net.ServerSentEvents.SseItem<BinaryData>>>
Public Overridable Function RetrieveStreamAsync (content As RequestContent, Optional querySourceAuthorization As String = Nothing, Optional context As RequestContext = Nothing) As Task(Of AsyncStreamingResult(Of SseItem(Of BinaryData)))

Parameters

content
RequestContent

The request body.

querySourceAuthorization
String

The user authorization token.

context
RequestContext

The request context.

Returns

The response returned from the service.

Exceptions

content is null.

Service returned a non-success status code.

Applies to

RetrieveStreamAsync(KnowledgeBaseRetrievalRequest, String, CancellationToken)

Source:
KnowledgeBaseRetrievalClient.cs

KnowledgeBase retrieves relevant data from backing stores, streaming progress and results as server-sent events on the same connection as they become available, instead of waiting for the full retrieval to complete.

public virtual System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalStreamEvent>> RetrieveStreamAsync(Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalRequest retrievalRequest, string querySourceAuthorization = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RetrieveStreamAsync : Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalRequest * string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalStreamEvent>>
override this.RetrieveStreamAsync : Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalRequest * string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalStreamEvent>>
Public Overridable Function RetrieveStreamAsync (retrievalRequest As KnowledgeBaseRetrievalRequest, Optional querySourceAuthorization As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of SseItem(Of KnowledgeBaseRetrievalStreamEvent))

Parameters

retrievalRequest
KnowledgeBaseRetrievalRequest

The retrieval request to process.

querySourceAuthorization
String

Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the request or stream enumeration.

Returns

The server-sent events returned by the service. The event name is available from EventType and the typed event payload is available from Data.

Exceptions

retrievalRequest is null.

Service returned a non-success status code.

The streaming response did not contain a content stream.

Applies to

RetrieveStreamAsync(KnowledgeBaseRetrievalRequest, String, String, CancellationToken)

Source:
KnowledgeBaseRetrievalClient.cs

Retrieves typed server-sent events with Work IQ authorization.

public virtual System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalStreamEvent>> RetrieveStreamAsync(Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalRequest retrievalRequest, string querySourceAuthorization, string queryWorkIQSourceAuthorization, System.Threading.CancellationToken cancellationToken);
abstract member RetrieveStreamAsync : Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalRequest * string * string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalStreamEvent>>
override this.RetrieveStreamAsync : Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalRequest * string * string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<Azure.Search.Documents.KnowledgeBases.Models.KnowledgeBaseRetrievalStreamEvent>>
Public Overridable Function RetrieveStreamAsync (retrievalRequest As KnowledgeBaseRetrievalRequest, querySourceAuthorization As String, queryWorkIQSourceAuthorization As String, cancellationToken As CancellationToken) As IAsyncEnumerable(Of SseItem(Of KnowledgeBaseRetrievalStreamEvent))

Parameters

retrievalRequest
KnowledgeBaseRetrievalRequest

The retrieval request to process.

querySourceAuthorization
String

The user authorization token, or null when not needed.

queryWorkIQSourceAuthorization
String

The user assertion token for the Work IQ knowledge source.

cancellationToken
CancellationToken

The cancellation token for the request and enumeration.

Returns

The server-sent events returned by the service. The event name is available from EventType and the typed event payload is available from Data.

Exceptions

retrievalRequest is null.

Service returned a non-success status code.

The streaming response did not contain a content stream.

Applies to