diff options
| author | A.J. Shulman <Shulman.aj@gmail.com> | 2024-10-10 11:39:19 -0400 |
|---|---|---|
| committer | A.J. Shulman <Shulman.aj@gmail.com> | 2024-10-10 11:39:19 -0400 |
| commit | d347fc59feefd91a796012892da57511787bb6d0 (patch) | |
| tree | 83b8950ade694a795a38fd2969d50978c1179b83 /src/client/views/nodes/chatbot/vectorstore | |
| parent | 75b98f184260567c0dabb54dd8ef22a8e2510512 (diff) | |
added new file header comments and fixed some error handling
Diffstat (limited to 'src/client/views/nodes/chatbot/vectorstore')
| -rw-r--r-- | src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts | 10 |
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. |
