修复一次

This commit is contained in:
wsb1224 2026-07-25 14:13:38 +08:00
parent dbe2f9202d
commit 36f08f93e0
5 changed files with 21 additions and 3 deletions

View File

@ -0,0 +1,9 @@
{
"_data": {},
"_meta": {
"cacheVersion": 3,
"originalFile": "5429f024_计划书(1).pdf",
"extractedAt": "2026-07-24T12:50:28.325762",
"fileHash": "159aa3c49aebe185a3dc2af7f0b50e335f9a8e00a6998d84a7a259eb754ed4cd"
}
}

View File

@ -0,0 +1,9 @@
{
"_data": {},
"_meta": {
"cacheVersion": 3,
"originalFile": "372e0293_MLS_SIUL3_F-48-N-CN-USD-S3m-10x_coi__SC_.pdf",
"extractedAt": "2026-07-24T12:54:05.604558",
"fileHash": "60e9e349a2169511dd85ce7fecc3c1bc9ab69a7c9f254a03ca75a29625f5e9d4"
}
}

Binary file not shown.

View File

@ -194,7 +194,7 @@ class ExtractionOrchestrator:
self.use_cache = use_cache
self.cache_dir = cache_dir
async def extract_plan(self, pdf_path: str, plan_type: str = "savings") -> ExtractionResult:
async def extract_plan(self, pdf_path: str, plan_type: str = "savings", force_reparse: bool = False) -> ExtractionResult:
"""从 PDF 提取结构化数据。"""
from insurance.ppt.llm_client import llm_client
from insurance.ppt.prompts import (
@ -213,7 +213,7 @@ class ExtractionOrchestrator:
)
# 检查缓存
if self.use_cache:
if self.use_cache and not force_reparse:
cached = self._load_from_cache(abs_path)
if cached:
cached.duration_ms = (time.time() - start) * 1000

View File

@ -135,7 +135,7 @@ def parse_session(session_id):
filepath = file_info.get("path", "")
plan_type = file_info.get("type", "savings")
try:
result = asyncio.run(orchestrator.extract_plan(filepath, plan_type))
result = asyncio.run(orchestrator.extract_plan(filepath, plan_type, force_reparse=True))
extractions.append({
"pdfName": file_info.get("name", ""),
"pdfPath": filepath,