Class: OpenAI::Models::BatchCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/batch_create_params.rb

Overview

Defined Under Namespace

Modules: CompletionWindow, Endpoint

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(completion_window: , endpoint: , input_file_id: , metadata: nil, request_options: {}) ⇒ Object

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

Parameters:

  • completion_window (Symbol, OpenAI::Models::BatchCreateParams::CompletionWindow) (defaults to: )

    The time frame within which the batch should be processed. Currently only ‘24h`

  • endpoint (Symbol, OpenAI::Models::BatchCreateParams::Endpoint) (defaults to: )

    The endpoint to be used for all requests in the batch. Currently ‘/v1/responses`

  • input_file_id (String) (defaults to: )

    The ID of an uploaded file that contains requests for the new batch.

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

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

  • request_options (OpenAI::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/openai/models/batch_create_params.rb', line 51

Instance Attribute Details

#completion_windowSymbol, OpenAI::Models::BatchCreateParams::CompletionWindow

The time frame within which the batch should be processed. Currently only ‘24h` is supported.



15
# File 'lib/openai/models/batch_create_params.rb', line 15

required :completion_window, enum: -> { OpenAI::BatchCreateParams::CompletionWindow }

#endpointSymbol, OpenAI::Models::BatchCreateParams::Endpoint

The endpoint to be used for all requests in the batch. Currently ‘/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.



24
# File 'lib/openai/models/batch_create_params.rb', line 24

required :endpoint, enum: -> { OpenAI::BatchCreateParams::Endpoint }

#input_file_idString

The ID of an uploaded file that contains requests for the new batch.

See [upload file](platform.openai.com/docs/api-reference/files/create) for how to upload a file.

Your input file must be formatted as a [JSONL file](platform.openai.com/docs/api-reference/batch/request-input), and must be uploaded with the purpose ‘batch`. The file can contain up to 50,000 requests, and can be up to 200 MB in size.

Returns:

  • (String)


38
# File 'lib/openai/models/batch_create_params.rb', line 38

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)


49
# File 'lib/openai/models/batch_create_params.rb', line 49

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/batch_create_params.rb', line 72