Merge branch 'ji' into master

# Conflicts:
#	offline-backend-20260512/backend/CLAUDE.md
#	offline-backend-20260512/backend/README.md
#	offline-backend-20260512/backend/app/gateway/routers/llmwiki.py
#	offline-backend-20260512/backend/config.yaml
#	offline-backend-20260512/backend/packages/harness/deerflow/config/llmwiki_config.py
#	offline-backend-20260512/backend/tests/test_llmwiki_weknora.py
This commit is contained in:
吉鑫升 committed 2026-08-26 15:46:58 +08:00
commit 9b904ac3dd
29 files changed
+757 -128

No files matched your search

+19 -1
View File
@@ -839,7 +839,10 @@ URLs. Public images use the published file proxy directly; private images first
obtain a 24-hour signed capability and then load through
`GET /api/public/llmwiki/files/{token}` with a real HTTP URL and inline
filename, allowing zoom, new-tab viewing, and browser Save As without exposing
the user's bearer token.
the user's bearer token. The embedded WeKnora detail page follows the same
rule: late `img[data-protected-src]` placeholders keep their scoped HTTP proxy
URL on the DOM node, so WeKnora's click-to-enlarge viewer never receives an
already-revoked `blob:` URL.
## Leaderboard query and schema startup safety
@@ -896,6 +899,21 @@ Authenticated operations are available below `/api/llmwiki/wiki-index` and
`/api/external/llmwiki/wiki` require `X-API-Key`, are rate-limited, and only
expose mappings that are both internally published and explicitly marked
`external_search_enabled`; the system `对话沉淀` mapping is always denied.
A separate browser-friendly endpoint, `POST /api/knowledge/vector-search`, is
fully anonymous: it requires neither a DeerFlow token nor `X-API-Key`, has no
rate limit, and responds with `Access-Control-Allow-Origin: *`. It searches the
local vectors of every published knowledge base regardless of
`external_search_enabled`, while still excluding the system `对话沉淀` base.
The minimal request is `{"query":"如何部署"}`; optional fields are `top_k`
(default `10`, maximum `100`) and `include_page_content` (default `false`). Each
matched vector section is returned as its own ranked result, including the
matched text, score, DeerFlow and WeKnora knowledge/Wiki ids, page metadata,
raw source/chunk references, best-effort document/chunk ids, and a directly
usable `wiki_url`. Set `llmwiki.local_wiki_index.frontend_base_url` to the
deployed frontend origin/base path; its development default is
`http://127.0.0.1:5174`.
See `docs/LLMWIKI_DEERFLOW_LOCAL_VECTOR_INDEX_ZH.md` for configuration,
security boundaries, rollout, and API contracts.