batches
Creates, updates, deletes, gets or lists a batches
resource.
Overview
Name | batches |
Type | Resource |
Id | openai.batch.batches |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
cancelled_at | integer | The Unix timestamp (in seconds) for when the batch was cancelled. |
cancelling_at | integer | The Unix timestamp (in seconds) for when the batch started cancelling. |
completed_at | integer | The Unix timestamp (in seconds) for when the batch was completed. |
completion_window | string | The time frame within which the batch should be processed. |
created_at | integer | The Unix timestamp (in seconds) for when the batch was created. |
endpoint | string | The OpenAI API endpoint used by the batch. |
error_file_id | string | The ID of the file containing the outputs of requests with errors. |
errors | object | |
expired_at | integer | The Unix timestamp (in seconds) for when the batch expired. |
expires_at | integer | The Unix timestamp (in seconds) for when the batch will expire. |
failed_at | integer | The Unix timestamp (in seconds) for when the batch failed. |
finalizing_at | integer | The Unix timestamp (in seconds) for when the batch started finalizing. |
in_progress_at | integer | The Unix timestamp (in seconds) for when the batch started processing. |
input_file_id | string | The ID of the input file for the batch. |
metadata | object | 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 can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
object | string | The object type, which is always batch . |
output_file_id | string | The ID of the file containing the outputs of successfully executed requests. |
request_counts | object | The request counts for different statuses within the batch. |
status | string | The current status of the batch. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list_batches | SELECT |
| |
retrieve_batch | SELECT | batch_id | |
create_batch | INSERT | data__completion_window, data__endpoint, data__input_file_id | |
cancel_batch | EXEC | batch_id |
SELECT
examples
SELECT
id,
cancelled_at,
cancelling_at,
completed_at,
completion_window,
created_at,
endpoint,
error_file_id,
errors,
expired_at,
expires_at,
failed_at,
finalizing_at,
in_progress_at,
input_file_id,
metadata,
object,
output_file_id,
request_counts,
status
FROM openai.batch.batches
;
INSERT
example
Use the following StackQL query and manifest file to create a new batches
resource.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO openai.batch.batches (
data__input_file_id,
data__endpoint,
data__completion_window,
data__metadata
)
SELECT
'{{ input_file_id }}',
'{{ endpoint }}',
'{{ completion_window }}',
'{{ metadata }}'
;
/*+ create */
INSERT INTO openai.batch.batches (
data__input_file_id,
data__endpoint,
data__completion_window
)
SELECT
'{{ input_file_id }}',
'{{ endpoint }}',
'{{ completion_window }}'
;
- name: batches
props:
- name: data__completion_window
value: string
- name: data__endpoint
value: string
- name: data__input_file_id
value: string
- name: input_file_id
value: string
- name: endpoint
value: string
- name: completion_window
value: string
- name: metadata
value: object