Chat相关表现&逻辑分离,新增ChatController
新增情绪机器人逻辑, 新增情绪切换视频逻辑
This commit is contained in:
@@ -13,10 +13,26 @@ export class RoleConfigLoader {
|
||||
*/
|
||||
public static getRoleInstruction(roleId: number): string {
|
||||
const AiCharacter = ConfigManager.tables.TbAiCharacters.get(roleId);
|
||||
const globalPrompt = ConfigManager.tables.TbGlobalConfig.girlBasePrompt;
|
||||
const prompt =
|
||||
globalPrompt +
|
||||
"\n" +
|
||||
AiCharacter.basePrompt +
|
||||
"\n" +
|
||||
AiCharacter.additionPrompt;
|
||||
return prompt;
|
||||
}
|
||||
|
||||
return AiCharacter
|
||||
? AiCharacter.systemInstruction
|
||||
: ConfigManager.tables.TbAiCharacters.get(10001).systemInstruction;
|
||||
/**
|
||||
* 根据角色ID获取对应的情绪机器人prompt
|
||||
* @param roleId 角色ID
|
||||
* @returns System Instruction字符串,如果未找到则返回默认Role_1
|
||||
*/
|
||||
public static getEmotionInstruction(roleId: number): string {
|
||||
const AiCharacter = ConfigManager.tables.TbAiCharacters.get(roleId);
|
||||
const globalPrompt = ConfigManager.tables.TbGlobalConfig.EmotionRating;
|
||||
const prompt = globalPrompt + "\n" + AiCharacter.basePrompt;
|
||||
return prompt;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user