Class: OpenAI::Models::Batch

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/batch.rb

Overview

Defined Under Namespace

Modules: Status Classes: Errors

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: , completion_window: , created_at: , endpoint: , input_file_id: , status: , cancelled_at: nil, cancelling_at: nil, completed_at: nil, error_file_id: nil, errors: nil, expired_at: nil, expires_at: nil, failed_at: nil, finalizing_at: nil, in_progress_at: nil, metadata: nil, output_file_id: nil, request_counts: nil, object: :batch) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Batch for more details.

Parameters:

  • id (String) (defaults to: )
  • completion_window (String) (defaults to: )

    The time frame within which the batch should be processed.

  • created_at (Integer) (defaults to: )

    The Unix timestamp (in seconds) for when the batch was created.

  • endpoint (String) (defaults to: )

    The OpenAI API endpoint used by the batch.

  • input_file_id (String) (defaults to: )

    The ID of the input file for the batch.

  • status (Symbol, OpenAI::Models::Batch::Status) (defaults to: )

    The current status of the batch.

  • cancelled_at (Integer) (defaults to: nil)

    The Unix timestamp (in seconds) for when the batch was cancelled.

  • cancelling_at (Integer) (defaults to: nil)

    The Unix timestamp (in seconds) for when the batch started cancelling.

  • completed_at (Integer) (defaults to: nil)

    The Unix timestamp (in seconds) for when the batch was completed.

  • error_file_id (String) (defaults to: nil)

    The ID of the file containing the outputs of requests with errors.

  • errors (OpenAI::Models::Batch::Errors) (defaults to: nil)
  • expired_at (Integer) (defaults to: nil)

    The Unix timestamp (in seconds) for when the batch expired.

  • expires_at (Integer) (defaults to: nil)

    The Unix timestamp (in seconds) for when the batch will expire.

  • failed_at (Integer) (defaults to: nil)

    The Unix timestamp (in seconds) for when the batch failed.

  • finalizing_at (Integer) (defaults to: nil)

    The Unix timestamp (in seconds) for when the batch started finalizing.

  • in_progress_at (Integer) (defaults to: nil)

    The Unix timestamp (in seconds) for when the batch started processing.

  • metadata (Hash{Symbol=>String}, nil) (defaults to: nil)

    Set of 16 key-value pairs that can be attached to an object. This can be

  • output_file_id (String) (defaults to: nil)

    The ID of the file containing the outputs of successfully executed requests.

  • request_counts (OpenAI::Models::BatchRequestCounts) (defaults to: nil)

    The request counts for different statuses within the batch.

  • object (Symbol, :batch) (defaults to: :batch)

    The object type, which is always ‘batch`.



# File 'lib/openai/models/batch.rb', line 130

Instance Attribute Details

#cancelled_atInteger?

The Unix timestamp (in seconds) for when the batch was cancelled.

Returns:

  • (Integer, nil)


52
# File 'lib/openai/models/batch.rb', line 52

optional :cancelled_at, Integer

#cancelling_atInteger?

The Unix timestamp (in seconds) for when the batch started cancelling.

Returns:

  • (Integer, nil)


58
# File 'lib/openai/models/batch.rb', line 58

optional :cancelling_at, Integer

#completed_atInteger?

The Unix timestamp (in seconds) for when the batch was completed.

Returns:

  • (Integer, nil)


64
# File 'lib/openai/models/batch.rb', line 64

optional :completed_at, Integer

#completion_windowString

The time frame within which the batch should be processed.

Returns:

  • (String)


16
# File 'lib/openai/models/batch.rb', line 16

required :completion_window, String

#created_atInteger

The Unix timestamp (in seconds) for when the batch was created.

Returns:

  • (Integer)


22
# File 'lib/openai/models/batch.rb', line 22

required :created_at, Integer

#endpointString

The OpenAI API endpoint used by the batch.

Returns:

  • (String)


28
# File 'lib/openai/models/batch.rb', line 28

required :endpoint, String

#error_file_idString?

The ID of the file containing the outputs of requests with errors.

Returns:

  • (String, nil)


70
# File 'lib/openai/models/batch.rb', line 70

optional :error_file_id, String

#errorsOpenAI::Models::Batch::Errors?



75
# File 'lib/openai/models/batch.rb', line 75

optional :errors, -> { OpenAI::Batch::Errors }

#expired_atInteger?

The Unix timestamp (in seconds) for when the batch expired.

Returns:

  • (Integer, nil)


81
# File 'lib/openai/models/batch.rb', line 81

optional :expired_at, Integer

#expires_atInteger?

The Unix timestamp (in seconds) for when the batch will expire.

Returns:

  • (Integer, nil)


87
# File 'lib/openai/models/batch.rb', line 87

optional :expires_at, Integer

#failed_atInteger?

The Unix timestamp (in seconds) for when the batch failed.

Returns:

  • (Integer, nil)


93
# File 'lib/openai/models/batch.rb', line 93

optional :failed_at, Integer

#finalizing_atInteger?

The Unix timestamp (in seconds) for when the batch started finalizing.

Returns:

  • (Integer, nil)


99
# File 'lib/openai/models/batch.rb', line 99

optional :finalizing_at, Integer

#idString

Returns:

  • (String)


10
# File 'lib/openai/models/batch.rb', line 10

required :id, String

#in_progress_atInteger?

The Unix timestamp (in seconds) for when the batch started processing.

Returns:

  • (Integer, nil)


105
# File 'lib/openai/models/batch.rb', line 105

optional :in_progress_at, Integer

#input_file_idString

The ID of the input file for the batch.

Returns:

  • (String)


34
# File 'lib/openai/models/batch.rb', line 34

required :input_file_id, String

#metadataHash{Symbol=>String}?

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Returns:

  • (Hash{Symbol=>String}, nil)


116
# File 'lib/openai/models/batch.rb', line 116

optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true

#objectSymbol, :batch

The object type, which is always ‘batch`.

Returns:

  • (Symbol, :batch)


40
# File 'lib/openai/models/batch.rb', line 40

required :object, const: :batch

#output_file_idString?

The ID of the file containing the outputs of successfully executed requests.

Returns:

  • (String, nil)


122
# File 'lib/openai/models/batch.rb', line 122

optional :output_file_id, String

#request_countsOpenAI::Models::BatchRequestCounts?

The request counts for different statuses within the batch.



128
# File 'lib/openai/models/batch.rb', line 128

optional :request_counts, -> { OpenAI::BatchRequestCounts }

#statusSymbol, OpenAI::Models::Batch::Status

The current status of the batch.

Returns:



46
# File 'lib/openai/models/batch.rb', line 46

required :status, enum: -> { OpenAI::Batch::Status }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/batch.rb', line 189