Files - Delete
刪除具有指定檔案識別碼的檔案。如果使用檔案,例如微調作業中的訓練檔案,也允許刪除。
DELETE {endpoint}/openai/files/{file-id}?api-version=2024-02-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string url |
支援的認知服務端點 (通訊協定和主機名,例如: https://aoairesource.openai.azure.com。將 「aoairesource」 取代為您的 Azure OpenAI 帳戶名稱) 。 |
file-id
|
path | True |
string |
檔案的標識碼。 |
api-version
|
query | True |
string |
要求的 API 版本。 |
要求標頭
名稱 | 必要 | 類型 | Description |
---|---|---|---|
api-key | True |
string |
在這裡提供認知服務 Azure OpenAI 帳戶密鑰。 |
回應
名稱 | 類型 | Description |
---|---|---|
204 No Content |
已成功刪除檔案。 |
|
Other Status Codes |
Error |
發生錯誤。 |
安全性
api-key
在這裡提供認知服務 Azure OpenAI 帳戶密鑰。
Type:
apiKey
In:
header
範例
Deleting a file.
Sample Request
DELETE https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099?api-version=2024-02-01
Sample Response
定義
名稱 | Description |
---|---|
Error |
錯誤 |
Error |
ErrorCode |
Error |
ErrorResponse |
Inner |
InnerError |
Inner |
InnerErrorCode |
Error
錯誤
名稱 | 類型 | Description |
---|---|---|
code |
Error |
ErrorCode |
details |
Error[] |
如果有的話,錯誤詳細數據。 |
innererror |
Inner |
InnerError |
message |
string |
此錯誤的訊息。 |
target |
string |
如果有的話,發生錯誤的位置。 |
ErrorCode
ErrorCode
名稱 | 類型 | Description |
---|---|---|
conflict |
string |
要求的作業與目前的資源狀態衝突。 |
contentFilter |
string |
映射產生失敗,因為我們的安全系統。 |
fileImportFailed |
string |
檔案匯入失敗。 |
forbidden |
string |
目前使用者/api 金鑰禁止此作業。 |
internalFailure |
string |
內部錯誤。 請再試一次。 |
invalidPayload |
string |
此作業的要求數據無效。 |
itemDoesAlreadyExist |
string |
專案已經存在。 |
jsonlValidationFailed |
string |
jsonl 數據的驗證失敗。 |
notFound |
string |
找不到資源。 |
quotaExceeded |
string |
超過配額。 |
serviceUnavailable |
string |
服務目前無法使用。 |
tooManyRequests |
string |
太多要求。 請稍後重試。 |
unauthorized |
string |
目前的使用者/API 金鑰未獲授權進行作業。 |
unexpectedEntityState |
string |
作業無法以目前資源的狀態執行。 |
ErrorResponse
ErrorResponse
名稱 | 類型 | Description |
---|---|---|
error |
錯誤 |
InnerError
InnerError
名稱 | 類型 | Description |
---|---|---|
code |
Inner |
InnerErrorCode |
innererror |
Inner |
InnerError |
InnerErrorCode
InnerErrorCode
名稱 | 類型 | Description |
---|---|---|
invalidPayload |
string |
此作業的要求數據無效。 |