replace prompt with desc
This commit is contained in:
@@ -18,7 +18,7 @@ class Persona:
|
||||
"""
|
||||
id: int
|
||||
name: str
|
||||
prompt: str
|
||||
desc: str
|
||||
exclusion_ids: List[int]
|
||||
weight: float
|
||||
condition: str
|
||||
@@ -27,7 +27,7 @@ class Persona:
|
||||
return self.name
|
||||
|
||||
def get_detailed_info(self) -> str:
|
||||
return f"{self.name}({self.prompt})"
|
||||
return f"{self.name}({self.desc})"
|
||||
|
||||
def _load_personas() -> tuple[dict[int, Persona], dict[str, Persona]]:
|
||||
"""从配表加载persona数据"""
|
||||
@@ -52,7 +52,7 @@ def _load_personas() -> tuple[dict[int, Persona], dict[str, Persona]]:
|
||||
persona = Persona(
|
||||
id=int(row["id"]),
|
||||
name=str(row["name"]),
|
||||
prompt=str(row["prompt"]),
|
||||
desc=str(row["desc"]),
|
||||
exclusion_ids=exclusion_ids,
|
||||
weight=weight,
|
||||
condition=condition,
|
||||
|
||||
@@ -46,7 +46,7 @@ class Technique:
|
||||
name: str
|
||||
attribute: TechniqueAttribute
|
||||
grade: TechniqueGrade
|
||||
prompt: str
|
||||
desc: str
|
||||
weight: float
|
||||
condition: str
|
||||
# 归属宗门名称;None/空表示无宗门要求(散修可修)
|
||||
@@ -61,7 +61,7 @@ class Technique:
|
||||
return f"{self.name}({self.attribute}){self.grade.value}"
|
||||
|
||||
def get_detailed_info(self) -> str:
|
||||
return f"{self.name}({self.attribute}){self.grade.value} {self.prompt}"
|
||||
return f"{self.name}({self.attribute}){self.grade.value} {self.desc}"
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ def loads() -> tuple[dict[int, Technique], dict[str, Technique]]:
|
||||
name=name,
|
||||
attribute=attr,
|
||||
grade=grade,
|
||||
prompt=str(row.get("prompt", "")),
|
||||
desc=str(row.get("desc", "")),
|
||||
weight=weight,
|
||||
condition=condition,
|
||||
sect=sect,
|
||||
|
||||
@@ -11,7 +11,7 @@ def load_csv(path: Path) -> pd.DataFrame:
|
||||
"id": int,
|
||||
"name": str,
|
||||
"description": str,
|
||||
"prompt": str,
|
||||
"desc": str,
|
||||
"weight": float,
|
||||
}
|
||||
for column, dtype in row_types.items():
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
id,name,exclusion_ids,prompt,weight,condition
|
||||
,,和本persona互斥的persona的id,输入给LLM的prompt,采样时不同权重被采样到的概率,选取条件(可用avatar字段/Alignment中文或英文等)
|
||||
id,name,exclusion_ids,desc,weight,condition
|
||||
,,和本persona互斥的persona的id,描述/用于LLM输入的文本,采样时不同权重被采样到的概率,选取条件(可用avatar字段/Alignment中文或英文等)
|
||||
1,理性,2;5,你总是会用逻辑来思考问题,做事会谋定而后动。,1,
|
||||
2,无常,1;24;25;9,目标飘忽不定,不会长期坚持一个目标。,1,
|
||||
3,怠惰,4;24;25,你总是会拖延,不想努力,更热衷于享受人生。,1,
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
id,name,technique_root,grade,prompt,weight,condition,sect
|
||||
,名称,属性,品阶(上中下),提示词,抽样权重,条件,所属宗门
|
||||
id,name,technique_root,grade,desc,weight,condition,sect
|
||||
,名称,属性,品阶(上中下),描述/提示词,抽样权重,条件,所属宗门
|
||||
1,太乙金光锻体诀,金,下品,运太乙金光淬骨炼筋,金罡护体,刀兵难侵。,1,,
|
||||
2,金阳破甲术,金,中品,融金阳之炽与锋,一往破敌,破甲断魄。,1,,
|
||||
4,青木长春诀,木,下品,借青木长春之机,涓涓养元,稳固根基。,1,,
|
||||
|
||||
|
Reference in New Issue
Block a user