IClient
Interface
Defines a contract for AI communication clients that can send messages to an AI service and receive responses.
Definition
Properties
Model
string
Gets the AI model name associated with the current instance.
C#
string Model { get; }
Defines whether the AI client supports system prompts.
C#
bool SupportsSystemPrompts { get; }
Methods
GetResponseAsync(IReadOnlyCollection<IMessage>, CancellationToken)
Task<IReadOnlyCollection<IMessage>>
Sends a collection of messages as a query to an AI service and returns the response messages asynchronously.
C#
Task<IReadOnlyCollection<IMessage>> GetResponseAsync(IReadOnlyCollection<IMessage> query, CancellationToken cancellationToken)
A collection of messages representing the query to send to the AI service.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns:Task<IReadOnlyCollection<IMessage>>
A task that represents the asynchronous operation. The task result contains a read-only collection of response messages from the AI service.