langchain/base_language.py/BaseLanguageModel/get_num_tokens_from_messages
class BaseLanguageModel:    def get_num_tokens_from_messages(self, messages: List[BaseMessage]) -> int:
        """Get the number of tokens in the message."""
        return sum([self.get_num_tokens(get_buffer_string([m])) for m in messages])