Merge branch 'dev' of https://github.com/MaiM-with-u/MaiBot into dev
This commit is contained in:
@@ -48,7 +48,7 @@ class EmojiAction(BaseAction):
|
||||
# 1. 获取发送表情的原因
|
||||
# reason = self.action_data.get("reason", "表达当前情绪")
|
||||
reason = self.reasoning
|
||||
|
||||
|
||||
# 2. 随机获取20个表情包
|
||||
sampled_emojis = await emoji_api.get_random(30)
|
||||
if not sampled_emojis:
|
||||
|
||||
@@ -14,7 +14,6 @@ from src.plugins.built_in.relation.relation import BuildRelationAction
|
||||
logger = get_logger("relation_actions")
|
||||
|
||||
|
||||
|
||||
class GetPersonInfoTool(BaseTool):
|
||||
"""获取用户信息"""
|
||||
|
||||
@@ -24,7 +23,7 @@ class GetPersonInfoTool(BaseTool):
|
||||
("person_name", ToolParamType.STRING, "需要获取信息的人的名称", True, None),
|
||||
("info_type", ToolParamType.STRING, "需要获取信息的类型", True, None),
|
||||
]
|
||||
|
||||
|
||||
available_for_llm = True
|
||||
|
||||
async def execute(self, function_args: dict[str, Any]) -> dict[str, Any]:
|
||||
@@ -44,7 +43,7 @@ class GetPersonInfoTool(BaseTool):
|
||||
return {"content": f"用户 {person_name} 不存在"}
|
||||
if not person.is_known:
|
||||
return {"content": f"不认识用户 {person_name}"}
|
||||
|
||||
|
||||
relation_str = await person.build_relationship(info_type=info_type)
|
||||
|
||||
return {"content": relation_str}
|
||||
|
||||
Reference in New Issue
Block a user