@n8n/n8n-nodes-langchain
Version:
65 lines (60 loc) • 2.19 kB
text/typescript
/**
* Zep Vector Store Node - Version 1.3
* Discriminator: mode=insert
*/
interface Credentials {
zepApi: CredentialReference;
}
/** Insert documents into vector store */
export type LcVectorStoreZepV13InsertParams = {
/**
* Sits on the main flow — pipe the documents you want to embed into this node. Declare with `vectorStore({...})`. Required subnodes: `embedding` and `documentLoader`. If the goal is letting an LLM query the store, use `mode: 'retrieve-as-tool'` instead.
* <patterns>
* <pattern title="insert mode — upsert documents (generic, works for any vectorStore* node)">
* // Substitute the type literal and provider-specific parameters (e.g. pineconeIndex,
* // qdrantCollection, supabaseTableName) — see the rest of this file for the exact shape.
* const store = vectorStore({
* type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',
* config: {
* name: 'Knowledge Base',
* parameters: {
* mode: 'insert',
* // ...provider-specific parameters
* },
* subnodes: { embedding: embeddingsOpenAi, documentLoader: defaultDataLoader }
* }
* });
* </pattern>
* </patterns>
*/
mode: 'insert';
collectionName: string | Expression<string>;
/**
* Number of documents to embed in a single batch
* @default 200
*/
embeddingBatchSize?: number | Expression<number>;
/**
* Options
* @default {}
*/
options?: {
/** Whether to allow using characters from the Unicode surrogate blocks
* @default 1536
*/
embeddingDimensions?: number | Expression<number>;
/** Whether to automatically embed documents when they are added
* @default true
*/
isAutoEmbedded?: boolean | Expression<boolean>;
};
};
export interface LcVectorStoreZepV13InsertSubnodeConfig {
embedding: EmbeddingInstance | EmbeddingInstance[];
documentLoader: DocumentLoaderInstance | DocumentLoaderInstance[];
}
export type LcVectorStoreZepV13InsertNode = {
type: '@n8n/n8n-nodes-langchain.vectorStoreZep';
version: 1.3;
config: NodeConfig<LcVectorStoreZepV13InsertParams> & { credentials?: Credentials } & { subnodes: LcVectorStoreZepV13InsertSubnodeConfig };
};