1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00
Files
OpenIntegrations/docs/en/md/OpenAI/File-management/Get-files-list.mdx
Vitaly the Alpaca (bot) 915b31dcc0 Main build (Jenkins)
2025-09-14 15:36:38 +03:00

192 lines
5.0 KiB
Plaintext
Vendored

---
sidebar_position: 1
description: Get list of files 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 list of files
Get a list of files with or without filtering
`Function GetFilesList(Val URL, Val Token, Val Count = 10000, Val AdditionalParameters = "", Val AdditionalHeaders = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| URL | --url | String | ✔ | OpenAI server URL |
| Token | --token | String | ✔ | OpenAI authorization token |
| Count | --limit | Number | ✖ | Maximum number of assistants returned |
| AdditionalParameters | --options | Structure Of KeyAndValue | ✖ | Additional request parameters, if necessary |
| AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns: Map Of KeyAndValue - Processing result
<br/>
:::tip
Method at API documentation: [List files](https://platform.openai.com/docs/api-reference/files/list)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://hut.openintegrations.dev/localai/";
Token = "12We...";
Result = OPI_OpenAI.GetFilesList(URL, Token);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint openai GetFilesList \
--url "https://hut.openintegrations.dev/localai/" \
--token "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint openai GetFilesList ^
--url "https://hut.openintegrations.dev/localai/" ^
--token "***"
```
</TabItem>
</Tabs>
```json title="Result"
{
"data": [
{
"id": "file-36",
"object": "file",
"bytes": 2114025,
"created_at": "2025-07-14T17:24:09.865196292Z",
"filename": "8d1fae3d-4135-41ba-9c02-2e706a20896a.png",
"purpose": "assistants"
},
{
"id": "file-5",
"object": "file",
"bytes": 2114025,
"created_at": "2025-08-30T20:53:39.908215998Z",
"filename": "f92bf158-291d-4b8f-8b16-5d8064a0952c.png",
"purpose": "assistants"
},
{
"id": "file-5",
"object": "file",
"bytes": 2114025,
"created_at": "2025-08-31T16:37:44.970027396Z",
"filename": "abf1f8e9-f6a3-4c98-8322-ceb12d2f8868.png",
"purpose": "assistants"
},
{
"id": "file-7",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-05T07:19:45.741949164Z",
"filename": "7abf2794-bdf1-4f11-872e-3c58c321a1bb.png",
"purpose": "user_data"
},
{
"id": "file-12",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-05T10:53:54.21791298Z",
"filename": "f9a79e51-65c3-412f-99b3-3be6bac85a34.png",
"purpose": "assistants"
},
{
"id": "file-7",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-07T17:41:29.472968922Z",
"filename": "6b4e8148-5c29-46ea-af84-82b5e3bf1447.png",
"purpose": "user_data"
},
{
"id": "file-4",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-08T10:09:47.710834673Z",
"filename": "eae14e17-aab5-44fa-8416-f80e9cb1ca43.png",
"purpose": "user_data"
},
{
"id": "file-8",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-08T11:53:22.677955061Z",
"filename": "3fafe0df-0c21-4f90-963c-f4b0d4d58135.png",
"purpose": "assistants"
},
{
"id": "file-4",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-08T20:12:10.0346231Z",
"filename": "3ed1c87f-09c0-48b7-9ffa-5f51a5d05585.png",
"purpose": "user_data"
},
{
"id": "file-4",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-11T18:15:25.545940727Z",
"filename": "26538245-7073-4f5b-af8c-44e00719777c.png",
"purpose": "user_data"
},
{
"id": "file-1",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-12T11:49:38.68801267Z",
"filename": "9836446c-66c0-439b-a145-4ed996182216.png",
"purpose": "user_data"
},
{
"id": "file-4",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-12T17:06:37.859052311Z",
"filename": "40f8d10f-88a7-4c84-8bc8-c31ecaefca7f.png",
"purpose": "user_data"
},
{
"id": "file-7",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-12T20:30:27.5584618Z",
"filename": "2cd972ba-42a0-407e-9ee5-a88c2295fbe9.png",
"purpose": "user_data"
},
{
"id": "file-10",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-14T11:57:51.792694812Z",
"filename": "9a09ff0c-5bcf-4f70-971f-d03ccaf50942.png",
"purpose": "user_data"
},
{
"id": "file-12",
"object": "file",
"bytes": 2114025,
"created_at": "2025-09-14T12:03:29.500988806Z",
"filename": "54540b77-8ea4-4486-9430-19b0279378fb.png",
"purpose": "assistants"
}
],
"object": "list"
}
```