Get user message
Gets the structure of a message from the user for use in a request
Function GetUserMessage(Val Text, Val Name = "") ExportReturn GetMessageStructure("user", Text, Name);EndFunction
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Text | --text | String | ✔ | Message text |
Name | --name | String | ✖ | Name of participant in conversation |
Returns: Structure Of KeyAndValue - Fields structure
tip
Is a shorthand for the function GetMessageStructure
1C:Enterprise/OneScript code example
Result = OPI_OpenAI.GetUserMessage("What is 1C:Enterprise?", "Vitaly");
- Bash
- CMD/Bat
oint openai GetUserMessage \
--text "What is 1C:Enterprise?" \
--name "Vitaly"
oint openai GetUserMessage ^
--text "What is 1C:Enterprise?" ^
--name "Vitaly"
Result
{
"role": "user",
"content": "What is 1C:Enterprise?",
"name": "Vitaly"
}