Interface
IClient

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:

cs-api-definition
public interface IClient

Properties

Model

Gets the AI model name associated with the current instance.

Declaration

cs-api-definition
string Model { get; }

Property Value

string

SupportsSystemPrompts

Defines whether the AI client supports system prompts.

Declaration

cs-api-definition
bool SupportsSystemPrompts { get; }

Property Value

bool

Methods

GetResponseAsync(IReadOnlyCollection<IMessage>, CancellationToken)

Sends a collection of messages as a query to an AI service and returns the response messages asynchronously.

Declaration

cs-api-definition
Task<IReadOnlyCollection<IMessage>> GetResponseAsync(IReadOnlyCollection<IMessage> query, CancellationToken cancellationToken)

Parameters

query

IReadOnlyCollection<IMessage>

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

cancellationToken

CancellationToken

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.