26 Commits

Author SHA1 Message Date
lipeh1
681b23766f feat(rag): support local rerankers for LightRAG queries (#3009)
* feat(rag): support local rerankers for LightRAG queries

Allow administrators to select a cross-encoder alongside the native LightRAG role models. Run scoring in a reusable worker and partition cached answers by reranker so model changes take effect on existing indexes.

Refs #2701

* fix(api): refresh the router index for LightRAG settings

* fix(rag): run LightRAG reranking in the shared reranker worker

anyio's process pool re-runs the server's __main__ file by path. When the
backend runs as `python -m deeptutor_cli.main serve` (the desktop app),
that file's relative imports fail, so every rerank call failed with
'Error during worker process initialization' and LightRAG silently kept
the original chunk order. Reuse the python -m reranker worker that the
LlamaIndex pipeline already uses.

---------

Co-authored-by: lipeih <lipeihan@eazytec.com>
Co-authored-by: zszz3 <zszz3@users.noreply.github.com>
2026-11-30 18:46:49 +08:00
Bingxi Zhao
f56dfb476e Merge pull request #1599 from dxhome/codex/fix-knowledge-list-proxy
fix: knowledge base listing through proxy
2026-10-04 14:13:31 +08:00
XZH
0e260130be feat(web-source): add bilingual source pairing (#902)
Add bilingual page pairing and language variant alignment for web sources:
- Detect page language variants via hreflang alternate links and URL language prefix patterns.
- Record pairing relations in durable SQLite repository and KB web-source metadata.
- Expose pairing relations via GET /api/knowledge-bases/{kb_name}/web-source/{source_id}/pairings and WebSourceInfo.
- Display bilingual pairing indicator in the KB web sources section with localization across en, zh, de, fr, uk.
- Add targeted tests for pairing detection, repository persistence, and API exposure.

Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 14:58:51 -07:00
Bingxi Zhao (Frank)
b0385a315d feat(knowledge): choose storage and move individual bases 2026-09-27 11:04:33 +08:00
Bingxi Zhao (Frank)
64c2316093 Add connected Kiwix ZIM knowledge sources 2026-09-27 11:01:04 +08:00
dxhome
2fb4d89771 fix: knowledge base listing through proxy 2026-09-26 13:20:13 +08:00
Bingxi Zhao (Frank)
8880529c65 Merge PR batch with local follow-up fixes
Preserve precise learner KB route guards, combine UI and response language domains, carry normalized EPUB extraction, and regenerate frontend contracts.

Update locale fallback coverage for the completed Ukrainian translation bundle.
2026-09-23 12:01:14 +08:00
Bingxi Zhao (Frank)
064034a283 Merge branch 'codex/evan-backend-prs-20260923' into codex/pr-batch-root
# Conflicts:
#	deeptutor/api/routers/settings.py
#	tests/api/test_settings_router.py
#	web/components/notebook/NotebookRecordRow.tsx
#	web/components/settings/SettingsOverview.tsx
#	web/context/app-shell-storage.ts
#	web/features/knowledge/api/sources.ts
#	web/features/settings/store/SettingsStore.tsx
2026-09-23 10:56:37 +08:00
Bingxi Zhao (Frank)
2dcc5871df Reconcile linked-folder UI and book route integration 2026-09-23 10:48:46 +08:00
Bingxi Zhao (Frank)
0fa40f1c13 fix(knowledge): expose LightRAG LLM timeout in engine settings 2026-09-23 10:47:59 +08:00
Bingxi Zhao (Frank)
1dff2a2424 Merge commit 'refs/pr/1385' into codex/evan-backend-prs-20260923 2026-09-23 10:28:46 +08:00
Bingxi Zhao (Frank)
b38a2245eb Merge PR #1334 linked folder manual sync 2026-09-23 10:28:15 +08:00
Bingxi Zhao (Frank)
8534cea581 Merge PR #1372 linked folder sync controls 2026-09-23 10:27:32 +08:00
NoxsMedia
ac8cc4a97d fix: preserve selected embeddings in confirmed LightRAG rebuilds 2026-09-21 02:57:39 +00:00
Bingxi Zhao (Frank)
da856ad670 release: v1.6.9
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.

Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
2026-09-21 02:30:40 +08:00
XZH
90b99187d1 feat(web-source): add durable sync scheduling 2026-09-10 17:31:03 -07:00
XZH
2992a7e73f feat(knowledge): expose linked folder sync controls 2026-09-10 10:35:10 -07:00
Gao-Chenkai
d033272f93 feat(knowledge): add linked folder manual sync 2026-09-09 21:24:41 +08:00
NoxsMedia
7266c7aacf chore: sync PR #1265 with current dev 2026-09-07 23:33:46 +00:00
Bingxi Zhao (Frank)
e7d04fccfc fix(knowledge): validate KB names on the manager, and let a bad one be deleted
A knowledge-base name is three things at once: a kb_config.json key, a
directory under data/knowledge_bases, and a path segment in every per-KB API
route. `validate_knowledge_base_name` exists to keep those three uses
compatible — its docstring says so — but it was called from one of the eight
HTTP entry points that can write a name into the config. The seven connect-*
endpoints (Obsidian, MarginNote, folder, LightRAG server, WeKnora, IMA, and
the subagent connection) did `(name or "").strip()` and wrote the result.

A name holding a "/" registers fine that way and is then unreachable.
uvicorn percent-decodes the path before routing, so %2F is a real separator
by the time Starlette matches `{kb_name}` — compiled to `[^/]+`, which cannot
span it. All 29 per-KB routes 404, delete included, while the list endpoint
takes no path parameter and keeps rendering the KB. Connected KBs are also
exempt from the orphan prune, so nothing collects it either: visible, unusable,
and removable only by hand-editing kb_config.json.

Two changes, both needed. Validation moves onto the eight `register_*`
methods, which is the seam every route already goes through — no route file
changes, since they all map ValueError to 400 — and the now-unreachable
"name is required" guards go with it. And a path-free
`POST /knowledge-bases/delete` gives the entries that predate the guard a way
out; a body is never split into segments. Widening the path route to
`{kb_name:path}` would not work: it is declared ahead of the DELETE routes
for linked folders, GitHub sources and web sources, and a greedy converter
would silently swallow all three.

Two smaller fixes ride along. The delete handler's catch-all swallowed its
own HTTPException and answered 500 with "404: ... not found" in the detail;
it now re-raises. And CreateKbModal states the rule under the field instead
of letting an untranslated English 400 be the first the user hears of it.

test_marginnote4_kb's store-collision case used "My Lib" / "My/Lib"; the
slash is now refused before that guard is reached, so it uses "My.Lib" —
still a name the rule allows, still sanitized to the same My_Lib.db.
2026-09-08 00:31:59 +08:00
NoxsMedia
80d257d55e refactor: unify LightRAG defaults and confirmed rebuilds 2026-09-07 08:07:00 +00:00
NoxsMedia
446b3aab7e feat(lightrag): configure independent role models and pinned vision indexing 2026-09-06 09:58:42 +00:00
NoxsMedia
9cd1912c14 feat: add LightRAG indexing model controls and provenance (#1174)
* feat(knowledge): add LightRAG indexing model controls

* fix(knowledge): close NOX-21 review findings

* fix(knowledge): resolve NOX-21 review blockers

* fix(knowledge): identify unpublished LightRAG builds

* style: format LightRAG indexing changes

* fix(knowledge): align indexing controls with LightRAG model

* fix(knowledge): close indexing UI review blockers

* style: format knowledge router
2026-09-03 15:56:55 +08:00
Bingxi Zhao (Frank)
6e6e56aedb release: v1.6.3
Ship the breaking front- and back-end runtime and route refactor,
learner and guardian flows, grounded reading, knowledge and parser
updates, and recoverable long-running streams.

Release notes: assets/releases/ver1-6-3.md
2026-09-02 04:09:11 +08:00
Bingxi Zhao (Frank)
fc39543bc0 feat: integrate frontend backend and canonical routes 2026-09-01 22:24:29 +08:00
Bingxi Zhao (Frank)
cd195e977a refactor(web): split knowledge clients and engine forms 2026-09-01 18:55:55 +08:00