Resolve issues

This commit is contained in:
Katon Minhas
2026-02-09 18:48:50 -05:00
parent 96d6c26ef3
commit 2a613b7efd
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -392,7 +392,8 @@ def code_implicit_rag(service, implicit_run_dict, filename, constants):
try:
llm_answer_final = _parser(llm_answer_raw)
except Exception as e:
return {"CODE_METHODOLOGY": e}
logging.error(str(e))
return {}
if not llm_answer_final:
continue
+3 -2
View File
@@ -357,6 +357,7 @@ 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(
@@ -391,7 +392,7 @@ 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):
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:
@@ -850,7 +851,7 @@ def prompt_lesser_of_check(
except json.JSONDecodeError as e:
logging.error(
f"Failed to parse LESSER_OF_CHECK JSON for service '{service_term}', "
f"exhibit '{exhibit_title}': {e}. Raw response: {llm_answer_final[:200]}... "
f"exhibit '{exhibit_title}': {e}. Raw response: {llm_answer_raw[:200]}... "
f"Defaulting to STANDALONE"
)
return {