def action_input_parser(json_str: str) -> dict:
    """
    Parse a JSON-like string into a dictionary.

    Args:
        json_str (str): The JSON-like string to parse.

    Returns:
        dict: The parsed dictionary.

    """
    processed_string = re.sub(r"(?<!\w)\'|\'(?!\w)", '"', json_str)
    pattern = r'"(\w+)":\s*"([^"]*)"'
    matches = re.findall(pattern, processed_string)
    return dict(matches)

    Parse a JSON-like string into a dictionary.

    Args:
        json_str (str): The JSON-like string to parse.

    Returns:
        dict: The parsed dictionary.

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