diff --git a/src/pipelines/saas/prompts/prompt_calls.py b/src/pipelines/saas/prompts/prompt_calls.py index 279517e..3c0f53d 100644 --- a/src/pipelines/saas/prompts/prompt_calls.py +++ b/src/pipelines/saas/prompts/prompt_calls.py @@ -357,7 +357,6 @@ def prompt_special_case_assignment( filename: str, ) -> dict[str, str]: - # If all non-term values are identical across dictionaries, return first dict non_term_keys = [k for k in special_case_dicts[0].keys() if "_TERM" not in k] if all( @@ -392,7 +391,9 @@ def prompt_special_case_assignment( # This is a special case - we need the index as an integer if isinstance(index_answer, list) and len(index_answer) > 0: index_str = str(index_answer[0]) # Convert to string first - if not string_utils.is_empty(index_str) and int(index_str) < len(special_case_dicts): + if not string_utils.is_empty(index_str) and int(index_str) < len( + special_case_dicts + ): return special_case_dicts[int(index_str)] return {} except: