validate_message | R Documentation |
Validate a message to ensure it has the required fields and the correct data types for the chat()
function.
validate_message(message)
message |
A list with a single message of list class. |
TRUE if message is valid, otherwise an error is thrown.
validate_message(create_message("Hello"))
validate_message(list(role = "user", content = "Hello"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.