class_docstr: uses mindsdb database to store messages
class_docstr_tok: ["uses","mindsdb","database","to","store","messages"]
code: def _add_to_history(self, chat_id, message):
      chat_bot_id = self.chat_task.bot_id
      message = db.ChatBotsHistory(
          chat_bot_id=chat_bot_id,
          type=message.type.name,
          text=message.text,
          user=message.user,
          destination=chat_id,
      )
      db.session.add(message)
      db.session.commit()
  
imports: from mindsdb_sql.parser.ast import Identifier, Select, BinaryOperation, Constant, OrderBy
  from mindsdb.interfaces.storage import db
  from .types import ChatBotMessage
label_desc: Use image node_id 1 for calling the DBMemory obj's underlying member method code with example usage: obj._add_to_history(chat_id, message) without return types