diff options
Diffstat (limited to 'src/client/views/nodes/chatbot/vectorstore')
| -rw-r--r-- | src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts b/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts index 5334f7df0..ef24e59bc 100644 --- a/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts +++ b/src/client/views/nodes/chatbot/vectorstore/Vectorstore.ts @@ -9,13 +9,12 @@ import { Index, IndexList, Pinecone, PineconeRecord, QueryResponse, RecordMetada import { CohereClient } from 'cohere-ai'; import { EmbedResponse } from 'cohere-ai/api'; import dotenv from 'dotenv'; +import path from 'path'; +import { v4 as uuidv4 } from 'uuid'; import { Doc } from '../../../../../fields/Doc'; -import { AudioCast, Cast, CsvCast, DocCast, PDFCast, StrCast, VideoCast } from '../../../../../fields/Types'; +import { AudioCast, CsvCast, PDFCast, StrCast, VideoCast } from '../../../../../fields/Types'; import { Networking } from '../../../../Network'; import { AI_Document, CHUNK_TYPE, RAGChunk } from '../types/types'; -import path from 'path'; -import { v4 as uuidv4 } from 'uuid'; -import { indexes } from 'd3'; dotenv.config(); @@ -40,14 +39,14 @@ export class Vectorstore { * @param doc_ids A function that returns a list of document IDs. */ constructor(id: string, doc_ids: () => string[]) { - const pineconeApiKey = process.env.PINECONE_API_KEY; + const pineconeApiKey = '51738e9a-bea2-4c11-b6bf-48a825e774dc'; if (!pineconeApiKey) { throw new Error('PINECONE_API_KEY is not defined.'); } // Initialize Pinecone and Cohere clients with API keys from the environment. this.pinecone = new Pinecone({ apiKey: pineconeApiKey }); - this.cohere = new CohereClient({ token: process.env.COHERE_API_KEY }); + // this.cohere = new CohereClient({ token: process.env.COHERE_API_KEY }); this._id = id; this._doc_ids = doc_ids; this.initializeIndex(); |
