|
@@ -16,7 +16,7 @@ def format_agent_profile(profile: Dict) -> str:
|
|
|
]
|
|
|
strings_to_join = []
|
|
|
for field in fields:
|
|
|
- if not profile.get(field[0], None):
|
|
|
+ if profile.get(field[0], None) is None:
|
|
|
continue
|
|
|
cur_string = f"- {field[1]}:{profile[field[0]]}"
|
|
|
strings_to_join.append(cur_string)
|
|
@@ -54,8 +54,8 @@ def format_user_profile(profile: Dict) -> str:
|
|
|
for field in fields:
|
|
|
value = profile.get(field[0], None)
|
|
|
if not value:
|
|
|
- continue
|
|
|
- if isinstance(value, list):
|
|
|
+ value = '未知'
|
|
|
+ elif isinstance(value, list):
|
|
|
value = ','.join(value)
|
|
|
elif isinstance(value, dict):
|
|
|
value = ';'.join(f"{k}: {v}" for k, v in value.items())
|