diff options
| author | bobzel <zzzman@gmail.com> | 2025-02-10 19:07:20 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-02-10 19:07:20 -0500 |
| commit | c9686eaebffb3547b7e0f20aec64754627af76ce (patch) | |
| tree | 7ebf1c38323a8d7af554ba564acf95cfe79b7709 /src/client/views/nodes/chatbot/vectorstore | |
| parent | b72d018698ad1d2e713f0fcbef392d23bf1cf545 (diff) | |
| parent | e93ca53af693fa1ec2186ca9417af122bb5e8e09 (diff) | |
updated from master
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(); |
