"Your response should be a numbered list with each item on a new line. "
            "For example: \n\n1. foo\n\n2. bar\n\n3. baz"
        )
[docs]    def parse(self, text: str) -> List[str]:
        """Parse the output of an LLM call."""
        pattern = r"\d+\.\s([^\n]+)"
        # Extract the text of each item
        matches = re.findall(pattern, text)
        return matches
    @property
    def _type(self) -> str:
        return "numbered-list"
[docs]class MarkdownListOutputParser(ListOutputParser):
    """Parse a markdown list."""
[docs]    def get_format_instructions(self) -> str:
        return "Your response should be a markdown list, " "eg: `- foo\n- bar\n- baz`"
[docs]    def parse(self, text: str) -> List[str]:
        """Parse the output of an LLM call."""
        pattern = r"-\s([^\n]+)"
        return re.findall(pattern, text)
    @property
    def _type(self) -> str:
        return "markdown-list"