Share via


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

ErrorResponse

發生錯誤。

安全性

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

錯誤

ErrorCode

ErrorCode

ErrorResponse

ErrorResponse

InnerError

InnerError

InnerErrorCode

InnerErrorCode

Error

錯誤

名稱 類型 Description
code

ErrorCode

ErrorCode
Microsoft REST 指導方針中所定義的錯誤碼 (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses) 。

details

Error[]

如果有的話,錯誤詳細數據。

innererror

InnerError

InnerError
Microsoft REST 指導方針中所定義的內部錯誤 () https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

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

Error

錯誤
Microsoft REST 指導方針中所定義的錯誤內容 () https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

InnerError

InnerError

名稱 類型 Description
code

InnerErrorCode

InnerErrorCode
Microsoft REST 指導方針中所定義的內部錯誤碼 (https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses) 。

innererror

InnerError

InnerError
Microsoft REST 指導方針中所定義的內部錯誤 () https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

InnerErrorCode

InnerErrorCode

名稱 類型 Description
invalidPayload

string

此作業的要求數據無效。