Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
Merge remote-tracking branch 'github_public/main'
wizardchenae58801bafd7
diff --cc .gitignoreindex 97c58d139,8de2b3cc5..45726fbe6--- a/.gitignore+++ b/.gitignore@@@ -23,12 -23,13 +23,15 @@@ node_modules# 临时文件tmp/temp/+logs/+*.pid+ # Docker compose файл (локальные настройки)+ # docker-compose.yml+WeKnora/models/- services/docreader/src/proto/__pycache__+ **/__pycache__test/data/mswag.txtdata/files/diff --cc docker/Dockerfile.appindex ec290d6e5,777ee62f2..52a444b36--- a/docker/Dockerfile.app+++ b/docker/Dockerfile.app@@@ -49,20 -49,17 +49,29 @@@ WORKDIR /ap# Install runtime dependenciesRUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories && \apk update && apk upgrade && \- apk add --no-cache build-base postgresql-client mysql-client ca-certificates tzdata sed curl bash vim wget+ apk add --no-cache build-base postgresql-client mysql-client ca-certificates tzdata sed curl bash vim wget \+ nodejs npm python3 py3-pip && \+ pip3 install --no-cache-dir pipx && \+ pipx install uvx++# Create a non-root user and switch to it+RUN mkdir -p /data/files && \+ adduser -D -g '' appuser && \+ chown -R appuser:appuser /app /data/files++# Copy migrate tool from builder stage+COPY --from=builder /go/bin/migrate /usr/local/bin/+COPY --from=builder /app/yanyiwu/ /go/pkg/mod/github.com/yanyiwu/+ # Create a non-root user and switch to it+ RUN mkdir -p /data/files && \+ adduser -D -g '' appuser && \+ chown -R appuser:appuser /app /data/files++ # Copy migrate tool from builder stage+ COPY --from=builder /go/bin/migrate /usr/local/bin/+ COPY --from=builder /app/yanyiwu/ /go/pkg/mod/github.com/yanyiwu/+# Copy the binary from the builder stageCOPY --from=builder /app/config ./configCOPY --from=builder /app/scripts ./scriptsdiff --cc frontend/package-lock.jsonindex 3f338527d,87b6c68bf..d654db37a--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@@ -33,7 -32,7 +33,7 @@@"less-loader": "^12.2.0","npm-run-all2": "^7.0.2","typescript": "~5.8.0",-- "vite": "7.0.4",++ "vite": "^7.2.2","vue-tsc": "^2.2.8"}},@@@ -1917,12 -1916,12 +1917,13 @@@"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="},"node_modules/axios": {-- "version": "1.10.0",-- "resolved": "https://mirrors.tencent.com/npm/axios/-/axios-1.10.0.tgz",-- "integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==",++ "version": "1.13.2",++ "resolved": "https://mirrors.tencent.com/npm/axios/-/axios-1.13.2.tgz",++ "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==",++ "license": "MIT","dependencies": {"follow-redirects": "^1.15.6",-- "form-data": "^4.0.0",++ "form-data": "^4.0.4","proxy-from-env": "^1.1.0"}},@@@ -2032,6 -2031,6 +2033,7 @@@"version": "1.0.8","resolved": "https://mirrors.tencent.com/npm/combined-stream/-/combined-stream-1.0.8.tgz","integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",++ "license": "MIT","dependencies": {"delayed-stream": "~1.0.0"},@@@ -2136,6 -2135,6 +2138,7 @@@"version": "1.0.0","resolved": "https://mirrors.tencent.com/npm/delayed-stream/-/delayed-stream-1.0.0.tgz","integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",++ "license": "MIT","engines": {"node": ">=0.4.0"}@@@ -2153,6 -2152,6 +2156,7 @@@"version": "1.0.1","resolved": "https://mirrors.tencent.com/npm/dunder-proto/-/dunder-proto-1.0.1.tgz","integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",++ "license": "MIT","dependencies": {"call-bind-apply-helpers": "^1.0.1","es-errors": "^1.3.0",@@@ -2208,6 -2207,6 +2212,7 @@@"version": "1.0.1","resolved": "https://mirrors.tencent.com/npm/es-define-property/-/es-define-property-1.0.1.tgz","integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",++ "license": "MIT","engines": {"node": ">= 0.4"}@@@ -2216,7 -2215,7 +2221,6 @@@"version": "1.3.0","resolved": "https://mirrors.tencent.com/npm/es-errors/-/es-errors-1.3.0.tgz","integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",-- "license": "MIT","engines": {"node": ">= 0.4"}@@@ -2241,6 -2240,6 +2245,7 @@@"version": "2.1.0","resolved": "https://mirrors.tencent.com/npm/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz","integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",++ "license": "MIT","dependencies": {"es-errors": "^1.3.0","get-intrinsic": "^1.2.6",@@@ -2377,10 -2376,10 +2382,14 @@@"license": "BSD-3-Clause"},"node_modules/fdir": {-- "version": "6.4.6",-- "resolved": "https://mirrors.tencent.com/npm/fdir/-/fdir-6.4.6.tgz",-- "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",++ "version": "6.5.0",++ "resolved": "https://mirrors.tencent.com/npm/fdir/-/fdir-6.5.0.tgz",++ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==","dev": true,++ "license": "MIT",++ "engines": {++ "node": ">=12.0.0"++ },"peerDependencies": {"picomatch": "^3 || ^4"},@@@ -2411,10 -2410,10 +2420,9 @@@}},"node_modules/form-data": {-- "version": "4.0.3",-- "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-4.0.3.tgz",-- "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==",-- "license": "MIT",++ "version": "4.0.4",++ "resolved": "https://mirrors.tencent.com/npm/form-data/-/form-data-4.0.4.tgz",++ "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==","dependencies": {"asynckit": "^0.4.0","combined-stream": "^1.0.8",@@@ -2462,6 -2461,6 +2470,7 @@@"version": "1.3.0","resolved": "https://mirrors.tencent.com/npm/get-intrinsic/-/get-intrinsic-1.3.0.tgz","integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",++ "license": "MIT","dependencies": {"call-bind-apply-helpers": "^1.0.2","es-define-property": "^1.0.1",@@@ -2485,6 -2484,6 +2494,7 @@@"version": "1.0.1","resolved": "https://mirrors.tencent.com/npm/get-proto/-/get-proto-1.0.1.tgz","integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",++ "license": "MIT","dependencies": {"dunder-proto": "^1.0.1","es-object-atoms": "^1.0.0"@@@ -2541,6 -2540,6 +2551,7 @@@"version": "1.0.2","resolved": "https://mirrors.tencent.com/npm/has-tostringtag/-/has-tostringtag-1.0.2.tgz","integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",++ "license": "MIT","dependencies": {"has-symbols": "^1.0.3"},@@@ -2555,7 -2554,7 +2566,6 @@@"version": "2.0.2","resolved": "https://mirrors.tencent.com/npm/hasown/-/hasown-2.0.2.tgz","integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",-- "license": "MIT","dependencies": {"function-bind": "^1.1.2"},@@@ -2805,6 -2804,6 +2815,7 @@@"version": "1.1.0","resolved": "https://mirrors.tencent.com/npm/math-intrinsics/-/math-intrinsics-1.1.0.tgz","integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",++ "license": "MIT","engines": {"node": ">= 0.4"}@@@ -3025,10 -3024,10 +3036,11 @@@"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="},"node_modules/picomatch": {-- "version": "4.0.2",-- "resolved": "https://mirrors.tencent.com/npm/picomatch/-/picomatch-4.0.2.tgz",-- "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",++ "version": "4.0.3",++ "resolved": "https://mirrors.tencent.com/npm/picomatch/-/picomatch-4.0.3.tgz",++ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==","dev": true,++ "license": "MIT","engines": {"node": ">=12"},@@@ -3517,14 -3508,14 +3529,14 @@@"license": "MIT"},"node_modules/tinyglobby": {-- "version": "0.2.14",-- "resolved": "https://mirrors.tencent.com/npm/tinyglobby/-/tinyglobby-0.2.14.tgz",-- "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",++ "version": "0.2.15",++ "resolved": "https://mirrors.tencent.com/npm/tinyglobby/-/tinyglobby-0.2.15.tgz",++ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==","dev": true,"license": "MIT","dependencies": {-- "fdir": "^6.4.4",-- "picomatch": "^4.0.2"++ "fdir": "^6.5.0",++ "picomatch": "^4.0.3"},"engines": {"node": ">=12.0.0"@@@ -3588,25 -3579,25 +3600,27 @@@}},"node_modules/validator": {-- "version": "13.15.15",-- "resolved": "https://mirrors.tencent.com/npm/validator/-/validator-13.15.15.tgz",-- "integrity": "sha512-BgWVbCI72aIQy937xbawcs+hrVaN/CZ2UwutgaJ36hGqRrLNM+f5LUT/YPRbo8IV/ASeFzXszezV+y2+rq3l8A==",++ "version": "13.15.23",++ "resolved": "https://mirrors.tencent.com/npm/validator/-/validator-13.15.23.tgz",++ "integrity": "sha512-4yoz1kEWqUjzi5zsPbAS/903QXSYp0UOtHsPpp7p9rHAw/W+dkInskAE386Fat3oKRROwO98d9ZB0G4cObgUyw==",++ "license": "MIT","engines": {"node": ">= 0.10"}},"node_modules/vite": {-- "version": "7.0.4",-- "resolved": "https://mirrors.tencent.com/npm/vite/-/vite-7.0.4.tgz",-- "integrity": "sha512-SkaSguuS7nnmV7mfJ8l81JGBFV7Gvzp8IzgE8A8t23+AxuNX61Q5H1Tpz5efduSN7NHC8nQXD3sKQKZAu5mNEA==",++ "version": "7.2.2",++ "resolved": "https://mirrors.tencent.com/npm/vite/-/vite-7.2.2.tgz",++ "integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==","dev": true,++ "license": "MIT","dependencies": {"esbuild": "^0.25.0",-- "fdir": "^6.4.6",-- "picomatch": "^4.0.2",++ "fdir": "^6.5.0",++ "picomatch": "^4.0.3","postcss": "^8.5.6",-- "rollup": "^4.40.0",-- "tinyglobby": "^0.2.14"++ "rollup": "^4.43.0",++ "tinyglobby": "^0.2.15"},"bin": {"vite": "bin/vite.js"diff --cc frontend/package.jsonindex 6a5a42597,c07f32e82..f4c7df64c--- a/frontend/package.json+++ b/frontend/package.json@@@ -37,7 -37,7 +37,7 @@@"less-loader": "^12.2.0","npm-run-all2": "^7.0.2","typescript": "~5.8.0",-- "vite": "7.0.4",++ "vite": "^7.2.2","vue-tsc": "^2.2.8"},"overrides": {diff --cc internal/handler/initialization.goindex 22471df3d,1904dfc75..082d52f6e--- a/internal/handler/initialization.go+++ b/internal/handler/initialization.go@@@ -23,9 -25,6 +25,7 @@@ import"github.com/Tencent/WeKnora/internal/models/utils/ollama""github.com/Tencent/WeKnora/internal/types""github.com/Tencent/WeKnora/internal/types/interfaces"+ "github.com/Tencent/WeKnora/internal/utils"- "github.com/Tencent/WeKnora/services/docreader/src/client"- "github.com/Tencent/WeKnora/services/docreader/src/proto""github.com/gin-gonic/gin""github.com/google/uuid""github.com/ollama/ollama/api"