From 0b0cf357c58d8f88aaf22adc68abef41af607e80 Mon Sep 17 00:00:00 2001 From: Henry Heng Date: Fri, 6 Oct 2023 23:34:07 +0100 Subject: [PATCH] Update LLMInMemoryCache.ts code cleanup --- .../llmcache/LLMInMemoryCache/LLMInMemoryCache.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/components/nodes/llmcache/LLMInMemoryCache/LLMInMemoryCache.ts b/packages/components/nodes/llmcache/LLMInMemoryCache/LLMInMemoryCache.ts index 5e77a029b..44133486f 100644 --- a/packages/components/nodes/llmcache/LLMInMemoryCache/LLMInMemoryCache.ts +++ b/packages/components/nodes/llmcache/LLMInMemoryCache/LLMInMemoryCache.ts @@ -1,4 +1,4 @@ -import { INode, INodeData, INodeOutputsValue, INodeParams } from '../../../src/Interface' +import { INode, INodeParams } from '../../../src/Interface' import { InMemoryCache } from 'langchain/cache' import { getBaseClasses } from '../../../src' @@ -12,7 +12,6 @@ class LLMInMemoryCache implements INode { category: string baseClasses: string[] inputs: INodeParams[] - outputs: INodeOutputsValue[] inMemoryCache: any constructor() { @@ -22,18 +21,11 @@ class LLMInMemoryCache implements INode { this.type = 'LLMCache' this.icon = 'memorycache.png' this.category = 'LLM Cache' - this.baseClasses = [this.type, 'LLMCacheBase'] + this.baseClasses = [this.type, ...getBaseClasses(InMemoryCache)] this.inputs = [] - this.outputs = [ - { - label: 'LLM Cache', - name: 'cache', - baseClasses: [this.type, ...getBaseClasses(InMemoryCache)] - } - ] } - async init(nodeData: INodeData): Promise { + async init(): Promise { if (!this.inMemoryCache) { this.inMemoryCache = InMemoryCache.global() }