pub fn validate_role(role: &str) -> Result<MessageRole, ChatHistoryError>
Validate a message role string.