desolo-2918 commited on
Commit
58ab682
·
verified ·
1 Parent(s): 0b5ccca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -92,7 +92,7 @@ def parse_claim(json_data: str) -> str:
92
 
93
  @tool
94
  def is_valid_query(query: str) -> str:
95
- """Validates policy standing and dates against coverage database.
96
 
97
  Args:
98
  query: The parsed claim JSON string.
@@ -113,12 +113,6 @@ def is_valid_query(query: str) -> str:
113
  dues = policy.get("claim_dues_remaining", "").lower() in ("true", "1", "yes")
114
  if dues: return json.dumps((False, "Outstanding dues found."))
115
 
116
- d_loss = datetime.datetime.strptime(claim_info.date_of_loss, "%Y-%m-%d")
117
- d_start = datetime.datetime.strptime(policy["coverage_start_date"], "%Y-%m-%d")
118
- d_end = datetime.datetime.strptime(policy["coverage_end_date"], "%Y-%m-%d")
119
-
120
- if not (d_start <= d_loss <= d_end):
121
- return json.dumps((False, "Loss date outside coverage period."))
122
 
123
  return json.dumps((True, "Valid claim."))
124
  except Exception as e:
 
92
 
93
  @tool
94
  def is_valid_query(query: str) -> str:
95
+ """Validates policy standing. (Date verification removed to allow any date).
96
 
97
  Args:
98
  query: The parsed claim JSON string.
 
113
  dues = policy.get("claim_dues_remaining", "").lower() in ("true", "1", "yes")
114
  if dues: return json.dumps((False, "Outstanding dues found."))
115
 
 
 
 
 
 
 
116
 
117
  return json.dumps((True, "Valid claim."))
118
  except Exception as e: