def parse_request(self, request):
        """
        Parse a request to extract the functionality and request body.

        Args:
            request (str): The request string in JSON format.

        Returns:
            str: A formatted request string or the original request if parsing fails.

        """
        try:
            if request.startswith("{"):
                request = ast.literal_eval(request)
                functionality = request["functionality_request"]
                request_body = request["request_body"]
                request = f"{functionality}({request_body})"
            return request

        except Exception as e:
            print(e)
            return str(request)

        Parse a request to extract the functionality and request body.

        Args:
            request (str): The request string in JSON format.

        Returns:
            str: A formatted request string or the original request if parsing fails.

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