mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat: Update Pinecone Vector Store node to support serverless environments (#8849)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -124,7 +124,13 @@ export const VectorStorePinecone = createVectorStoreNode({
|
||||
const pineconeIndex = client.Index(index);
|
||||
|
||||
if (options.pineconeNamespace && options.clearNamespace) {
|
||||
await pineconeIndex.namespace(options.pineconeNamespace).deleteAll();
|
||||
const namespace = pineconeIndex.namespace(options.pineconeNamespace);
|
||||
try {
|
||||
await namespace.deleteAll();
|
||||
} catch (error) {
|
||||
// Namespace doesn't exist yet
|
||||
context.logger.info(`Namespace ${options.pineconeNamespace} does not exist yet`);
|
||||
}
|
||||
}
|
||||
|
||||
await PineconeStore.fromDocuments(documents, embeddings, {
|
||||
|
||||
Reference in New Issue
Block a user