完成请求推送,但组装mes还有问题

This commit is contained in:
2026-05-04 00:33:29 +08:00
parent 7fc9e10c99
commit 2050a30a52
93 changed files with 9499 additions and 2719 deletions

View File

@@ -57,7 +57,7 @@ class ChatService:
logger.error(f"处理角色目录 {role_dir.name} 时出错: {str(e)}")
continue
return {"chat": [{"role_name": role, **chat} for role, chats in result.items() for chat in chats]}
return result
def _get_chat_summary(self, role_name: str, chat_name: str) -> Optional[Dict]:
"""
@@ -197,7 +197,8 @@ class ChatService:
tags = []
try:
character_file = Path("data/characters") / role_name / "character.json"
from backend.core.config import settings
character_file = settings.CHARACTERS_PATH / role_name / "character.json"
if character_file.exists():
with open(character_file, 'r', encoding='utf-8') as f:
character_data = json.load(f)