File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
graphgen/models/generator Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,17 @@ def build_prompt_for_description(
5353 )
5454 return prompt
5555
56+ @staticmethod
57+ def parse_rephrased_text (content : str ) -> str :
58+ """
59+ Parse the rephrased text from the response.
60+ :param content: LLM response content
61+ :return:
62+ """
63+ rephrased_text = content .strip ().strip ('"' )
64+ logger .debug ("Rephrased Text: %s" , rephrased_text )
65+ return rephrased_text
66+
5667 @staticmethod
5768 def parse_response (response : str ) -> Any :
5869 """
@@ -61,14 +72,4 @@ def parse_response(response: str) -> Any:
6172 :return: Rephrased text
6273 """
6374
64- def parse_rephrased_text (content : str ) -> str :
65- """
66- Parse the rephrased text from the response.
67- :param content: LLM response content
68- :return:
69- """
70- rephrased_text = content .strip ().strip ('"' )
71- logger .debug ("Rephrased Text: %s" , rephrased_text )
72- return rephrased_text
73-
74- return parse_rephrased_text (response )
75+ return QuizGenerator .parse_rephrased_text (response )
You can’t perform that action at this time.
0 commit comments