From c93bcb86781cef5414feb4d9b8d1f9af49083410 Mon Sep 17 00:00:00 2001 From: lixinyue <2569494688@qq.com> Date: Wed, 21 Jan 2026 11:27:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=AD=E7=BF=BB=E8=8B=B1?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=88=E8=AE=B0=E5=BF=86=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=BA=BF=EF=BC=89(=E7=94=A8=E6=88=B7=E6=91=98=E8=A6=81)(?= =?UTF-8?q?=E5=85=B4=E8=B6=A3=E5=88=86=E5=B8=83=E6=8E=A5=E5=8F=A3)(?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=A0=B8=E5=BF=83=E6=A1=A3=E6=A1=88)(?= =?UTF-8?q?=E8=AE=B0=E5=BF=86=E6=B4=9E=E5=AF=9F)-=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BF=BB=E8=AF=91=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/controllers/user_memory_controllers.py | 2 +- .../memory_entity_relationship_service.py | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/api/app/controllers/user_memory_controllers.py b/api/app/controllers/user_memory_controllers.py index 8ff9c41d..d99eb47e 100644 --- a/api/app/controllers/user_memory_controllers.py +++ b/api/app/controllers/user_memory_controllers.py @@ -419,7 +419,7 @@ async def update_end_user_profile( return fail(BizCode.INTERNAL_ERROR, "用户信息更新失败", str(e)) @router.get("/memory_space/timeline_memories", response_model=ApiResponse) -async def memory_space_timeline_of_shared_memories(id: str, label: str,language_type: str, +async def memory_space_timeline_of_shared_memories(id: str, label: str,language_type: str="zh", current_user: User = Depends(get_current_user), db: Session = Depends(get_db), ): diff --git a/api/app/services/memory_entity_relationship_service.py b/api/app/services/memory_entity_relationship_service.py index 06c1616d..9b5f3c99 100644 --- a/api/app/services/memory_entity_relationship_service.py +++ b/api/app/services/memory_entity_relationship_service.py @@ -132,20 +132,7 @@ class MemoryEntityService: all_timeline_data = self._merge_same_text_items(all_timeline_data) # 如果需要翻译(非中文),对整个结果进行翻译 - if language_type != 'zh': - # 定义需要翻译的字段 - fields_to_translate = ['text', 'type'] - - # 翻译各个列表 - if memory_summary_list: - memory_summary_list = await self._translate_list(memory_summary_list, model_id, fields_to_translate) - if statement_list: - statement_list = await self._translate_list(statement_list, model_id, fields_to_translate) - if extracted_entity_list: - extracted_entity_list = await self._translate_list(extracted_entity_list, model_id, fields_to_translate) - if all_timeline_data: - all_timeline_data = await self._translate_list(all_timeline_data, model_id, fields_to_translate) - + result = { "MemorySummary": memory_summary_list, "Statement": statement_list,