Delete file
Deletes a previously uploaded file
- Parameters
- Advanced call ?
Function DeleteFile(Val URL, Val Token, Val FileID, Val AdditionalHeaders = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| URL | --url | String | ✔ | OpenAI server URL |
| Token | --token | String | ✔ | OpenAI authorization token |
| FileID | --id | String | ✔ | File ID |
| AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns
Map Of KeyAndValue - Processing result
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
tip
Method at API documentation: Delete file
1C:Enterprise/OneScript code example
URL = "https://hut.openintegrations.dev/localai/";
Token = "12We34...";
FileID = "file-3";
Result = OPI_OpenAI.DeleteFile(URL, Token, FileID);
- Bash
- CMD/Bat
oint openai DeleteFile \
--url "https://hut.openintegrations.dev/localai/" \
--token "***" \
--id "file-12"
oint openai DeleteFile ^
--url "https://hut.openintegrations.dev/localai/" ^
--token "***" ^
--id "file-12"
Result
{
"id": "file-12",
"object": "file",
"deleted": true
}