New to Telerik ReportingStart a free 30-day trial

IClient

Interface

Defines a contract for AI communication clients that can send messages to an AI service and receive responses.

Definition

Namespace:Telerik.Reporting.AI

Assembly:Telerik.Reporting.dll

Syntax:

C#
public interface IClient

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

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)
Parameters:queryIReadOnlyCollection<IMessage>

A collection of messages representing the query to send to the AI service.

cancellationTokenCancellationToken

A 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.