Skip to content

Commit eab9c1f

Browse files
committed
update
1 parent d7ae187 commit eab9c1f

File tree

1 file changed

+0
-65
lines changed
  • articles/ai-services/openai/how-to

1 file changed

+0
-65
lines changed

articles/ai-services/openai/how-to/batch.md

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -157,71 +157,6 @@ Yes. Similar to other deployment types, you can create content filters and assoc
157157

158158
Yes, from the quota page in the Studio UI. Default quota allocation can be found in the [quota and limits article](../quotas-limits.md#global-batch-quota).
159159

160-
### How do I tell how many tokens my batch request contains, and how many tokens are available as quota?
161-
162-
The `2024-10-01-preview` REST API adds two new response headers:
163-
164-
* `deployment-enqueued-tokens` - A approximate token count for your jsonl file calculated immediately after the batch request is submitted. This value represents an estimate based on the number of characters and is not the true token count.
165-
* `deployment-maximum-enqueued-tokens` The total available enqueued tokens available for this global batch model deployment.
166-
167-
These response headers are only available when making a POST request to begin batch processing of a file with the REST API. The language specific client libraries do not currently return these new response headers. To return all response headers you can add `-i` to the standard REST request.
168-
169-
```http
170-
curl -i -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/batches?api-version=2024-10-01-preview \
171-
-H "api-key: $AZURE_OPENAI_API_KEY" \
172-
-H "Content-Type: application/json" \
173-
-d '{
174-
"input_file_id": "file-abc123",
175-
"endpoint": "/chat/completions",
176-
"completion_window": "24h"
177-
}'
178-
```
179-
180-
```output
181-
HTTP/1.1 200 OK
182-
Content-Length: 619
183-
Content-Type: application/json; charset=utf-8
184-
Vary: Accept-Encoding
185-
Request-Context: appId=
186-
x-ms-response-type: standard
187-
deployment-enqueued-tokens: 139
188-
deployment-maximum-enqueued-tokens: 740000
189-
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
190-
X-Content-Type-Options: nosniff
191-
x-aml-cluster: vienna-swedencentral-01
192-
x-request-time: 2.125
193-
apim-request-id: c8bf4351-c6f5-4bfe-9a79-ef3720eca8af
194-
x-ms-region: Sweden Central
195-
Date: Thu, 17 Oct 2024 01:45:45 GMT
196-
197-
{
198-
"cancelled_at": null,
199-
"cancelling_at": null,
200-
"completed_at": null,
201-
"completion_window": "24h",
202-
"created_at": 1729129545,
203-
"error_file_id": null,
204-
"expired_at": null,
205-
"expires_at": 1729215945,
206-
"failed_at": null,
207-
"finalizing_at": null,
208-
"id": "batch_c8dd49a7-c808-4575-9957-b188cd0dd642",
209-
"in_progress_at": null,
210-
"input_file_id": "file-f89384af0082485da43cb26b49dc25ce",
211-
"errors": null,
212-
"metadata": null,
213-
"object": "batch",
214-
"output_file_id": null,
215-
"request_counts": {
216-
"total": 0,
217-
"completed": 0,
218-
"failed": 0
219-
},
220-
"status": "validating",
221-
"endpoint": "/chat/completions"
222-
}
223-
```
224-
225160
### What happens if the API doesn't complete my request within the 24 hour time frame?
226161

227162
We aim to process these requests within 24 hours; we don't expire the jobs that take longer. You can cancel the job anytime. When you cancel the job, any remaining work is cancelled and any already completed work is returned. You'll be charged for any completed work.

0 commit comments

Comments
 (0)