You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-25 22:12:29 +02:00
144 lines
3.7 KiB
Plaintext
Vendored
144 lines
3.7 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-6",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-07T09:16:40.038242713Z",
|
|
"filename": "pic.png",
|
|
"purpose": "assistants"
|
|
},
|
|
{
|
|
"id": "file-6",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-08T14:54:29.420363804Z",
|
|
"filename": "picture3.png",
|
|
"purpose": "assistants"
|
|
},
|
|
{
|
|
"id": "file-13",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-08T16:45:08.274260508Z",
|
|
"filename": "9af2a03f-d229-47d4-a525-c4b39f065678.png",
|
|
"purpose": "user_data"
|
|
},
|
|
{
|
|
"id": "file-6",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-12T18:08:58.43730347Z",
|
|
"filename": "picture4.png",
|
|
"purpose": "assistants"
|
|
},
|
|
{
|
|
"id": "file-11",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-16T15:46:42.241542213Z",
|
|
"filename": "cba94840-aa65-41ab-bc14-947da872f60c.png",
|
|
"purpose": "assistants"
|
|
},
|
|
{
|
|
"id": "file-12",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-16T15:47:00.136014545Z",
|
|
"filename": "469ab82d-e2d7-4f18-9cb2-7a32aa725d85.png",
|
|
"purpose": "user_data"
|
|
},
|
|
{
|
|
"id": "file-15",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-16T16:49:13.11020265Z",
|
|
"filename": "b361b565-4161-4078-9018-5b531c5cefdf.png",
|
|
"purpose": "user_data"
|
|
},
|
|
{
|
|
"id": "file-18",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-16T18:33:27.811147469Z",
|
|
"filename": "acd29a36-2fa4-457a-b83b-f36ad0283b10.png",
|
|
"purpose": "user_data"
|
|
},
|
|
{
|
|
"id": "file-20",
|
|
"object": "file",
|
|
"bytes": 2114025,
|
|
"created_at": "2025-06-16T18:34:16.153579044Z",
|
|
"filename": "8c0197c7-42d8-4ee6-9918-33d113e6414f.png",
|
|
"purpose": "assistants"
|
|
}
|
|
],
|
|
"object": "list"
|
|
}
|
|
```
|