diff --git a/docker/.env.example b/docker/.env.example index 650fad8d..8bbdd1dd 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -1,5 +1,4 @@ SERVER_PORT=3001 -CACHE_VECTORS="true" STORAGE_DIR="/app/server/storage" UID='1000' GID='1000' diff --git a/frontend/src/components/Modals/MangeWorkspace/Documents/Directory/FileRow/index.jsx b/frontend/src/components/Modals/MangeWorkspace/Documents/Directory/FileRow/index.jsx index cd695dfc..61187f55 100644 --- a/frontend/src/components/Modals/MangeWorkspace/Documents/Directory/FileRow/index.jsx +++ b/frontend/src/components/Modals/MangeWorkspace/Documents/Directory/FileRow/index.jsx @@ -60,7 +60,7 @@ export default function FileRow({ selected ? "bg-sky-500/20" : "" } ${expanded ? "bg-sky-500/10" : ""}`}`} > -
+
-

+

{formatDate(item?.published)}

-

{getFileExtension(item.url)}

+

+ {getFileExtension(item.url)} +

{item?.cached && (
diff --git a/frontend/src/components/Modals/MangeWorkspace/Documents/Directory/index.jsx b/frontend/src/components/Modals/MangeWorkspace/Documents/Directory/index.jsx index 1dd83de9..8a140a41 100644 --- a/frontend/src/components/Modals/MangeWorkspace/Documents/Directory/index.jsx +++ b/frontend/src/components/Modals/MangeWorkspace/Documents/Directory/index.jsx @@ -71,8 +71,8 @@ export default function Directory({
-

Name

-

Date

+

Name

+

Date

Kind

Cached

diff --git a/frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/WorkspaceFileRow/index.jsx b/frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/WorkspaceFileRow/index.jsx index ceb75155..99493dba 100644 --- a/frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/WorkspaceFileRow/index.jsx +++ b/frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/WorkspaceFileRow/index.jsx @@ -54,7 +54,7 @@ export default function WorkspaceFileRow({ className={`items-center transition-all duration-200 text-white/80 text-xs grid grid-cols-12 py-2 pl-3.5 pr-8 border-b border-white/20 hover:bg-sky-500/20 cursor-pointer ${isMovedItem ? "bg-green-800/40" : ""}`} > -
+
-

+

{formatDate(item?.published)}

-

{getFileExtension(item.url)}

+

+ {getFileExtension(item.url)} +

{item?.cached && (
diff --git a/frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/index.jsx b/frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/index.jsx index e1ec21dd..12080b9b 100644 --- a/frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/index.jsx +++ b/frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/index.jsx @@ -26,8 +26,8 @@ export default function WorkspaceDirectory({
-

Name

-

Date

+

Name

+

Date

Kind

Cached

@@ -55,8 +55,8 @@ export default function WorkspaceDirectory({ }`} >
-

Name

-

Date

+

Name

+

Date

Kind

Cached

diff --git a/server/.env.example b/server/.env.example index 242eec26..a4bc9fe5 100644 --- a/server/.env.example +++ b/server/.env.example @@ -1,5 +1,4 @@ SERVER_PORT=3001 -CACHE_VECTORS="true" JWT_SECRET="my-random-string-for-seeding" # Please generate random string at least 12 chars long. ########################################### diff --git a/server/utils/files/index.js b/server/utils/files/index.js index c8622187..b6c7a307 100644 --- a/server/utils/files/index.js +++ b/server/utils/files/index.js @@ -99,8 +99,6 @@ async function viewLocalFiles() { // Searches the vector-cache folder for existing information so we dont have to re-embed a // document and can instead push directly to vector db. async function cachedVectorInformation(filename = null, checkOnly = false) { - if (!process.env.CACHE_VECTORS) - return checkOnly ? false : { exists: false, chunks: [] }; if (!filename) return checkOnly ? false : { exists: false, chunks: [] }; const digest = uuidv5(filename, uuidv5.URL); @@ -123,7 +121,6 @@ async function cachedVectorInformation(filename = null, checkOnly = false) { // vectorData: pre-chunked vectorized data for a given file that includes the proper metadata and chunk-size limit so it can be iterated and dumped into Pinecone, etc // filename is the fullpath to the doc so we can compare by filename to find cached matches. async function storeVectorResult(vectorData = [], filename = null) { - if (!process.env.CACHE_VECTORS) return; if (!filename) return; console.log( `Caching vectorized results of ${filename} to prevent duplicated embedding.` diff --git a/server/utils/helpers/updateENV.js b/server/utils/helpers/updateENV.js index e995fb63..3a8ea55d 100644 --- a/server/utils/helpers/updateENV.js +++ b/server/utils/helpers/updateENV.js @@ -314,7 +314,6 @@ async function dumpENV() { const frozenEnvs = {}; const protectedKeys = [ ...Object.values(KEY_MAPPING).map((values) => values.envKey), - "CACHE_VECTORS", "STORAGE_DIR", "SERVER_PORT", // Password Schema Keys if present.