Table of Contents

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

messages IEnumerable<ChatMessage>

The sequence of chat messages to send.

options ChatOptions?

The chat options with which to configure the request.

cancellationToken CancellationToken

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

messages is null.