You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-25 22:12:29 +02:00
61 lines
1.6 KiB
Plaintext
Vendored
61 lines
1.6 KiB
Plaintext
Vendored
---
|
|
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
|
|
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 message structure
|
|
Gets the structure of an arbitrary message for the request message list
|
|
|
|
|
|
|
|
`Function GetMessageStructure(Val Role, Val Text, Val Name = "") Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| Role | --role | String | ✔ | Source of the message: system, user, assistant, etc.. |
|
|
| 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"
|
|
Result = OPI_OpenAI.GetMessageStructure("user", "What is 1C:Enterprise?");
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint openai GetMessageStructure \
|
|
--role "system" \
|
|
--text "What is 1C:Enterprise?"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint openai GetMessageStructure ^
|
|
--role "system" ^
|
|
--text "What is 1C:Enterprise?"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"role": "user",
|
|
"content": "What is 1C:Enterprise?"
|
|
}
|
|
```
|