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://api.athenaeum.digital:1122/";
Token = "sk-or-vv-c5884ebe9f13fb143194bb07ecb...";
FileID = "file-14";
Result = OPI_OpenAI.DownloadFile(URL, Token, FileID);
- Bash
- CMD/Bat
oint openai DownloadFile \
--url "https://api.athenaeum.digital:1122/" \
--token "***" \
--id "file-4"
oint openai DownloadFile ^
--url "https://api.athenaeum.digital:1122/" ^
--token "***" ^
--id "file-4"
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…