InterfaceIClient
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:
public interface IClient
Properties
Model
Gets the AI model name associated with the current instance.
Declaration
string Model { get; }
Property Value
string
SupportsSystemPrompts
Defines whether the AI client supports system prompts.
Declaration
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
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.