From e69030ea181639e8ce2a60b8a70fc7900f800c0c Mon Sep 17 00:00:00 2001 From: Oskar Kirmis Date: Mon, 23 Dec 2024 17:23:17 +0100 Subject: [PATCH] Fix formatting --- llama-index-core/llama_index/core/indices/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llama-index-core/llama_index/core/indices/utils.py b/llama-index-core/llama_index/core/indices/utils.py index ae1c0a4e22b4e..42cd0a0cc23d0 100644 --- a/llama-index-core/llama_index/core/indices/utils.py +++ b/llama-index-core/llama_index/core/indices/utils.py @@ -117,7 +117,9 @@ def default_parse_choice_select_answer_fn( answer_nums.append(answer_num) # extract just the first digits after the colon. try: - _answer_relevance = re.findall(r"\d+", line_tokens[1].split(":")[1].strip())[0] + _answer_relevance = re.findall( + r"\d+", line_tokens[1].split(":")[1].strip() + )[0] answer_relevances.append(float(_answer_relevance)) except (IndexError, ValueError) as e: if not raise_error: