Saltar al contenido principal
Versión: Siguiente

OpenAIFileParameters

The OpenAIFileParameters class handles parameters for file upload operations.

Inherits

OpenAIParameters

Properties

Property NameTypeRequiredDescription
expires_afterObjectOptionalThe expiration policy for a file. By default, files with purpose=batch expire after 30 days and all other files are persisted until they are manually deleted.

expires_after Object Structure

The expires_after object contains the following properties:

Property NameTypeDescription
anchorTextAnchor timestamp after which the expiration policy applies. Supported anchors: created_at.
secondsIntegerThe number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).

Example Usage

var $params:=cs.AIKit.OpenAIFileParameters.new()

// Set expiration after 7 days
$params.expires_after:={}
$params.expires_after.anchor:="created_at"
$params.expires_after.seconds:=604800 // 7 days

See also