diff --git a/packages/components/nodes/llmcache/LLMRedisCache/LLMRedisCache.ts b/packages/components/nodes/llmcache/LLMRedisCache/LLMRedisCache.ts index 4a098e82..a7208977 100644 --- a/packages/components/nodes/llmcache/LLMRedisCache/LLMRedisCache.ts +++ b/packages/components/nodes/llmcache/LLMRedisCache/LLMRedisCache.ts @@ -1,13 +1,4 @@ -import { - getBaseClasses, - getCredentialData, - getCredentialParam, - ICommonObject, - INode, - INodeData, - INodeOutputsValue, - INodeParams -} from '../../../src' +import { getBaseClasses, getCredentialData, getCredentialParam, ICommonObject, INode, INodeData, INodeParams } from '../../../src' import { RedisCache } from 'langchain/cache/ioredis' import { Redis } from 'ioredis' @@ -21,7 +12,6 @@ class LLMRedisCache implements INode { category: string baseClasses: string[] inputs: INodeParams[] - outputs: INodeOutputsValue[] credential: INodeParams constructor() { @@ -31,7 +21,7 @@ class LLMRedisCache implements INode { this.type = 'LLMCache' this.icon = 'redis.svg' this.category = 'LLM Cache' - this.baseClasses = [this.type, 'LLMCacheBase'] + this.baseClasses = [this.type, ...getBaseClasses(RedisCache)] this.credential = { label: 'Connect Credential', name: 'credential', @@ -40,13 +30,6 @@ class LLMRedisCache implements INode { credentialNames: ['redisCacheApi'] } this.inputs = [] - this.outputs = [ - { - label: 'LLM Cache', - name: 'cache', - baseClasses: [this.type, ...getBaseClasses(RedisCache)] - } - ] } async init(nodeData: INodeData, _: string, options: ICommonObject): Promise { @@ -55,18 +38,12 @@ class LLMRedisCache implements INode { const password = getCredentialParam('redisCachePwd', credentialData, nodeData) const portStr = getCredentialParam('redisCachePort', credentialData, nodeData) const host = getCredentialParam('redisCacheHost', credentialData, nodeData) - let port = 6379 - try { - port = portStr ? parseInt(portStr) : 6379 - } catch (e) { - port = 6379 - } const client = new Redis({ - port: port, // Redis port - host: host, - username: username, - password: password + port: portStr ? parseInt(portStr) : 6379, + host, + username, + password }) return new RedisCache(client) }