Table of Contents

Method GetResponseAsync

Namespace
LMKit.Integrations.ExtensionsAI.ChatClient
Assembly
LM-Kit.NET.Integrations.ExtensionsAI.dll

GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions?, CancellationToken)

Sends chat messages and returns the response.

public 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 CancellationToken to monitor for cancellation requests. The default is None.

Returns

Task<ChatResponse>

The response messages generated by the client.

Exceptions

ArgumentNullException

messages is null.