Interface IClient
Defines a contract for AI communication clients that can send messages to an AI service and receive responses.
Namespace: Telerik.Reporting.AI
Assembly: Telerik.Reporting.dll
Syntax
public interface IClient
Remarks
This interface represents a generic client for AI communication services that follows a message-based pattern for exchanging information with AI providers.
Properties
Model
Gets the AI model name associated with the current instance.
Declaration
string Model { get; }
Property Value
System.String
|
SupportsSystemPrompts
Defines whether the AI client supports system prompts.
Declaration
bool SupportsSystemPrompts { get; }
Property Value
System.Boolean
|
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
System.Collections.Generic.IReadOnlyCollection<IMessage>
query
A collection of messages representing the query to send to the AI service. |
System.Threading.CancellationToken
cancellationToken
A token to monitor for cancellation requests. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<IMessage>>
A task that represents the asynchronous operation. The task result contains a read-only collection of response messages from the AI service. |