mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
add baselanguagemodel
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { INode, INodeData, INodeParams } from '../../../src/Interface'
|
||||
import { initializeAgentExecutorWithOptions, AgentExecutor } from 'langchain/agents'
|
||||
import { Tool } from 'langchain/tools'
|
||||
import { BaseLLM } from 'langchain/llms/base'
|
||||
import { getBaseClasses } from '../../../src/utils'
|
||||
import { BaseLanguageModel } from 'langchain/base_language'
|
||||
|
||||
class MRKLAgentLLM_Agents implements INode {
|
||||
label: string
|
||||
@@ -30,15 +30,15 @@ class MRKLAgentLLM_Agents implements INode {
|
||||
list: true
|
||||
},
|
||||
{
|
||||
label: 'LLM Model',
|
||||
label: 'Language Model',
|
||||
name: 'model',
|
||||
type: 'BaseLLM'
|
||||
type: 'BaseLanguageModel'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const model = nodeData.inputs?.model as BaseLLM
|
||||
const model = nodeData.inputs?.model as BaseLanguageModel
|
||||
let tools = nodeData.inputs?.tools as Tool[]
|
||||
tools = tools.flat()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user