Saltar para o conteúdo principal
Versão: Próximo

OpenAIFileParameters

The OpenAIFileParameters class handles parameters for file upload operations.

Inherits

OpenAIParameters

Propriedades

Nome da propriedadeTipoRequiredDescrição
expires_afterObjectOpcionalThe 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:

Nome da propriedadeTipoDescrição
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).

Exemplo de uso

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

Veja também