better:优化自我认知信息

This commit is contained in:
SengokuCola
2025-05-23 17:07:41 +08:00
parent 8d23255391
commit 3a44f00bc1
4 changed files with 28 additions and 3 deletions

View File

@@ -37,4 +37,4 @@ class SelfInfo(InfoBase):
Returns:
str: 处理后的信息
"""
return self.get_self_info()
return self.get_self_info() or ""

View File

@@ -67,3 +67,17 @@ class StructuredInfo:
value: 要设置的属性值
"""
self.data[key] = value
def get_processed_info(self) -> str:
"""获取处理后的信息
Returns:
str: 处理后的信息字符串
"""
info_str = ""
for key, value in self.data.items():
info_str += f"信息类型:{key},信息内容:{value}\n"
return info_str