共用方式為


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

FileDelete

已成功刪除檔案。

Other Status Codes

ErrorResponse

發生錯誤。

安全性

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

錯誤

ErrorCode

ErrorCode

ErrorResponse

ErrorResponse

FileDelete

FileDelete

InnerError

InnerError

InnerErrorCode

InnerErrorCode

TypeDiscriminator

TypeDiscriminator

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

minLength: 1

此錯誤的訊息。

target

string

如果有的話,就會發生錯誤的位置。

ErrorCode

ErrorCode

Description
conflict

要求的作業與目前的資源狀態衝突。

contentFilter

映射產生因我們的安全系統而失敗。

fileImportFailed

匯入檔案失敗。

forbidden

目前使用者/API 金鑰禁止此作業。

internalFailure

內部錯誤。 請重試。

invalidPayload

此作業的要求數據無效。

itemDoesAlreadyExist

專案已經存在。

jsonlValidationFailed

jsonl 數據的驗證失敗。

notFound

找不到資源。

quotaExceeded

超過配額。

serviceUnavailable

服務目前無法使用。

tooManyRequests

要求太多。 請稍後再試一次。

unauthorized

目前的使用者/API 金鑰未獲授權進行作業。

unexpectedEntityState

作業無法以目前資源的狀態執行。

ErrorResponse

ErrorResponse

名稱 類型 Description
error

Error

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

FileDelete

FileDelete

名稱 類型 Description
deleted

boolean

值,指出是否已刪除檔案。

id

string

minLength: 1

已刪除的檔案識別碼。

object

TypeDiscriminator

TypeDiscriminator
定義物件的型別。

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

此作業的要求數據無效。

TypeDiscriminator

TypeDiscriminator

Description
batch

這個物件代表批次。

file

這個物件代表檔案。

fine_tuning.job

這個物件代表微調作業。

fine_tuning.job.checkpoint

這個物件代表微調作業的檢查點。

fine_tuning.job.event

這個物件代表微調作業的事件。

list

這個物件代表其他物件的清單。

model

這個物件代表模型(可以是基底模型或微調作業結果)。

upload

這個物件代表檔案上傳。

upload.part

這個物件代表檔案上傳的一部分。