dev:修复记忆构建文本名称问题

This commit is contained in:
SengokuCola
2025-04-29 01:49:51 +08:00
parent f83e151d40
commit 286fef79c4
14 changed files with 494 additions and 367 deletions

View File

@@ -1,6 +1,5 @@
from dataclasses import dataclass
from typing import List
import random
@dataclass
@@ -86,27 +85,6 @@ class Identity:
instance.appearance = appearance
return instance
def get_prompt(self, x_person, level):
"""
获取身份特征的prompt
"""
if x_person == 2:
prompt_identity = ""
elif x_person == 1:
prompt_identity = ""
else:
prompt_identity = ""
if level == 1:
identity_detail = self.identity_detail
random.shuffle(identity_detail)
prompt_identity += identity_detail[0]
elif level == 2:
for detail in self.identity_detail:
prompt_identity += f",{detail}"
prompt_identity += ""
return prompt_identity
def to_dict(self) -> dict:
"""将身份特征转换为字典格式"""
return {