1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/OpenAI/Requests-processing/Get-message-structure.mdx

61 lines
1.6 KiB
Plaintext
Raw Normal View History

2025-06-06 22:27:44 +03:00
---
2025-06-08 20:09:09 +03:00
sidebar_position: 4
description: Get message structure 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
2025-06-06 22:27:44 +03:00
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';
2025-06-08 20:09:09 +03:00
# Get message structure
2025-06-25 13:17:23 +03:00
Gets the structure of an arbitrary message for the request message list
2025-06-06 22:27:44 +03:00
`Function GetMessageStructure(Val Role, Val Text, Val Name = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
2025-06-25 13:17:23 +03:00
| Role | --role | String | ✔ | Source of the message: system, user, assistant, etc.. |
2025-06-06 22:27:44 +03:00
| Text | --text | String | ✔ | Message text |
| Name | --name | String | ✖ | Name of participant in conversation |
Returns: Structure Of KeyAndValue - Fields structure
<br/>
```bsl title="1C:Enterprise/OneScript code example"
2025-06-08 20:09:09 +03:00
Result = OPI_OpenAI.GetMessageStructure("user", "What is 1C:Enterprise?");
2025-06-06 22:27:44 +03:00
```
2025-06-18 21:53:54 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint openai GetMessageStructure \
2025-07-15 23:11:07 +03:00
--role "system" \
2025-06-18 21:53:54 +03:00
--text "What is 1C:Enterprise?"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint openai GetMessageStructure ^
2025-07-15 23:11:07 +03:00
--role "system" ^
2025-06-18 21:53:54 +03:00
--text "What is 1C:Enterprise?"
```
</TabItem>
</Tabs>
2025-06-06 22:27:44 +03:00
2025-06-17 16:20:59 +03:00
```json title="Result"
{
"role": "user",
"content": "What is 1C:Enterprise?"
}
```