diff --git a/lpm_kernel/L1/topics_generator.py b/lpm_kernel/L1/topics_generator.py index 978ebf7b..19e756e8 100644 --- a/lpm_kernel/L1/topics_generator.py +++ b/lpm_kernel/L1/topics_generator.py @@ -677,12 +677,8 @@ def __parse_response(self, content: str, key1: str, key2: str) -> tuple: Returns: A tuple containing the values for the two keys """ - spl = key1 + '":' - b = '{"' + spl + "".join(content.split(spl)[1:]) - c = b.split("}")[0] + "}" - res_dict = json.loads(c) - - return res_dict[key1], res_dict[key2] + data = json.loads(content) + return data[key1], data[key2] def __build_embedding_chunks(self, notes_list: List[Note]) -> tuple: