From 92c652b0c2948100e32300834308dd5caf813441 Mon Sep 17 00:00:00 2001 From: "MaxiDonkey@hotmail.com" Date: Wed, 8 Jan 2025 09:12:43 +0100 Subject: [PATCH] XML doc add --- source/Anthropic.Chat.pas | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/source/Anthropic.Chat.pas b/source/Anthropic.Chat.pas index aac664d..07c5b06 100644 --- a/source/Anthropic.Chat.pas +++ b/source/Anthropic.Chat.pas @@ -370,6 +370,28 @@ TSystemPayload = class(TJSONParam) /// Enable/disable the cache contol flag. /// function CacheControl(const Value: TCachingType): TSystemPayload; + /// + /// Creates a new system payload containing a textual message with optional caching behavior. + /// + /// + /// The text content to include in the system payload. This text typically serves as instructions, rules, or contextual information for the AI model. + /// + /// + /// Specifies the caching behavior for the system payload. Options include: + /// + /// nocaching (default): Disables caching for this payload. + /// + /// + /// ephemeral: Enables server-side caching to optimize performance for repeated requests. + /// + /// + /// + /// A TSystemPayload instance initialized with the provided text and caching behavior. + /// + /// + /// This method simplifies the creation of system payloads by allowing the inclusion of textual instructions or guidelines along with optional caching settings. + /// Use the ephemeral caching option to reduce latency when the same system payload is used multiple times. + /// class function AddText(const Value: string; const Caching: TCachingType = nocaching): TSystemPayload; end;