validate_message {ollamar} | R Documentation |
Validate a message
Description
Validate a message to ensure it has the required fields and the correct data types for the chat()
function.
Usage
validate_message(message)
Arguments
message |
A list with a single message of list class. |
Value
TRUE if message is valid, otherwise an error is thrown.
Examples
validate_message(create_message("Hello"))
validate_message(list(role = "user", content = "Hello"))
[Package ollamar version 1.2.2 Index]