refactor(core): Allow custom types on getCredentials (no-changelog) (#10567)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-08-27 15:23:58 +02:00
committed by GitHub
parent 52c574d83f
commit be52176585
65 changed files with 132 additions and 123 deletions

View File

@@ -79,10 +79,10 @@ export const VectorStoreZep = createVectorStoreNode({
embeddingDimensions?: number;
}) || {};
const credentials = (await context.getCredentials('zepApi')) as {
const credentials = await context.getCredentials<{
apiKey?: string;
apiUrl: string;
};
}>('zepApi');
const zepConfig: IZepConfig = {
apiUrl: credentials.apiUrl,
@@ -102,10 +102,10 @@ export const VectorStoreZep = createVectorStoreNode({
embeddingDimensions?: number;
}) || {};
const credentials = (await context.getCredentials('zepApi')) as {
const credentials = await context.getCredentials<{
apiKey?: string;
apiUrl: string;
};
}>('zepApi');
const zepConfig = {
apiUrl: credentials.apiUrl,

View File

@@ -110,10 +110,10 @@ export class VectorStoreZepInsert implements INodeType {
embeddingDimensions?: number;
}) || {};
const credentials = (await this.getCredentials('zepApi')) as {
const credentials = await this.getCredentials<{
apiKey?: string;
apiUrl: string;
};
}>('zepApi');
const documentInput = (await this.getInputConnectionData(NodeConnectionType.AiDocument, 0)) as
| N8nJsonLoader

View File

@@ -93,10 +93,10 @@ export class VectorStoreZepLoad implements INodeType {
embeddingDimensions?: number;
}) || {};
const credentials = (await this.getCredentials('zepApi')) as {
const credentials = await this.getCredentials<{
apiKey?: string;
apiUrl: string;
};
}>('zepApi');
const embeddings = (await this.getInputConnectionData(
NodeConnectionType.AiEmbedding,
0,