From 2785e3b685f6e5adcee00af3b52dcfec0f5af058 Mon Sep 17 00:00:00 2001 From: Henry Heng Date: Fri, 6 Oct 2023 23:34:36 +0100 Subject: [PATCH] Update LLMMomentoCache.ts code cleanup --- .../LLMMomentoCache/LLMMomentoCache.ts | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/packages/components/nodes/llmcache/LLMMomentoCache/LLMMomentoCache.ts b/packages/components/nodes/llmcache/LLMMomentoCache/LLMMomentoCache.ts index 82267c24..f8fd61fb 100644 --- a/packages/components/nodes/llmcache/LLMMomentoCache/LLMMomentoCache.ts +++ b/packages/components/nodes/llmcache/LLMMomentoCache/LLMMomentoCache.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 { MomentoCache } from 'langchain/cache/momento' import { CacheClient, Configurations, CredentialProvider } from '@gomomento/sdk' @@ -21,7 +12,6 @@ class LLMMomentoCache implements INode { category: string baseClasses: string[] inputs: INodeParams[] - outputs: INodeOutputsValue[] credential: INodeParams constructor() { @@ -31,7 +21,7 @@ class LLMMomentoCache implements INode { this.type = 'LLMCache' this.icon = 'momento.png' this.category = 'LLM Cache' - this.baseClasses = [this.type, 'LLMCacheBase'] + this.baseClasses = [this.type, ...getBaseClasses(MomentoCache)] this.credential = { label: 'Connect Credential', name: 'credential', @@ -40,13 +30,6 @@ class LLMMomentoCache implements INode { credentialNames: ['momentoCacheApi'] } this.inputs = [] - this.outputs = [ - { - label: 'LLM Cache', - name: 'cache', - baseClasses: [this.type, ...getBaseClasses(MomentoCache)] - } - ] } async init(nodeData: INodeData, _: string, options: ICommonObject): Promise {