Update LLMUpstashRedisCache.ts

code cleanup
This commit is contained in:
Henry Heng 2023-10-06 23:35:16 +01:00 committed by GitHub
parent 52ccb89949
commit 5288ea8155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 19 deletions

View File

@ -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 { UpstashRedisCache } from 'langchain/cache/upstash_redis'
class LLMUpstashRedisCache implements INode {
@ -20,7 +11,6 @@ class LLMUpstashRedisCache implements INode {
category: string
baseClasses: string[]
inputs: INodeParams[]
outputs: INodeOutputsValue[]
credential: INodeParams
constructor() {
@ -30,7 +20,7 @@ class LLMUpstashRedisCache implements INode {
this.type = 'LLMCache'
this.icon = 'upstash.png'
this.category = 'LLM Cache'
this.baseClasses = [this.type, 'LLMCacheBase']
this.baseClasses = [this.type, ...getBaseClasses(UpstashRedisCache)]
this.credential = {
label: 'Connect Credential',
name: 'credential',
@ -39,13 +29,6 @@ class LLMUpstashRedisCache implements INode {
credentialNames: ['upstashRedisApi']
}
this.inputs = []
this.outputs = [
{
label: 'LLM Cache',
name: 'cache',
baseClasses: [this.type, ...getBaseClasses(UpstashRedisCache)]
}
]
}
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {