@@ -93,9 +93,9 @@ file_id = file.id
93
93
94
94
``` json
95
95
{
96
- "id" : " file-31b0f44ef8334259be3a3f3bb793a7b9 " ,
97
- "bytes" : 821 ,
98
- "created_at" : 1721666905 ,
96
+ "id" : " file-9f3a81d899b4442f98b640e4bc3535dd " ,
97
+ "bytes" : 815 ,
98
+ "created_at" : 1722476551 ,
99
99
"filename" : " test.jsonl" ,
100
100
"object" : " file" ,
101
101
"purpose" : " batch" ,
@@ -124,7 +124,7 @@ while status != "processed":
124
124
** Output:**
125
125
126
126
``` output
127
- 2024-07-22 12:49:06.816651 File Id: file-31b0f44ef8334259be3a3f3bb793a7b9 , Status: processed
127
+ 2024-07-31 21:42:53.663655 File Id: file-9f3a81d899b4442f98b640e4bc3535dd , Status: processed
128
128
```
129
129
130
130
## Create batch job
@@ -152,11 +152,11 @@ print(batch_response.model_dump_json(indent=2))
152
152
153
153
``` json
154
154
{
155
- "id" : " batch_73445352-d8cf-43c4-b51c-842864923600 " ,
155
+ "id" : " batch_6caaf24d-54a5-46be-b1b7-518884fcbdde " ,
156
156
"completion_window" : " 24h" ,
157
- "created_at" : 1722450284 ,
157
+ "created_at" : 1722476583 ,
158
158
"endpoint" : null ,
159
- "input_file_id" : " file-ad5ebc5773534c5885ef4aea871d6b9f " ,
159
+ "input_file_id" : " file-9f3a81d899b4442f98b640e4bc3535dd " ,
160
160
"object" : " batch" ,
161
161
"status" : " validating" ,
162
162
"cancelled_at" : null ,
@@ -165,7 +165,7 @@ print(batch_response.model_dump_json(indent=2))
165
165
"error_file_id" : null ,
166
166
"errors" : null ,
167
167
"expired_at" : null ,
168
- "expires_at" : 1722536684 ,
168
+ "expires_at" : 1722562983 ,
169
169
"failed_at" : null ,
170
170
"finalizing_at" : null ,
171
171
"in_progress_at" : null ,
@@ -199,15 +199,15 @@ while status not in ("completed", "failed", "canceled"):
199
199
** Output:**
200
200
201
201
``` output
202
- 2024-07-31 14:26:33.650577 Batch Id: batch_73445352-d8cf-43c4-b51c-842864923600 , Status: validating
203
- 2024-07-31 14:27:34.479144 Batch Id: batch_73445352-d8cf-43c4-b51c-842864923600 , Status: validating
204
- 2024-07-31 14:28:35.522783 Batch Id: batch_73445352-d8cf-43c4-b51c-842864923600 , Status: validating
205
- 2024-07-31 14:29:36.258073 Batch Id: batch_73445352-d8cf-43c4-b51c-842864923600 , Status: validating
206
- 2024-07-31 14:30:36.916150 Batch Id: batch_73445352-d8cf-43c4-b51c-842864923600 , Status: in_progress
207
- 2024-07-31 14:31:37.981857 Batch Id: batch_73445352-d8cf-43c4-b51c-842864923600 , Status: in_progress
208
- 2024-07-31 14:32:38.685983 Batch Id: batch_73445352-d8cf-43c4-b51c-842864923600 , Status: in_progress
209
- 2024-07-31 14:33:39.355531 Batch Id: batch_73445352-d8cf-43c4-b51c-842864923600 , Status: in_progress
210
- 2024-07-31 14:34:39.986518 Batch Id: batch_73445352-d8cf-43c4-b51c-842864923600 , Status: completed
202
+ 2024-07-31 21:48:32.556488 Batch Id: batch_6caaf24d-54a5-46be-b1b7-518884fcbdde , Status: validating
203
+ 2024-07-31 21:49:39.221560 Batch Id: batch_6caaf24d-54a5-46be-b1b7-518884fcbdde , Status: in_progress
204
+ 2024-07-31 21:50:53.383138 Batch Id: batch_6caaf24d-54a5-46be-b1b7-518884fcbdde , Status: in_progress
205
+ 2024-07-31 21:52:07.274570 Batch Id: batch_6caaf24d-54a5-46be-b1b7-518884fcbdde , Status: in_progress
206
+ 2024-07-31 21:53:21.149501 Batch Id: batch_6caaf24d-54a5-46be-b1b7-518884fcbdde , Status: finalizing
207
+ 2024-07-31 21:54:34.572508 Batch Id: batch_6caaf24d-54a5-46be-b1b7-518884fcbdde , Status: finalizing
208
+ 2024-07-31 21:55:35.304713 Batch Id: batch_6caaf24d-54a5-46be-b1b7-518884fcbdde , Status: finalizing
209
+ 2024-07-31 21:56:36.531816 Batch Id: batch_6caaf24d-54a5-46be-b1b7-518884fcbdde , Status: finalizing
210
+ 2024-07-31 21:57:37.414105 Batch Id: batch_6caaf24d-54a5-46be-b1b7-518884fcbdde , Status: completed
211
211
```
212
212
213
213
The following status values are possible:
@@ -229,33 +229,32 @@ To examine the job status details you can run:
229
229
print (batch_response.model_dump_json(indent = 2 ))
230
230
```
231
231
232
+ ** Output:**
233
+
232
234
``` json
233
235
{
234
- "id" : " batch_f1423441-0935-4a3d-9a96-9c23bedc3289 " ,
236
+ "id" : " batch_6caaf24d-54a5-46be-b1b7-518884fcbdde " ,
235
237
"completion_window" : " 24h" ,
236
- "created_at" : " 2024-07-22T16:51:52.6450839+00:00 " ,
238
+ "created_at" : 1722476583 ,
237
239
"endpoint" : null ,
238
- "input_file_id" : " file-31b0f44ef8334259be3a3f3bb793a7b9 " ,
240
+ "input_file_id" : " file-9f3a81d899b4442f98b640e4bc3535dd " ,
239
241
"object" : " batch" ,
240
- "status" : " Completed " ,
242
+ "status" : " completed " ,
241
243
"cancelled_at" : null ,
242
244
"cancelling_at" : null ,
243
- "completed_at" : " 2024-07-22T17:59:43.6332138+00:00" ,
244
- "error_file_id" : " file-de3c3e8b-83b4-4a83-89c3-310f3d677df4" ,
245
- "errors" : {
246
- "data" : [],
247
- "object" : " list"
248
- },
245
+ "completed_at" : 1722477429 ,
246
+ "error_file_id" : " file-c795ae52-3ba7-417d-86ec-07eebca57d0b" ,
247
+ "errors" : null ,
249
248
"expired_at" : null ,
250
- "expires_at" : " 2024-07-23T16:51:52.5940767+00:00 " ,
249
+ "expires_at" : 1722562983 ,
251
250
"failed_at" : null ,
252
- "finalizing_at" : " 2024-07-22T17:55:27.9985631+00:00 " ,
253
- "in_progress_at" : " 2024-07-22T16:57:43.5157566+00:00 " ,
251
+ "finalizing_at" : 1722477177 ,
252
+ "in_progress_at" : null ,
254
253
"metadata" : null ,
255
- "output_file_id" : " file-ccd5d748-f5a4-4846-a0f8-2538d569000a " ,
254
+ "output_file_id" : " file-3304e310-3b39-4e34-9f1c-e1c1504b2b2a " ,
256
255
"request_counts" : {
257
- "completed" : 0 ,
258
- "failed" : 3 ,
256
+ "completed" : 3 ,
257
+ "failed" : 0 ,
259
258
"total" : 3
260
259
}
261
260
}
@@ -266,7 +265,7 @@ Observe that there's both `error_file_id` and a separate `output_file_id`. Use t
266
265
## Retrieve batch job output file
267
266
268
267
``` python
269
- response = client.files.content(batch_reponse .output_file_id)
268
+ response = client.files.content(batch_response .output_file_id)
270
269
271
270
print (response.text)
272
271
```
0 commit comments