Skip to content

Commit

Permalink
refactor: Every node class should have a distinct constructor name (n…
Browse files Browse the repository at this point in the history
…o-changelog) (#11403)
  • Loading branch information
netroy authored Oct 25, 2024
1 parent 2e64464 commit 8cbe947
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const insertFields: INodeProperties[] = [
},
];

export const VectorStoreInMemory = createVectorStoreNode({
export class VectorStoreInMemory extends createVectorStoreNode({
meta: {
displayName: 'In-Memory Vector Store',
name: 'vectorStoreInMemory',
Expand Down Expand Up @@ -56,4 +56,4 @@ export const VectorStoreInMemory = createVectorStoreNode({

void vectorStoreInstance.addDocuments(`${workflowId}__${memoryKey}`, documents, clearStore);
},
});
}) {}
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class ExtendedPGVectorStore extends PGVectorStore {
}
}

export const VectorStorePGVector = createVectorStoreNode({
export class VectorStorePGVector extends createVectorStoreNode({
meta: {
description: 'Work with your data in Postgresql with the PGVector extension',
icon: 'file:postgres.svg',
Expand Down Expand Up @@ -308,4 +308,4 @@ export const VectorStorePGVector = createVectorStoreNode({

await PGVectorStore.fromDocuments(documents, embeddings, config);
},
});
}) {}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const insertFields: INodeProperties[] = [
},
];

export const VectorStorePinecone = createVectorStoreNode({
export class VectorStorePinecone extends createVectorStoreNode({
meta: {
displayName: 'Pinecone Vector Store',
name: 'vectorStorePinecone',
Expand Down Expand Up @@ -132,4 +132,4 @@ export const VectorStorePinecone = createVectorStoreNode({
pineconeIndex,
});
},
});
}) {}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const retrieveFields: INodeProperties[] = [
},
];

export const VectorStoreQdrant = createVectorStoreNode({
export class VectorStoreQdrant extends createVectorStoreNode({
meta: {
displayName: 'Qdrant Vector Store',
name: 'vectorStoreQdrant',
Expand Down Expand Up @@ -134,4 +134,4 @@ export const VectorStoreQdrant = createVectorStoreNode({

await QdrantVectorStore.fromDocuments(documents, embeddings, config);
},
});
}) {}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const retrieveFields: INodeProperties[] = [

const updateFields: INodeProperties[] = [...insertFields];

export const VectorStoreSupabase = createVectorStoreNode({
export class VectorStoreSupabase extends createVectorStoreNode({
meta: {
description: 'Work with your data in Supabase Vector Store',
icon: 'file:supabase.svg',
Expand Down Expand Up @@ -109,4 +109,4 @@ export const VectorStoreSupabase = createVectorStoreNode({
}
}
},
});
}) {}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const retrieveFields: INodeProperties[] = [
},
];

export const VectorStoreZep = createVectorStoreNode({
export class VectorStoreZep extends createVectorStoreNode({
meta: {
displayName: 'Zep Vector Store',
name: 'vectorStoreZep',
Expand Down Expand Up @@ -130,4 +130,4 @@ export const VectorStoreZep = createVectorStoreNode({
throw new NodeOperationError(context.getNode(), error as Error, { itemIndex });
}
},
});
}) {}

0 comments on commit 8cbe947

Please sign in to comment.