class_docstr: Handles CRUD operations at the database level for Chatbots
class_docstr_tok: ["Handles","CRUD","operations","at","the","database","level","for","Chatbots"]
docstr: Deletes a chatbot by name.
  
  Parameters:
      chatbot_name (str): The name of the chatbot to delete
      project_name (str): The name of the containing project
docstr_tok: ["Deletes","a","chatbot","by","name",".","Parameters",":","chatbot_name","(","str",")",":","The","name","of","the","chatbot","to","delete","project_name","(","str",")",":","The","name","of","the","containing","project"]
code: def delete_chatbot(
      self, chatbot_name: str, project_name: str = "mindsdb"
  ):
      """
      Deletes a chatbot by name.
  
      Parameters:
          chatbot_name (str): The name of the chatbot to delete
          project_name (str): The name of the containing project
      """
  
      bot = self.get_chatbot(chatbot_name, project_name)
      if bot is None:
          raise Exception(f"Chat bot doesn't exist: {chatbot_name}")
  
      bot_rec = db.ChatBots.query.get(bot["id"])
  
      task = db.Tasks.query.filter(
          db.Tasks.object_type == self.OBJECT_TYPE,
          db.Tasks.object_id == bot_rec.id,
          db.Tasks.company_id == ctx.company_id,
      ).first()
  
      if task is not None:
          db.session.delete(task)
  
      db.session.delete(bot_rec)
  
      db.session.commit()
  
file_path: mindsdb/mindsdb/interfaces/chatbot/chatbot_controller.py
imports: from typing import Dict, List
  from mindsdb.interfaces.agents.agents_controller import AgentsController
  from mindsdb.interfaces.database.projects import ProjectController
  from mindsdb.interfaces.storage import db
  from mindsdb.utilities.context import context
  from mindsdb.api.executor.controllers.session_controller import SessionController
  from mindsdb.utilities.config import Config
label_desc: Use image node_id 6 for calling the ChatBotController obj's underlying member method code with example usage: obj.delete_chatbot(chatbot_name, project_name) without return types