aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/vectorstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/chatbot/vectorstore')
-rw-r--r--src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts b/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts
index 9575277f7..f96f55997 100644
--- a/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts
+++ b/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts
@@ -1,3 +1,10 @@
+/**
+ * @file Vectorstore.ts
+ * @description This file defines the Vectorstore class, which integrates with Pinecone for vector-based document indexing and Cohere for text embeddings.
+ * It handles tasks such as AI document management, document chunking, and retrieval of relevant document sections based on user queries.
+ * The class supports adding documents to the vectorstore, managing document status, and querying Pinecone for document chunks matching a query.
+ */
+
import { Index, IndexList, Pinecone, PineconeRecord, QueryResponse, RecordMetadata } from '@pinecone-database/pinecone';
import { CohereClient } from 'cohere-ai';
import { EmbedResponse } from 'cohere-ai/api';
@@ -128,7 +135,8 @@ export class Vectorstore {
}
}
if (!result) {
- throw new Error('no result received...'); // bcz: is this an Error?
+ console.error('Error processing document.');
+ return;
}
// Once completed, process the document and add it to the vectorstore.