Skip to content

Commit

Permalink
XML doc add
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxiDonkey@hotmail.com authored and MaxiDonkey@hotmail.com committed Jan 8, 2025
1 parent aa74aec commit 92c652b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions source/Anthropic.Chat.pas
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,28 @@ TSystemPayload = class(TJSONParam)
/// Enable/disable the cache contol flag.
/// </summary>
function CacheControl(const Value: TCachingType): TSystemPayload;
/// <summary>
/// Creates a new system payload containing a textual message with optional caching behavior.
/// </summary>
/// <param name="Value">
/// The text content to include in the system payload. This text typically serves as instructions, rules, or contextual information for the AI model.
/// </param>
/// <param name="Caching">
/// Specifies the caching behavior for the system payload. Options include:
/// <para>
/// <c>nocaching</c> (default): Disables caching for this payload.
/// </para>
/// <para>
/// <c>ephemeral</c>: Enables server-side caching to optimize performance for repeated requests.
/// </para>
/// </param>
/// <returns>
/// A <c>TSystemPayload</c> instance initialized with the provided text and caching behavior.
/// </returns>
/// <remarks>
/// This method simplifies the creation of system payloads by allowing the inclusion of textual instructions or guidelines along with optional caching settings.
/// Use the <c>ephemeral</c> caching option to reduce latency when the same system payload is used multiple times.
/// </remarks>
class function AddText(const Value: string; const Caching: TCachingType = nocaching): TSystemPayload;
end;

Expand Down

0 comments on commit 92c652b

Please sign in to comment.