def _get_source_docs_from_answer()

in code/embedding-function/utilities/parser/output_parser_tool.py [0:0]


    def _get_source_docs_from_answer(self, answer):
        # extract all [docN] from answer and extract N, and just return the N's as a list of ints
        results = re.findall(r"\[doc(\d+)\]", answer)
        return [int(i) for i in results]