This commit is contained in:
Timothy Jaeryang Baek 2025-08-21 04:46:43 +04:00
parent 66f00ce4bf
commit efcf6db687
1 changed files with 2 additions and 1 deletions

View File

@ -47,6 +47,7 @@ def prompt_template(template: str, user: Optional[Any] = None) -> str:
user = user.model_dump()
if isinstance(user, dict):
user_info = user.get("info", {}) or {}
birth_date = user.get("date_of_birth")
age = None
@ -70,7 +71,7 @@ def prompt_template(template: str, user: Optional[Any] = None) -> str:
USER_VARIABLES = {
"name": str(user.get("name")),
"location": str(user.get("info", {}).get("location")),
"location": str(user_info.get("location")),
"bio": str(user.get("bio")),
"gender": str(user.get("gender")),
"birth_date": str(birth_date),