Class: OpenAI::Models::BatchCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::BatchCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/openai/models/batch_create_params.rb,
sig/openai/models/batch_create_params.rbs
Overview
Defined Under Namespace
Modules: CompletionWindow, Endpoint Classes: OutputExpiresAfter
Instance Attribute Summary collapse
-
#completion_window ⇒ OpenAI::Models::BatchCreateParams::completion_window
The time frame within which the batch should be processed.
-
#endpoint ⇒ OpenAI::Models::BatchCreateParams::endpoint
The endpoint for all requests in the batch.
-
#input_file_id ⇒ String
The ID of an uploaded file that contains requests for the new batch.
-
#metadata ⇒ OpenAI::Models::metadata?
Set of 16 key-value pairs that can be attached to an object.
-
#output_expires_after ⇒ OpenAI::BatchCreateParams::OutputExpiresAfter?
The expiration policy for the output and/or error file that are generated for a batch.
Attributes included from Internal::Type::RequestParameters
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(completion_window:, endpoint:, input_file_id:, metadata: nil, output_expires_after: nil, request_options: {}) ⇒ BatchCreateParams
constructor
A new instance of BatchCreateParams.
- #to_hash ⇒ { completion_window: OpenAI::Models::BatchCreateParams::completion_window, endpoint: OpenAI::Models::BatchCreateParams::endpoint, input_file_id: String, ?metadata: OpenAI::Models::metadata?, ?output_expires_after: OpenAI::BatchCreateParams::OutputExpiresAfter, ?request_options: OpenAI::RequestOptions }
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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, output_expires_after: nil, request_options: {}) ⇒ BatchCreateParams
Returns a new instance of BatchCreateParams.
|
|
# File 'lib/openai/models/batch_create_params.rb', line 56
|
Instance Attribute Details
#completion_window ⇒ OpenAI::Models::BatchCreateParams::completion_window
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 } |
#endpoint ⇒ OpenAI::Models::BatchCreateParams::endpoint
The endpoint for all requests in the batch. Batches using /v1/embeddings can
contain at most 50,000 embedding inputs across all requests.
22 |
# File 'lib/openai/models/batch_create_params.rb', line 22 required :endpoint, enum: -> { OpenAI::BatchCreateParams::Endpoint } |
#input_file_id ⇒ String
The ID of an uploaded file that contains requests for the new batch.
See upload file for how to upload a file.
Your input file must be formatted as a
JSONL file,
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.
37 |
# File 'lib/openai/models/batch_create_params.rb', line 37 required :input_file_id, String |
#metadata ⇒ OpenAI::Models::metadata?
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.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
47 |
# File 'lib/openai/models/batch_create_params.rb', line 47 optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true |
#output_expires_after ⇒ OpenAI::BatchCreateParams::OutputExpiresAfter?
The expiration policy for the output and/or error file that are generated for a batch.
54 |
# File 'lib/openai/models/batch_create_params.rb', line 54 optional :output_expires_after, -> { OpenAI::BatchCreateParams::OutputExpiresAfter } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/batch_create_params.rb', line 97
|
Instance Method Details
#to_hash ⇒ { completion_window: OpenAI::Models::BatchCreateParams::completion_window, endpoint: OpenAI::Models::BatchCreateParams::endpoint, input_file_id: String, ?metadata: OpenAI::Models::metadata?, ?output_expires_after: OpenAI::BatchCreateParams::OutputExpiresAfter, ?request_options: OpenAI::RequestOptions }
89 90 91 92 93 94 95 96 |
# File 'sig/openai/models/batch_create_params.rbs', line 89
def to_hash: -> {
completion_window: OpenAI::Models::BatchCreateParams::completion_window,
endpoint: OpenAI::Models::BatchCreateParams::endpoint,
input_file_id: String,
?metadata: OpenAI::Models::metadata?,
?output_expires_after: OpenAI::BatchCreateParams::OutputExpiresAfter,
?request_options: OpenAI::RequestOptions
}
|