Download file
Get file data from the server
Function DownloadFile(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: BinaryData - File data
tip
Method at API documentation: Retrieve file content
1C:Enterprise/OneScript code example
URL = "https://hut.openintegrations.dev/localai/";
Token = "12We...";
FileID = "file-65";
Result = OPI_OpenAI.DownloadFile(URL, Token, FileID);
- Bash
- CMD/Bat
oint openai DownloadFile \
--url "https://hut.openintegrations.dev/localai/" \
--token "***" \
--id "file-62"
oint openai DownloadFile ^
--url "https://hut.openintegrations.dev/localai/" ^
--token "***" ^
--id "file-62"
Result
NOT JSON: 0D 0A FF D8 FF E1 54 C1 45 78 69 66 00 00 49 49 2A 00 08 00 00 00 0B 00 0E 01 02 00 20 00 00 00 92 00 00 00 0F 01 02 00 05 00 00 00 B2 00 00 00 10 01 02 00 07 00 00 00 B8 00 00 00 12 01 03 00…