diff --git a/CoreRAG/Massage_10216/kv_store_llm_response_cache.json b/CoreRAG/Massage_10216/kv_store_llm_response_cache.json index e631795..cd68b8b 100644 --- a/CoreRAG/Massage_10216/kv_store_llm_response_cache.json +++ b/CoreRAG/Massage_10216/kv_store_llm_response_cache.json @@ -128,5 +128,16 @@ "embedding_max": null, "original_prompt": "我的大腿有些酸痛,请给出一些分布于腿的重点按摩穴位。在回答的最后,将重点穴位罗列为方便python脚本读取的list形式['XX穴','XX穴', ...]" } + }, + "naive": { + "9cd9187dfd3550dc4cc70bc2ca314615": { + "return": "### 针对肩部不适的按摩穴位建议\n\n肩部不适通常是由于肌肉紧张、劳损或血液循环不良引起的。按摩相关穴位可以帮助放松肌肉、缓解疼痛、促进气血流通。以下是一些分布于肩部区域的重点穴位,每个穴位都位于肩部或肩胛骨周围,便于自我按摩。按摩时,建议用拇指或食指以适中的力度(以感到轻微酸胀感为宜)按压或揉按每个穴位2-3分钟,每天重复2-3次。避免用力过猛,以免损伤组织;如果疼痛持续或加重,请及时就医。\n\n#### 重点穴位列表(附位置和按摩方法):\n1. **肩井穴 (Jianjing)** \n - **位置**:在肩部,大椎穴(第七颈椎棘突下)与肩峰(肩部最高点)连线的中点。 \n - **作用**:缓解肩颈酸痛、僵硬,改善肩部血液循环。 \n - **按摩方法**:用拇指垂直按压,或画小圈揉按。\n\n2. **肩髃穴 (Jianyu)** \n - **位置**:在肩部三角肌上,当手臂外展或向前平伸时,肩峰前下方的凹陷处。 \n - **作用**:舒缓肩臂疼痛、肩周炎,减轻运动后的疲劳。 \n - **按摩方法**:用食指指腹按压,配合手臂轻微活动以增强效果。\n\n3. **肩髎穴 (Jianliao)** \n - **位置**:在肩部,肩髃穴后方,当手臂外展时,肩峰后下方的凹陷处。 \n - **作用**:针对肩关节周围疼痛,改善肩部活动受限。 \n - **按摩方法**:用拇指按压,可向肩胛骨方向推揉。\n\n4. **天宗穴 (Tianzong)** \n - **位置**:在肩胛骨冈下窝中央凹陷处,约在肩胛骨中点下方。 \n - **作用**:缓解肩背疼痛、僵硬,尤其适合久坐或伏案工作后的不适。 \n - **按摩方法**:坐姿时,用对侧手的拇指深压,或借助按摩工具滚动。\n\n5. **曲垣穴 (Quyuan)** \n - **位置**:在肩胛骨冈上窝内侧端,约在肩胛骨内侧缘上方。 \n - **作用**:减轻肩胛区酸痛,改善肩部柔韧性。 \n - **按摩方法**:用指尖按压,配合深呼吸以放松。\n\n6. **秉风穴 (Bingfeng)** \n - **位置**:在肩胛骨冈上窝中点,约在肩胛冈上方中央。 \n - **作用**:缓解肩背疲劳和酸痛,促进气血运行。 \n - **按摩方法**:用拇指或肘部轻柔按压,可结合热敷。\n\n7. **巨骨穴 (Jugu)** \n - **位置**:在肩上部,锁骨肩峰端与肩胛冈之间的凹陷处。 \n - **作用**:舒缓肩臂疼痛和紧张,尤其适合肩峰区域的劳损。 \n - **按摩方法**:用食指和中指并拢按压,力度适中。\n\n#### 按摩小贴士:\n- **最佳时间**:工作后或睡前按摩,效果更佳。\n- **增强效果**:按摩前可热敷肩部5分钟(如用热毛巾),以放松肌肉。\n- **注意事项**:孕妇、皮肤损伤或炎症者慎用;如果按摩后不适无改善,建议咨询专业医师。\n\n### 方便Python脚本读取的穴位列表\n以下是上述重点穴位的名称,以Python列表形式呈现,便于您直接复制到脚本中使用(例如用于生成提醒或数据分析):\n```python\n['肩井穴', '肩髃穴', '肩髎穴', '天宗穴', '曲垣穴', '秉风穴', '巨骨穴']\n```\n您可以在Python中直接使用这个列表,例如:\n```python\nshoulder_acupoints = ['肩井穴', '肩髃穴', '肩髎穴', '天宗穴', '曲垣穴', '秉风穴', '巨骨穴']\nprint(\"建议按摩穴位:\", shoulder_acupoints)\n```\n这样就能轻松集成到您的自动化脚本中。希望您的肩部不适早日缓解!", + "cache_type": "query", + "embedding": null, + "embedding_shape": null, + "embedding_min": null, + "embedding_max": null, + "original_prompt": "我昨天工作完肩部有点不舒服,请给出一些分布于肩部的重点按摩穴位。在回答的最后,将重点穴位罗列为方便python脚本读取的list形式['XX穴','XX穴', ...]" + } } } \ No newline at end of file diff --git a/CoreRAG/__pycache__/MassageAcupointRAG.cpython-39.pyc b/CoreRAG/__pycache__/MassageAcupointRAG.cpython-39.pyc new file mode 100644 index 0000000..f69b433 Binary files /dev/null and b/CoreRAG/__pycache__/MassageAcupointRAG.cpython-39.pyc differ diff --git a/CoreRAG/__pycache__/custom_rag_processor.cpython-39.pyc b/CoreRAG/__pycache__/custom_rag_processor.cpython-39.pyc new file mode 100644 index 0000000..bcd780b Binary files /dev/null and b/CoreRAG/__pycache__/custom_rag_processor.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/__pycache__/__init__.cpython-39.pyc b/CoreRAG/lightrag/__pycache__/__init__.cpython-39.pyc index 1056e46..6ed2acb 100644 Binary files a/CoreRAG/lightrag/__pycache__/__init__.cpython-39.pyc and b/CoreRAG/lightrag/__pycache__/__init__.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/__pycache__/base.cpython-39.pyc b/CoreRAG/lightrag/__pycache__/base.cpython-39.pyc index 057ea67..ecc0089 100644 Binary files a/CoreRAG/lightrag/__pycache__/base.cpython-39.pyc and b/CoreRAG/lightrag/__pycache__/base.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/__pycache__/constants.cpython-39.pyc b/CoreRAG/lightrag/__pycache__/constants.cpython-39.pyc index 80d0f3f..e3056dd 100644 Binary files a/CoreRAG/lightrag/__pycache__/constants.cpython-39.pyc and b/CoreRAG/lightrag/__pycache__/constants.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/__pycache__/lightrag.cpython-39.pyc b/CoreRAG/lightrag/__pycache__/lightrag.cpython-39.pyc index a186db6..d297232 100644 Binary files a/CoreRAG/lightrag/__pycache__/lightrag.cpython-39.pyc and b/CoreRAG/lightrag/__pycache__/lightrag.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/__pycache__/namespace.cpython-39.pyc b/CoreRAG/lightrag/__pycache__/namespace.cpython-39.pyc index c7427ed..a7b9094 100644 Binary files a/CoreRAG/lightrag/__pycache__/namespace.cpython-39.pyc and b/CoreRAG/lightrag/__pycache__/namespace.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/__pycache__/operate.cpython-39.pyc b/CoreRAG/lightrag/__pycache__/operate.cpython-39.pyc index c17b75d..7a785ba 100644 Binary files a/CoreRAG/lightrag/__pycache__/operate.cpython-39.pyc and b/CoreRAG/lightrag/__pycache__/operate.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/__pycache__/prompt.cpython-39.pyc b/CoreRAG/lightrag/__pycache__/prompt.cpython-39.pyc index 5f98483..97dfbea 100644 Binary files a/CoreRAG/lightrag/__pycache__/prompt.cpython-39.pyc and b/CoreRAG/lightrag/__pycache__/prompt.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/__pycache__/types.cpython-39.pyc b/CoreRAG/lightrag/__pycache__/types.cpython-39.pyc index 77f4d9e..f08c356 100644 Binary files a/CoreRAG/lightrag/__pycache__/types.cpython-39.pyc and b/CoreRAG/lightrag/__pycache__/types.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/__pycache__/utils.cpython-39.pyc b/CoreRAG/lightrag/__pycache__/utils.cpython-39.pyc index 992141f..bfc514b 100644 Binary files a/CoreRAG/lightrag/__pycache__/utils.cpython-39.pyc and b/CoreRAG/lightrag/__pycache__/utils.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/kg/__pycache__/__init__.cpython-39.pyc b/CoreRAG/lightrag/kg/__pycache__/__init__.cpython-39.pyc index ad4f14e..344e641 100644 Binary files a/CoreRAG/lightrag/kg/__pycache__/__init__.cpython-39.pyc and b/CoreRAG/lightrag/kg/__pycache__/__init__.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/kg/__pycache__/json_doc_status_impl.cpython-39.pyc b/CoreRAG/lightrag/kg/__pycache__/json_doc_status_impl.cpython-39.pyc new file mode 100644 index 0000000..3b29fef Binary files /dev/null and b/CoreRAG/lightrag/kg/__pycache__/json_doc_status_impl.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/kg/__pycache__/json_kv_impl.cpython-39.pyc b/CoreRAG/lightrag/kg/__pycache__/json_kv_impl.cpython-39.pyc index 218631d..3b40dc6 100644 Binary files a/CoreRAG/lightrag/kg/__pycache__/json_kv_impl.cpython-39.pyc and b/CoreRAG/lightrag/kg/__pycache__/json_kv_impl.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/kg/__pycache__/nano_vector_db_impl.cpython-39.pyc b/CoreRAG/lightrag/kg/__pycache__/nano_vector_db_impl.cpython-39.pyc new file mode 100644 index 0000000..035209d Binary files /dev/null and b/CoreRAG/lightrag/kg/__pycache__/nano_vector_db_impl.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/kg/__pycache__/networkx_impl.cpython-39.pyc b/CoreRAG/lightrag/kg/__pycache__/networkx_impl.cpython-39.pyc new file mode 100644 index 0000000..c36d598 Binary files /dev/null and b/CoreRAG/lightrag/kg/__pycache__/networkx_impl.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/kg/__pycache__/shared_storage.cpython-39.pyc b/CoreRAG/lightrag/kg/__pycache__/shared_storage.cpython-39.pyc index 5830a48..c1afa98 100644 Binary files a/CoreRAG/lightrag/kg/__pycache__/shared_storage.cpython-39.pyc and b/CoreRAG/lightrag/kg/__pycache__/shared_storage.cpython-39.pyc differ diff --git a/CoreRAG/lightrag/kg/json_doc_status_impl.py b/CoreRAG/lightrag/kg/json_doc_status_impl.py index f8387ad..aede8e4 100644 --- a/CoreRAG/lightrag/kg/json_doc_status_impl.py +++ b/CoreRAG/lightrag/kg/json_doc_status_impl.py @@ -2,12 +2,12 @@ from dataclasses import dataclass import os from typing import Any, Union, final -from lightrag.base import ( +from ..base import ( DocProcessingStatus, DocStatus, DocStatusStorage, ) -from lightrag.utils import ( +from ..utils import ( load_json, logger, write_json, diff --git a/CoreRAG/lightrag/kg/nano_vector_db_impl.py b/CoreRAG/lightrag/kg/nano_vector_db_impl.py index 7ee4d49..1f099a8 100644 --- a/CoreRAG/lightrag/kg/nano_vector_db_impl.py +++ b/CoreRAG/lightrag/kg/nano_vector_db_impl.py @@ -1,10 +1,9 @@ import asyncio import os -from typing import Any, final +from typing import Any, final, List,Dict,Tuple,Union from dataclasses import dataclass import numpy as np import time - from ..utils import ( logger, compute_mdhash_id, @@ -77,7 +76,7 @@ class NanoVectorDBStorage(BaseVectorStorage): return self._client - async def upsert(self, data: dict[str, dict[str, Any]]) -> None: + async def upsert(self, data: Dict[str, Dict[str, Any]]) -> None: """ Importance notes: 1. Changes will be persisted to disk during the next index_done_callback @@ -122,8 +121,8 @@ class NanoVectorDBStorage(BaseVectorStorage): ) async def query( - self, query: str, top_k: int, ids: list[str] | None = None - ) -> list[dict[str, Any]]: + self, query: str, top_k: int, ids: Union[List[str],None]= None + ) -> List[Dict[str, Any]]: # Execute embedding outside of lock to avoid improve cocurrent embedding = await self.embedding_func( [query], _priority=5 @@ -259,7 +258,7 @@ class NanoVectorDBStorage(BaseVectorStorage): return True # Return success - async def get_by_id(self, id: str) -> dict[str, Any] | None: + async def get_by_id(self, id: str) -> Union[Dict[str, Any],None]: """Get vector data by its ID Args: @@ -279,7 +278,7 @@ class NanoVectorDBStorage(BaseVectorStorage): } return None - async def get_by_ids(self, ids: list[str]) -> list[dict[str, Any]]: + async def get_by_ids(self, ids: List[str]) -> List[Dict[str, Any]]: """Get multiple vector data by their IDs Args: @@ -302,7 +301,7 @@ class NanoVectorDBStorage(BaseVectorStorage): for dp in results ] - async def drop(self) -> dict[str, str]: + async def drop(self) -> Dict[str, str]: """Drop all vector data from storage and clean up resources This method will: diff --git a/saved_projects/massage_project_1751270415.json b/saved_projects/massage_project_1751270415.json new file mode 100644 index 0000000..bfedd43 --- /dev/null +++ b/saved_projects/massage_project_1751270415.json @@ -0,0 +1,82 @@ +{ + "shoulder-thermotherapy-1751270415": { + "body_part": "shoulder", + "can_delete": true, + "choose_task": "thermotherapy", + "introduction": "shoulder-AI诊断理疗方案", + "task_plan": [ + { + "start_point": "秉风左", + "end_point": "附分左", + "time": null, + "path": "line" + }, + { + "start_point": "附分左", + "end_point": "魄户左", + "time": null, + "path": "line" + }, + { + "start_point": "魄户左", + "end_point": "天宗左", + "time": null, + "path": "line" + }, + { + "start_point": "天宗左", + "end_point": "魄户左", + "time": null, + "path": "line" + }, + { + "start_point": "魄户左", + "end_point": "附分左", + "time": null, + "path": "line" + }, + { + "start_point": "附分左", + "end_point": "曲垣左", + "time": null, + "path": "line" + }, + { + "start_point": "秉风右", + "end_point": "附分右", + "time": null, + "path": "line" + }, + { + "start_point": "附分右", + "end_point": "魄户右", + "time": null, + "path": "line" + }, + { + "start_point": "魄户右", + "end_point": "天宗右", + "time": null, + "path": "line" + }, + { + "start_point": "天宗右", + "end_point": "魄户右", + "time": null, + "path": "line" + }, + { + "start_point": "魄户右", + "end_point": "附分右", + "time": null, + "path": "line" + }, + { + "start_point": "附分右", + "end_point": "曲垣右", + "time": null, + "path": "line" + } + ] + } +} \ No newline at end of file diff --git a/scripts/__pycache__/APF_global_demo.cpython-39.pyc b/scripts/__pycache__/APF_global_demo.cpython-39.pyc new file mode 100644 index 0000000..a947dfa Binary files /dev/null and b/scripts/__pycache__/APF_global_demo.cpython-39.pyc differ diff --git a/scripts/__pycache__/planner.cpython-39.pyc b/scripts/__pycache__/planner.cpython-39.pyc new file mode 100644 index 0000000..7cd187c Binary files /dev/null and b/scripts/__pycache__/planner.cpython-39.pyc differ diff --git a/scripts/__pycache__/sorter.cpython-39.pyc b/scripts/__pycache__/sorter.cpython-39.pyc new file mode 100644 index 0000000..43bd73a Binary files /dev/null and b/scripts/__pycache__/sorter.cpython-39.pyc differ