mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
chore: Lintfix @n8n/nodes-langchain (#16868)
This commit is contained in:
@@ -165,7 +165,7 @@ export class VectorStoreInMemory extends createVectorStoreNode<MemoryVectorStore
|
||||
this.logger,
|
||||
);
|
||||
|
||||
const memoryKey = !!name ? (name as string) : DEFAULT_MEMORY_KEY;
|
||||
const memoryKey = name ? (name as string) : DEFAULT_MEMORY_KEY;
|
||||
await vectorStoreSingleton.getVectorStore(memoryKey);
|
||||
|
||||
return memoryKey;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
|
||||
import type { Embeddings } from '@langchain/core/embeddings';
|
||||
import type { Document } from 'langchain/document';
|
||||
import {
|
||||
@@ -40,7 +39,7 @@ export class VectorStoreInMemoryInsert implements INodeType {
|
||||
],
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
|
||||
|
||||
inputs: [
|
||||
NodeConnectionTypes.Main,
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
|
||||
import type { Embeddings } from '@langchain/core/embeddings';
|
||||
import {
|
||||
NodeConnectionTypes,
|
||||
@@ -38,7 +37,7 @@ export class VectorStoreInMemoryLoad implements INodeType {
|
||||
],
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
|
||||
|
||||
inputs: [
|
||||
{
|
||||
displayName: 'Embedding',
|
||||
|
||||
@@ -254,7 +254,7 @@ export class VectorStorePGVector extends createVectorStoreNode<ExtendedPGVectorS
|
||||
{},
|
||||
) as CollectionOptions;
|
||||
|
||||
if (collectionOptions && collectionOptions.useCollection) {
|
||||
if (collectionOptions?.useCollection) {
|
||||
config.collectionName = collectionOptions.collectionName;
|
||||
config.collectionTableName = collectionOptions.collectionTableName;
|
||||
}
|
||||
@@ -296,7 +296,7 @@ export class VectorStorePGVector extends createVectorStoreNode<ExtendedPGVectorS
|
||||
{},
|
||||
) as CollectionOptions;
|
||||
|
||||
if (collectionOptions && collectionOptions.useCollection) {
|
||||
if (collectionOptions?.useCollection) {
|
||||
config.collectionName = collectionOptions.collectionName;
|
||||
config.collectionTableName = collectionOptions.collectionTableName;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,7 @@ class ExtendedQdrantVectorStore extends QdrantVectorStore {
|
||||
return await super.fromExistingCollection(embeddings, args);
|
||||
}
|
||||
|
||||
async similaritySearch(
|
||||
query: string,
|
||||
k: number,
|
||||
filter?: IDataObject,
|
||||
callbacks?: Callbacks | undefined,
|
||||
) {
|
||||
async similaritySearch(query: string, k: number, filter?: IDataObject, callbacks?: Callbacks) {
|
||||
const mergedFilter = { ...ExtendedQdrantVectorStore.defaultFilter, ...filter };
|
||||
return await super.similaritySearch(query, k, mergedFilter, callbacks);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,6 @@ export class VectorStoreSupabaseLoad implements INodeType {
|
||||
0,
|
||||
)) as Embeddings;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const client = createClient(credentials.host as string, credentials.serviceRole as string);
|
||||
const config: SupabaseLibArgs = {
|
||||
client,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/dot-notation */
|
||||
import { Document } from '@langchain/core/documents';
|
||||
import type { OpenAIEmbeddings } from '@langchain/openai';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/dot-notation */
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import type { MemoryVectorStore } from 'langchain/vectorstores/memory';
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
|
||||
import type { Embeddings } from '@langchain/core/embeddings';
|
||||
import type { VectorStore } from '@langchain/core/vectorstores';
|
||||
import { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';
|
||||
@@ -77,7 +75,7 @@ export const createVectorStoreNode = <T extends VectorStore = VectorStore>(
|
||||
},
|
||||
},
|
||||
credentials: args.meta.credentials,
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
|
||||
|
||||
inputs: `={{
|
||||
((parameters) => {
|
||||
const mode = parameters?.mode;
|
||||
|
||||
Reference in New Issue
Block a user