You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-27 22:18:36 +02:00
78 lines
2.1 KiB
Plaintext
Vendored
78 lines
2.1 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 3
|
|
description: Get information about file and other functions to work with OpenAI in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, OpenAI]
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Get information about file
|
|
Gets information about the file
|
|
|
|
|
|
|
|
`Function GetFileInformation(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
|
|
|
|
<br/>
|
|
|
|
:::tip
|
|
Method at API documentation: [Retrieve file](https://platform.openai.com/docs/api-reference/files/retrieve)
|
|
:::
|
|
<br/>
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
URL = "https://hut.openintegrations.dev/localai/";
|
|
Token = "12We...";
|
|
|
|
FileID = "file-3";
|
|
|
|
Result = OPI_OpenAI.GetFileInformation(URL, Token, FileID);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint openai GetFileInformation \
|
|
--url "https://hut.openintegrations.dev/localai/" \
|
|
--token "***" \
|
|
--id "file-62"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint openai GetFileInformation ^
|
|
--url "https://hut.openintegrations.dev/localai/" ^
|
|
--token "***" ^
|
|
--id "file-62"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"id": "file-20",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-16T18:34:16.153579044Z",
|
|
"filename": "8c0197c7-42d8-4ee6-9918-33d113e6414f.png",
|
|
"purpose": "assistants"
|
|
}
|
|
```
|