black format

This commit is contained in:
Venkat
2026-02-03 13:41:09 +00:00
parent e8e8f1ba5a
commit 2aa68f75b9
15 changed files with 253 additions and 231 deletions
@@ -328,6 +328,7 @@ def extract_amendment_num_from_filename(answer_dict: dict, filename: str) -> dic
return answer_dict
def prompt_hsc_single_field(
field, retriever, reranker, rag_config, text_dict, constants, filename
):
@@ -365,7 +366,9 @@ def prompt_hsc_single_field(
llm_prompt = field.get_prompt_dict(
constants
) # Returns dict of {field_name : prompt}
prompt, _parser = prompt_templates.ONE_TO_ONE_SINGLE_FIELD_TEMPLATE(context, llm_prompt)
prompt, _parser = prompt_templates.ONE_TO_ONE_SINGLE_FIELD_TEMPLATE(
context, llm_prompt
)
logging.debug(f"Field: {field.field_name}")
logging.debug(f"Retrieval question: {retrieval_query}")
@@ -384,7 +387,7 @@ def prompt_hsc_single_field(
field_value = llm_answer_final.get(field.field_name)
if not isinstance(field_value, list):
field_value = [field_value]
if field_value[0] == "N/A":
field.field_type = "full_context"
if field.field_name == "PAYER_NAME":
@@ -412,4 +415,3 @@ def prompt_hsc_single_field(
f"Error on {field.field_name}: {type(e).__name__}: {str(e)}, marking as full_context"
)
return (field.field_name, "N/A", field)