Get context message structure
Gets the message structure for a list of request messages in context
Function GetContextMessageStructure(Val Role, Val Text, Val Pictures = "", Val Tools = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Role | --role | String | ✔ | Message source: system, user, assistant, tool |
Text | --text | String | ✔ | Message text |
Pictures | --images | Array Of String | ✖ | List of pictures in Base64 format (for multimodal models like llava) |
Tools | --tools | Array Of String | ✖ | List of tools in JSON format that the model should use |
Returns: Structure Of KeyAndValue - Fields structure
1C:Enterprise/OneScript code example
Result = OPI_Ollama.GetContextMessageStructure("user", "Hello!");
- Bash
- CMD/Bat
oint ollama GetContextMessageStructure \
--role "user" \
--text "Hello!"
oint ollama GetContextMessageStructure ^
--role "user" ^
--text "Hello!"
Result
{
"role": "user",
"content": "Hello!"
}