@n8n/n8n-nodes-langchain
Version:
55 lines (50 loc) • 1.74 kB
text/typescript
/**
* Supabase Vector Store Node - Version 1.2
* Discriminator: mode=update
*/
interface Credentials {
supabaseApi: CredentialReference;
}
/** Update documents in vector store by ID */
export type LcVectorStoreSupabaseV12UpdateParams = {
/**
* Updates a single document by `id`. Declare with `vectorStore({...})`. Required subnodes: `embedding`. Only available on stores whose `operationModes` enables it — most providers omit this mode.
* <patterns>
* <pattern title="update mode — update document by ID (generic)">
* // Substitute the type literal and provider-specific parameters — see the rest of this file.
* const store = vectorStore({
* type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',
* config: {
* name: 'Knowledge Base',
* parameters: { mode: 'update', id: expr('{{ $json.docId }}') },
* subnodes: { embedding: embeddingsOpenAi }
* }
* });
* </pattern>
* </patterns>
*/
mode: 'update';
tableName?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
* ID of an embedding entry
*/
id: string | Expression<string>;
/**
* Options
* @default {}
*/
options?: {
/** Name of the query to use for matching documents
* @default match_documents
*/
queryName?: string | Expression<string>;
};
};
export interface LcVectorStoreSupabaseV12UpdateSubnodeConfig {
embedding: EmbeddingInstance | EmbeddingInstance[];
}
export type LcVectorStoreSupabaseV12UpdateNode = {
type: '@n8n/n8n-nodes-langchain.vectorStoreSupabase';
version: 1.2;
config: NodeConfig<LcVectorStoreSupabaseV12UpdateParams> & { credentials?: Credentials } & { subnodes: LcVectorStoreSupabaseV12UpdateSubnodeConfig };
};