add applicant names to prompt

This commit is contained in:
ipu 2025-09-29 18:46:52 +03:00
parent e0de48a66a
commit 0e6cb8bbd0

View file

@ -249,6 +249,13 @@ class ChatService:
if application.get("phq", {}).get("effectiveDate", None):
effective_date = application.get("phq", {}).get("effectiveDate", None)
instructions += f"Plan effective date: {effective_date}"
applicants = application.get("applicants", [])
if applicants:
applicants_info = "\nApplicants:"
for n, applicant in enumerate(applicants, 1):
user_name = applicant["firstName"]
applicants_info += f"\n{n}. {user_name}"
instructions += applicants_info
if current_page:
instructions += f"\n\n# User now is currently on page: {current_page}"