Method GetResponseAsync
- Namespace
- Oscova.Agents.Middleware
- Assembly
- Oscova.Agents.dll
GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions?, CancellationToken)
Sends chat messages and returns the response.
public override Task<ChatResponse> GetResponseAsync(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
- Task<ChatResponse>
-
The response messages generated by the client.
Exceptions
- ArgumentNullException
-
messagesis null.