fix: Update type hints to use newer Python syntax

- Replace Dict, List, Optional with dict, list,  < /dev/null |  None syntax
- Fix abstract method implementation in message.py
- Improve type annotations and function return types
- Remove unreachable code in get_current_task_tool.py
- Refactor HTML elements to use style attributes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
晴猫
2025-05-01 06:55:05 +09:00
parent 3d001da30e
commit 263e8d196a
29 changed files with 125 additions and 143 deletions

View File

@@ -8,7 +8,6 @@ import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from typing import Dict, List
from src.plugins.knowledge.src.lpmmconfig import PG_NAMESPACE, global_config
from src.plugins.knowledge.src.embedding_store import EmbeddingManager
@@ -26,8 +25,8 @@ logger = get_module_logger("LPMM知识库-OpenIE导入")
def hash_deduplicate(
raw_paragraphs: Dict[str, str],
triple_list_data: Dict[str, List[List[str]]],
raw_paragraphs: dict[str, str],
triple_list_data: dict[str, list[list[str]]],
stored_pg_hashes: set,
stored_paragraph_hashes: set,
):
@@ -126,7 +125,7 @@ def main():
)
# 初始化Embedding库
embed_manager = embed_manager = EmbeddingManager(llm_client_list[global_config["embedding"]["provider"]])
embed_manager = EmbeddingManager(llm_client_list[global_config["embedding"]["provider"]])
logger.info("正在从文件加载Embedding库")
try:
embed_manager.load_from_file()