refactor(api): TOML 配置 SSOT、统一错误契约、Auth/事务加固与可观测性 (#33)
配置 SSOT(TOML + .env) 统一错误契约 Auth 与事务边界 Redis / Celery 可靠性:业务 Redis(DB/0)与 Celery broker/backend(DB/1)显式拆分;连接池、sync client 可观测性(OpenTelemetry + LGTM)
This commit is contained in:
@@ -29,6 +29,7 @@ from app.core.agent_logging import agent_span, agent_summary_enabled, log_agent_
|
||||
from app.core.config import settings
|
||||
from app.core.logging import get_logger
|
||||
from app.features.conversation.models import Segment
|
||||
from app.features.memoir.constants import memoir
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
@@ -90,7 +91,7 @@ class MemoirOrchestrator:
|
||||
use_batch = (
|
||||
bool(segments)
|
||||
and classify_extract_llm is not None
|
||||
and settings.memoir_phase1_batch_llm_enabled
|
||||
and memoir.phase1_batch_llm_enabled
|
||||
)
|
||||
if use_batch:
|
||||
try:
|
||||
@@ -204,7 +205,7 @@ class MemoirOrchestrator:
|
||||
segments,
|
||||
state,
|
||||
classify_extract_llm,
|
||||
chunk_size=int(settings.memoir_phase1_batch_llm_chunk_size),
|
||||
chunk_size=int(memoir.phase1_batch_llm_chunk_size),
|
||||
on_chunk=on_phase1_chunk,
|
||||
language=language,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user