1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-18 09:51:28 +02:00
Files
OpenIntegrations/docs/en/md/OpenAI/Requests-processing/Get-assistant-message.mdx
T

75 lines
2.0 KiB
Plaintext
Vendored

---
sidebar_position: 6
description: Get assistant message 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';
import Admonition from '@theme/Admonition';
# Get assistant message
Gets the structure of a message from the assistant for use in a request
<Tabs>
<TabItem value="params" label="Parameters" default>
`Function GetAssistantMessage(Val Text) ExportReturn GetMessageStructure("assistant", Text);EndFunction`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Text | --text | String | &#x2714; | Message text |
<div className="return-value-note">
<div className="return-value-note__title">Returns</div>
<div className="return-value-note__value">
Structure Of KeyAndValue - Fields structure
</div>
</div>
</TabItem>
<TabItem value="extended" label={<span>Advanced call{' '}<a href="/docs/Start/Advanced-call" target="_blank" rel="noreferrer" title="About advanced call" onClick={(e) => e.stopPropagation()}>?</a></span>}>
*This method has no additional advanced call parameters.*
</TabItem>
</Tabs>
:::tip
Is a shorthand for the function `GetMessageStructure`
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Result = OPI_OpenAI.GetAssistantMessage("What is 1C:Enterprise?");
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint openai GetAssistantMessage \
--text "What is 1C:Enterprise?"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint openai GetAssistantMessage ^
--text "What is 1C:Enterprise?"
```
</TabItem>
</Tabs>
```json title="Result"
"{\r\n \"role\": \"assistant\",\r\n \"content\": \"What is 1C:Enterprise?\"\r\n}"
```