DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.
Python ai-agentsai-tutorclawbotcli-tooldeepresearchinteractive-learninglearningmulti-agent-systemsrag
style: format integrated auth config and extraction changes
Bingxi Zhao (Frank)120368830412
diff --git a/deeptutor/api/routers/auth.py b/deeptutor/api/routers/auth.pyindex 7e19e610c..946b1df8a 100644--- a/deeptutor/api/routers/auth.py+++ b/deeptutor/api/routers/auth.py@@ -611,8 +611,7 @@ def _learning_surface_for_path(path: str, method: str = "GET") -> str:# Knowledge-center browsing is a legitimate learner activity, but KB# mutations affect shared/admin-owned resources — read-only methods only.if method.upper() in ("GET", "HEAD", "OPTIONS") and (- normalized == "/api/knowledge-bases"- or normalized.startswith("/api/knowledge-bases/")+ normalized == "/api/knowledge-bases" or normalized.startswith("/api/knowledge-bases/")):return "reading"return ""diff --git a/deeptutor/services/config/runtime_settings.py b/deeptutor/services/config/runtime_settings.pyindex 4c5e02441..03313f63e 100644--- a/deeptutor/services/config/runtime_settings.py+++ b/deeptutor/services/config/runtime_settings.py@@ -1060,9 +1060,7 @@ class RuntimeSettingsService:"entity_extract_max_gleaning": _coerce_clamped_int(settings.get("entity_extract_max_gleaning"), 1, 0, 5),- "llm_timeout": _coerce_clamped_int(- settings.get("llm_timeout"), 240, 60, 3600- ),+ "llm_timeout": _coerce_clamped_int(settings.get("llm_timeout"), 240, 60, 3600),"llm_profile_id": _string(settings.get("llm_profile_id"))[:128],"llm_model_id": _string(settings.get("llm_model_id"))[:128],}diff --git a/deeptutor/utils/document_extractor.py b/deeptutor/utils/document_extractor.pyindex 08ed244bb..b2e0a8402 100644--- a/deeptutor/utils/document_extractor.py+++ b/deeptutor/utils/document_extractor.py@@ -391,12 +391,7 @@ def _extract_pdf(data: bytes, filename: str) -> str:build_marker(pdf_images.collection.images[index]) for index in indices]pages = [- page_text- + (- "\n" + "\n".join(marker_by_page[i])- if i in marker_by_page- else ""- )+ page_text + ("\n" + "\n".join(marker_by_page[i]) if i in marker_by_page else "")for i, page_text in enumerate(pages, 1)]note = pdf_images.collection.summary_note()@@ -1394,9 +1389,7 @@ def extract_documents_from_records("base64": base64.b64encode(image.data).decode("ascii"),"filename": f"{stem}-图{image_index_from_name(image.name)}{ext}","mime_type": image.mime_type,- "id": f"{doc_id}-e{image_index_from_name(image.name):02d}"- if doc_id- else "",+ "id": f"{doc_id}-e{image_index_from_name(image.name):02d}" if doc_id else "","embedded": True,})