Skip to main content

Get assistant message

Gets the structure of a message from the assistant for use in a request

Function GetAssistantMessage(Val Text) ExportReturn GetMessageStructure("assistant", Text);EndFunction

ParameterCLI optionTypeRequiredDescription
Text--textStringMessage text

Returns: Structure Of KeyAndValue - Fields structure


tip

Is a shorthand for the function GetMessageStructure


1C:Enterprise/OneScript code example
    Result = OPI_OpenAI.GetAssistantMessage("What is 1C:Enterprise?");
    oint openai GetAssistantMessage \
--text "What is 1C:Enterprise?"
Result
{
"role": "assistant",
"content": "What is 1C:Enterprise?"
}