def run_process(
        self, child_sock, request, spoke_id, chat_history=None, chat_method="chat"
    ):
        """
        Run the process for handling a request, setting up sandboxing, and managing chat interactions.

        Args:
            child_sock (Socket): The socket for communication with the hub.
            request (str): The request to be processed.
            spoke_id (str): The identifier for the spoke.
            chat_history (Optional[List[ChatMessage]], optional): The chat history. Defaults to None.
            chat_method (str, optional): The chat method to be used. Defaults to "chat".

        """
        # Set seccomp and setrlimit
        set_mem_limit()
        drop_perms()

        self.spoke_operator.spoke_id = spoke_id
        self.spoke_operator.child_sock = child_sock
        query = self.spoke_operator.parse_request(request)

        if chat_method == "chat":
            results = self.chat(query, chat_history)
        elif chat_method == "achat":
            results = self.achat(query, chat_history)
        elif chat_method == "stream_chat":
            results = self.stream_chat(query, chat_history)
        elif chat_method == "astream_chat":
            results = self.astream_chat(query, chat_history)
        else:
            results = "The chat method is not supported. Please use one of the following: chat, achat, stream_chat, astream_chat."

        self.spoke_operator.return_response(str(results))

        Run the process for handling a request, setting up sandboxing, and managing chat interactions.

        Args:
            child_sock (Socket): The socket for communication with the hub.
            request (str): The request to be processed.
            spoke_id (str): The identifier for the spoke.
            chat_history (Optional[List[ChatMessage]], optional): The chat history. Defaults to None.
            chat_method (str, optional): The chat method to be used. Defaults to "chat".

        
llama-index-packs/llama-index-packs-secgpt/llama_index/packs/secgpt/spoke.py