Files - Delete
刪除具有指定檔案識別碼的檔案。如果使用檔案,例如微調作業中的定型檔案,也允許刪除。
DELETE {endpoint}/openai/files/{file-id}?api-version=2024-10-21
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (url) |
支援的認知服務端點(通訊協定和主機名,例如:https://aoairesource.openai.azure.com。以您的 Azure OpenAI 帳戶名稱取代 「aoairesource」。。 |
|
file-id
|
path | True |
string |
檔案的標識碼。 |
|
api-version
|
query | True |
string |
要求的 API 版本。 |
要求標頭
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| api-key | True |
string |
在這裡提供您的認知服務 Azure OpenAI 帳戶密鑰。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
已成功刪除檔案。 |
|
| Other Status Codes |
發生錯誤。 |
安全性
api-key
在這裡提供您的認知服務 Azure OpenAI 帳戶密鑰。
類型:
apiKey
位於:
header
範例
Deleting a file.
範例要求
DELETE https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099?api-version=2024-10-21
範例回覆
{
"object": "file",
"deleted": true,
"id": "file-181a1cbdcdcf4677ada87f63a0928099"
}
定義
| 名稱 | Description |
|---|---|
| Error |
錯誤 |
|
Error |
ErrorCode |
|
Error |
ErrorResponse |
|
File |
FileDelete |
|
Inner |
InnerError |
|
Inner |
InnerErrorCode |
|
Type |
TypeDiscriminator |
Error
錯誤
| 名稱 | 類型 | Description |
|---|---|---|
| code |
ErrorCode |
|
| details |
Error[] |
如果有的話,錯誤詳細數據。 |
| innererror |
InnerError |
|
| message |
string minLength: 1 |
此錯誤的訊息。 |
| target |
string |
如果有的話,就會發生錯誤的位置。 |
ErrorCode
ErrorCode
| 值 | Description |
|---|---|
| conflict |
要求的作業與目前的資源狀態衝突。 |
| invalidPayload |
此作業的要求數據無效。 |
| forbidden |
目前使用者/API 金鑰禁止此作業。 |
| notFound |
找不到資源。 |
| unexpectedEntityState |
作業無法以目前資源的狀態執行。 |
| itemDoesAlreadyExist |
專案已經存在。 |
| serviceUnavailable |
服務目前無法使用。 |
| internalFailure |
內部錯誤。 請重試。 |
| quotaExceeded |
超過配額。 |
| jsonlValidationFailed |
jsonl 數據的驗證失敗。 |
| fileImportFailed |
匯入檔案失敗。 |
| tooManyRequests |
要求太多。 請稍後再試一次。 |
| unauthorized |
目前的使用者/API 金鑰未獲授權進行作業。 |
| contentFilter |
映射產生因我們的安全系統而失敗。 |
ErrorResponse
ErrorResponse
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤 |
FileDelete
FileDelete
| 名稱 | 類型 | Description |
|---|---|---|
| deleted |
boolean |
值,指出是否已刪除檔案。 |
| id |
string minLength: 1 |
已刪除的檔案識別碼。 |
| object |
TypeDiscriminator |
InnerError
InnerError
| 名稱 | 類型 | Description |
|---|---|---|
| code |
InnerErrorCode |
|
| innererror |
InnerError |
InnerErrorCode
InnerErrorCode
| 值 | Description |
|---|---|
| invalidPayload |
此作業的要求數據無效。 |
TypeDiscriminator
TypeDiscriminator
| 值 | Description |
|---|---|
| list |
這個物件代表其他物件的清單。 |
| fine_tuning.job |
這個物件代表微調作業。 |
| file |
這個物件代表檔案。 |
| fine_tuning.job.event |
這個物件代表微調作業的事件。 |
| fine_tuning.job.checkpoint |
這個物件代表微調作業的檢查點。 |
| model |
這個物件代表模型(可以是基底模型或微調作業結果)。 |
| batch |
這個物件代表批次。 |
| upload |
這個物件代表檔案上傳。 |
| upload.part |
這個物件代表檔案上傳的一部分。 |