From 4f8abeb7fc4fb7c643faa2cc624ebe2e51ba0d19 Mon Sep 17 00:00:00 2001 From: timothycarambat <rambat1010@gmail.com> Date: Tue, 22 Aug 2023 10:30:01 -0700 Subject: [PATCH] better loggin on addDocumentToWorkspace and add Qdrant setup doc --- server/utils/vectorDbProviders/chroma/index.js | 1 + server/utils/vectorDbProviders/lance/index.js | 1 + .../utils/vectorDbProviders/pinecone/index.js | 1 + .../vectorDbProviders/qdrant/QDRANT_SETUP.md | 17 +++++++++++++++++ server/utils/vectorDbProviders/qdrant/index.js | 1 + 5 files changed, 21 insertions(+) create mode 100644 server/utils/vectorDbProviders/qdrant/QDRANT_SETUP.md diff --git a/server/utils/vectorDbProviders/chroma/index.js b/server/utils/vectorDbProviders/chroma/index.js index 4a527ac72..cff592f78 100644 --- a/server/utils/vectorDbProviders/chroma/index.js +++ b/server/utils/vectorDbProviders/chroma/index.js @@ -212,6 +212,7 @@ const Chroma = { await DocumentVectors.bulkInsert(documentVectors); return true; } catch (e) { + console.error(e); console.error("addDocumentToNamespace", e.message); return false; } diff --git a/server/utils/vectorDbProviders/lance/index.js b/server/utils/vectorDbProviders/lance/index.js index aeb33534b..23872ad79 100644 --- a/server/utils/vectorDbProviders/lance/index.js +++ b/server/utils/vectorDbProviders/lance/index.js @@ -212,6 +212,7 @@ const LanceDb = { await DocumentVectors.bulkInsert(documentVectors); return true; } catch (e) { + console.error(e); console.error("addDocumentToNamespace", e.message); return false; } diff --git a/server/utils/vectorDbProviders/pinecone/index.js b/server/utils/vectorDbProviders/pinecone/index.js index 91d97578f..8d7ae7c66 100644 --- a/server/utils/vectorDbProviders/pinecone/index.js +++ b/server/utils/vectorDbProviders/pinecone/index.js @@ -172,6 +172,7 @@ const Pinecone = { await DocumentVectors.bulkInsert(documentVectors); return true; } catch (e) { + console.error(e); console.error("addDocumentToNamespace", e.message); return false; } diff --git a/server/utils/vectorDbProviders/qdrant/QDRANT_SETUP.md b/server/utils/vectorDbProviders/qdrant/QDRANT_SETUP.md new file mode 100644 index 000000000..cba039bd3 --- /dev/null +++ b/server/utils/vectorDbProviders/qdrant/QDRANT_SETUP.md @@ -0,0 +1,17 @@ +# How to setup a local (or cloud) QDrant Vector Database + +[Get a QDrant Cloud instance](https://cloud.qdrant.io/). +[Set up QDrant locally on Docker](https://github.com/qdrant/qdrant/blob/master/QUICK_START.md). + +Fill out the variables in the "Vector Database" tab of settings. Select Qdrant as your provider and fill out the appropriate fields +with the information from either of the above steps. + +### How to get started _Development mode only_ + +After setting up either the Qdrant cloud or local dockerized instance you just need to set these variable in `.env.development` or defined them at runtime via the UI. + +``` +# VECTOR_DB="qdrant" +# QDRANT_ENDPOINT="https://<YOUR_CLOUD_INSTANCE_URL>.qdrant.io:6333" +# QDRANT_API_KEY="abc...123xyz" +``` diff --git a/server/utils/vectorDbProviders/qdrant/index.js b/server/utils/vectorDbProviders/qdrant/index.js index 0dc39e790..eb122d9d6 100644 --- a/server/utils/vectorDbProviders/qdrant/index.js +++ b/server/utils/vectorDbProviders/qdrant/index.js @@ -236,6 +236,7 @@ const QDrant = { await DocumentVectors.bulkInsert(documentVectors); return true; } catch (e) { + console.error(e); console.error("addDocumentToNamespace", e.message); return false; }