|
@@ -63,6 +63,10 @@ class UserProfileExtractor:
|
|
|
"type": "array",
|
|
|
"items": {"type": "string"},
|
|
|
"description": "用户提及的健康状况"
|
|
|
+ },
|
|
|
+ "interaction_frequency": {
|
|
|
+ "type": "string",
|
|
|
+ "description": "用户期望的交互频率。每2天联系小于1次为low,每天联系1次为medium,不再联系为stopped"
|
|
|
}
|
|
|
},
|
|
|
"required": []
|
|
@@ -132,9 +136,10 @@ if __name__ == '__main__':
|
|
|
'region': '北京',
|
|
|
'health_conditions': [],
|
|
|
'medications': [],
|
|
|
- 'interests': []
|
|
|
+ 'interests': [],
|
|
|
+ 'interaction_frequency': 'medium'
|
|
|
}
|
|
|
- message = "我回天津老家了"
|
|
|
+ message = "没有任何问题放心,不会骚扰你了,再见"
|
|
|
resp = extractor.extract_profile_info(current_profile, message)
|
|
|
print(resp)
|
|
|
message = "好的,孩子,我是老李头,今年68啦,住在北京海淀区。平时喜欢在微信上跟老伙伴们聊聊养生、下下象棋,偶尔也跟年轻人学学新鲜事儿。\n" \
|