Files
Genarrative/src/prompts/customWorldEntityActionPrompts.ts
kdletters cbc27bad4a
Some checks failed
CI / verify (push) Has been cancelled
init with react+axum+spacetimedb
2026-04-26 18:06:23 +08:00

33 lines
968 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type {
CustomWorldNpc,
CustomWorldPlayableNpc,
CustomWorldRoleSkill,
} from '../types';
export function buildSkillActionPrompt(params: {
role: Pick<
CustomWorldPlayableNpc | CustomWorldNpc,
| 'name'
| 'title'
| 'role'
| 'description'
| 'backstory'
| 'personality'
| 'motivation'
>;
skill: Pick<CustomWorldRoleSkill, 'name' | 'summary'>;
}) {
const { role, skill } = params;
return [
`${role.name}${role.title || role.role}`,
`技能名称:${skill.name}`,
skill.summary ? `技能表现:${skill.summary}` : '',
role.description ? `角色气质:${role.description}` : '',
role.personality ? `性格补充:${role.personality}` : '',
role.motivation ? `动作目标:${role.motivation}` : '',
'横版 RPG 角色技能动作,角色轮廓稳定,动作起手明确,过程连贯,收招干净,镜头稳定。',
]
.filter(Boolean)
.join(' ');
}