refactor: 清理冗余代码和过时配置
This commit is contained in:
@@ -13,11 +13,8 @@ from pathlib import Path
|
||||
from app.config import settings
|
||||
from app.utils import truncate_error
|
||||
from app.services.summary_utils import (
|
||||
JsonNotFoundError,
|
||||
build_prompt,
|
||||
extract_json,
|
||||
extract_pdf_text,
|
||||
write_meta_json,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -25,18 +22,6 @@ logger = logging.getLogger(__name__)
|
||||
# PDF 全文注入模式的字符上限 — 超过此阈值自动切换到 search 模式
|
||||
_PDF_MAX_CHARS = 80_000
|
||||
|
||||
# 重新导出,保持向后兼容
|
||||
__all__ = [
|
||||
"PiTimeoutError",
|
||||
"PiProcessError",
|
||||
"JsonNotFoundError",
|
||||
"call_pi",
|
||||
"write_meta_json",
|
||||
"extract_pdf_text",
|
||||
"build_prompt",
|
||||
"extract_json",
|
||||
]
|
||||
|
||||
|
||||
# ── 自定义异常 ──────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user