@n8n/n8n-nodes-langchain
Version:
49 lines (44 loc) • 1.67 kB
text/typescript
/**
* Azure AI Search Vector Store Node - Version 1.1
* Discriminator: mode=update
*/
interface Credentials {
azureAiSearchApi: CredentialReference;
}
/** Update documents in vector store by ID */
export type LcVectorStoreAzureAISearchV11UpdateParams = {
/**
* 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';
/**
* The name of the Azure AI Search index. Will be created automatically if it does not exist.
* @default n8n-vectorstore
*/
indexName?: string | Expression<string>;
/**
* ID of an embedding entry
*/
id: string | Expression<string>;
};
export interface LcVectorStoreAzureAISearchV11UpdateSubnodeConfig {
embedding: EmbeddingInstance | EmbeddingInstance[];
}
export type LcVectorStoreAzureAISearchV11UpdateNode = {
type: '@n8n/n8n-nodes-langchain.vectorStoreAzureAISearch';
version: 1.1;
config: NodeConfig<LcVectorStoreAzureAISearchV11UpdateParams> & { credentials?: Credentials } & { subnodes: LcVectorStoreAzureAISearchV11UpdateSubnodeConfig };
};