mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Update LLMUpstashRedisCache.ts
code cleanup
This commit is contained in:
@@ -1,13 +1,4 @@
|
|||||||
import {
|
import { getBaseClasses, getCredentialData, getCredentialParam, ICommonObject, INode, INodeData, INodeParams } from '../../../src'
|
||||||
getBaseClasses,
|
|
||||||
getCredentialData,
|
|
||||||
getCredentialParam,
|
|
||||||
ICommonObject,
|
|
||||||
INode,
|
|
||||||
INodeData,
|
|
||||||
INodeOutputsValue,
|
|
||||||
INodeParams
|
|
||||||
} from '../../../src'
|
|
||||||
import { UpstashRedisCache } from 'langchain/cache/upstash_redis'
|
import { UpstashRedisCache } from 'langchain/cache/upstash_redis'
|
||||||
|
|
||||||
class LLMUpstashRedisCache implements INode {
|
class LLMUpstashRedisCache implements INode {
|
||||||
@@ -20,7 +11,6 @@ class LLMUpstashRedisCache implements INode {
|
|||||||
category: string
|
category: string
|
||||||
baseClasses: string[]
|
baseClasses: string[]
|
||||||
inputs: INodeParams[]
|
inputs: INodeParams[]
|
||||||
outputs: INodeOutputsValue[]
|
|
||||||
credential: INodeParams
|
credential: INodeParams
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -30,7 +20,7 @@ class LLMUpstashRedisCache implements INode {
|
|||||||
this.type = 'LLMCache'
|
this.type = 'LLMCache'
|
||||||
this.icon = 'upstash.png'
|
this.icon = 'upstash.png'
|
||||||
this.category = 'LLM Cache'
|
this.category = 'LLM Cache'
|
||||||
this.baseClasses = [this.type, 'LLMCacheBase']
|
this.baseClasses = [this.type, ...getBaseClasses(UpstashRedisCache)]
|
||||||
this.credential = {
|
this.credential = {
|
||||||
label: 'Connect Credential',
|
label: 'Connect Credential',
|
||||||
name: 'credential',
|
name: 'credential',
|
||||||
@@ -39,13 +29,6 @@ class LLMUpstashRedisCache implements INode {
|
|||||||
credentialNames: ['upstashRedisApi']
|
credentialNames: ['upstashRedisApi']
|
||||||
}
|
}
|
||||||
this.inputs = []
|
this.inputs = []
|
||||||
this.outputs = [
|
|
||||||
{
|
|
||||||
label: 'LLM Cache',
|
|
||||||
name: 'cache',
|
|
||||||
baseClasses: [this.type, ...getBaseClasses(UpstashRedisCache)]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
|
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
|
||||||
|
|||||||
Reference in New Issue
Block a user