Method GetStreamingResponseAsync
- Namespace
- Oscova.Agents.Middleware
- Assembly
- Oscova.Agents.dll
GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions?, CancellationToken)
Sends chat messages and streams the response.
public override IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)Parameters
messagesIEnumerable<ChatMessage>-
The sequence of chat messages to send.
optionsChatOptions?-
The chat options with which to configure the request.
cancellationTokenCancellationToken-
The System.Threading.CancellationToken to monitor for cancellation requests. The default is System.Threading.CancellationToken.None.
Returns
- IAsyncEnumerable<ChatResponseUpdate>
-
The response messages generated by the client.
Exceptions
- ArgumentNullException
-
messagesis null.