From 7f024faa8a7c6044b1d74332bb40ea2bfb77df5c Mon Sep 17 00:00:00 2001 From: Mayank Aamseek Date: Fri, 21 Mar 2025 18:34:52 +0000 Subject: [PATCH] Merged in bugfix/Nonetype_error (pull request #449) Bugfix/Nonetype error * fixed Nonetype error * fixed AARETE_DERIVED_FEE_SCHEDULE_VERSION * Merge branch 'main' into bugfix/Nonetype_error * Fix column name Approved-by: Katon Minhas --- fieldExtraction/src/investment/one_to_n_funcs.py | 3 ++- fieldExtraction/src/prompts/investment_prompts.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fieldExtraction/src/investment/one_to_n_funcs.py b/fieldExtraction/src/investment/one_to_n_funcs.py index ecc1923..b9c895f 100644 --- a/fieldExtraction/src/investment/one_to_n_funcs.py +++ b/fieldExtraction/src/investment/one_to_n_funcs.py @@ -232,8 +232,9 @@ def get_methodology_breakout(reimbursement_primary_answers: list[dict], filename # print(f"universal_string_load failed for input {llm_response} with error {e}\nassigning methodology_breakout_answer to []") methodology_breakout_answer = [] for methodology_breakout_dict in methodology_breakout_answer: + ADRM = methodology_breakout_dict.get("AARETE_DERIVED_REIMB_METHOD", "") # Fee Schedule Breakout - if contract_reimbursement_method and "Fee Schedule" in methodology_breakout_dict.get("AARETE_DERIVED_REIMB_METHOD", ""): + if contract_reimbursement_method and ADRM and "Fee Schedule" in ADRM: fs_breakout_dict = string_utils.universal_json_load( llm_utils.invoke_claude( investment_prompts.FEE_SCHEDULE_BREAKOUT(contract_reimbursement_method, methodology_breakout_dict.get("REIMB_PCT_RATE"), fs_breakout_questions), diff --git a/fieldExtraction/src/prompts/investment_prompts.json b/fieldExtraction/src/prompts/investment_prompts.json index 5124886..26fbe3e 100644 --- a/fieldExtraction/src/prompts/investment_prompts.json +++ b/fieldExtraction/src/prompts/investment_prompts.json @@ -95,7 +95,7 @@ "field_name": "AARETE_DERIVED_FEE_SCHEDULE_VERSION", "relationship": "one_to_n", "field_type": "fee_schedule_breakout", - "prompt": "What version of the fee schedule is it? Look for a version number, a year, a date, or the words 'prevailing', 'current', or similar." + "prompt": "What version of the fee schedule is it? Look for a version number, a year, a date, or the words 'prevailing', 'current', or similar. If it is not mentioned, write 'N/A'" }, { "field_name" : "LOB",