def invoke(self, arg, from_tty):
        """Invokes custom GDB command and sends API request

        Params:
        arg (str): argument passed to command
        from_tty (bool): whether command was invoked from TTY
        """
        global prev_command
        # handling if user is asking for help on how to use the commands
        if arg == "help":
            utils.chat_help()
            return

        prev_command, command = utils.chat_helper(arg, COMMAND_PROMPT)
        gdb.execute(command)
Invokes custom GDB command and sends API request

        Params:
        arg (str): argument passed to command
        from_tty (bool): whether command was invoked from TTY
        
chatgdb/gdb.py