validate_messages {ollamar} | R Documentation |
Validate a list of messages
Description
Validate a list of messages to ensure they have the required fields and the correct data types for the chat()
function.
Usage
validate_messages(messages)
Arguments
messages |
A list of messages, each of list class. |
Value
TRUE if all messages are valid, otherwise warning messages are printed and FALSE is returned.
Examples
validate_messages(create_messages(
create_message("Be friendly", "system"),
create_message("Hello")
))
[Package ollamar version 1.2.2 Index]