Validate a message to ensure it has the required fields and the correct data types for the chat()
function.
Examples
validate_message(create_message("Hello"))
#> [1] TRUE
validate_message(list(role = "user", content = "Hello"))
#> [1] TRUE
Validate a message to ensure it has the required fields and the correct data types for the chat()
function.
validate_message(create_message("Hello"))
#> [1] TRUE
validate_message(list(role = "user", content = "Hello"))
#> [1] TRUE