Files
Flowise/packages/server/marketplaces/Conversational Agent.json
T
Henry 9281b57ef1 - update LangchainJS version
- add types & interfaces

- small ui bug fix

- update marketplace files
2023-04-13 18:32:00 +01:00

328 lines
12 KiB
JSON

{
"description": "A conversational agent for a chat model which utilize chat specific prompts",
"nodes": [
{
"width": 300,
"height": 278,
"id": "serpAPI_0",
"position": {
"x": 509.0449726750261,
"y": 40.29354052812607
},
"type": "customNode",
"data": {
"id": "serpAPI_0",
"label": "Serp API",
"name": "serpAPI",
"type": "SerpAPI",
"baseClasses": ["SerpAPI", "Tool"],
"category": "Tools",
"description": "Wrapper around SerpAPI - a real-time API to access Google search results",
"inputParams": [
{
"label": "Serp Api Key",
"name": "apiKey",
"type": "password"
}
],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "serpAPI_0-output-serpAPI-SerpAPI|Tool",
"name": "serpAPI",
"label": "SerpAPI",
"type": "SerpAPI | Tool"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 509.0449726750261,
"y": 40.29354052812607
},
"dragging": false
},
{
"width": 300,
"height": 143,
"id": "calculator_0",
"position": {
"x": 877.5497970197198,
"y": 59.162476101133734
},
"type": "customNode",
"data": {
"id": "calculator_0",
"label": "Calculator",
"name": "calculator",
"type": "Calculator",
"baseClasses": ["Calculator", "Tool"],
"category": "Tools",
"description": "Perform calculations on response",
"inputParams": [],
"inputAnchors": [],
"inputs": {},
"outputAnchors": [
{
"id": "calculator_0-output-calculator-Calculator|Tool",
"name": "calculator",
"label": "Calculator",
"type": "Calculator | Tool"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 877.5497970197198,
"y": 59.162476101133734
},
"dragging": false
},
{
"width": 300,
"height": 472,
"id": "chatOpenAI_0",
"position": {
"x": 451.9774324962526,
"y": 370.86893557300755
},
"type": "customNode",
"data": {
"id": "chatOpenAI_0",
"label": "ChatOpenAI",
"name": "chatOpenAI",
"type": "ChatOpenAI",
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
"category": "Chat Models",
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
"inputParams": [
{
"label": "OpenAI Api Key",
"name": "openAIApiKey",
"type": "password"
},
{
"label": "Model Name",
"name": "modelName",
"type": "options",
"options": [
{
"label": "gpt-4",
"name": "gpt-4"
},
{
"label": "gpt-4-0314",
"name": "gpt-4-0314"
},
{
"label": "gpt-4-32k-0314",
"name": "gpt-4-32k-0314"
},
{
"label": "gpt-3.5-turbo",
"name": "gpt-3.5-turbo"
},
{
"label": "gpt-3.5-turbo-0301",
"name": "gpt-3.5-turbo-0301"
}
],
"default": "gpt-3.5-turbo",
"optional": true
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"default": 0.9,
"optional": true
}
],
"inputAnchors": [],
"inputs": {
"modelName": "gpt-3.5-turbo",
"temperature": 0.9
},
"outputAnchors": [
{
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
"name": "chatOpenAI",
"label": "ChatOpenAI",
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 451.9774324962526,
"y": 370.86893557300755
},
"dragging": false
},
{
"width": 300,
"height": 376,
"id": "bufferMemory_0",
"position": {
"x": 823.1867811443266,
"y": 704.7589374803455
},
"type": "customNode",
"data": {
"id": "bufferMemory_0",
"label": "Buffer Memory",
"name": "bufferMemory",
"type": "BufferMemory",
"baseClasses": ["BufferMemory", "BaseChatMemory", "BaseMemory"],
"category": "Memory",
"description": "Perform calculations on response",
"inputParams": [
{
"label": "Memory Key",
"name": "memoryKey",
"type": "string",
"default": "chat_history"
},
{
"label": "Input Key",
"name": "inputKey",
"type": "string",
"default": "input"
}
],
"inputAnchors": [],
"inputs": {
"memoryKey": "chat_history",
"inputKey": "input"
},
"outputAnchors": [
{
"id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"name": "bufferMemory",
"label": "BufferMemory",
"type": "BufferMemory | BaseChatMemory | BaseMemory"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 823.1867811443266,
"y": 704.7589374803455
},
"dragging": false
},
{
"width": 300,
"height": 331,
"id": "conversationalAgent_0",
"position": {
"x": 1257.706443811743,
"y": 335.10277854416955
},
"type": "customNode",
"data": {
"id": "conversationalAgent_0",
"label": "Conversational Agent",
"name": "conversationalAgent",
"type": "AgentExecutor",
"baseClasses": ["AgentExecutor", "BaseChain"],
"category": "Agents",
"description": "Conversational agent for a chat model. It will utilize chat specific prompts",
"inputParams": [],
"inputAnchors": [
{
"label": "Allowed Tools",
"name": "tools",
"type": "Tool",
"list": true,
"id": "conversationalAgent_0-input-tools-Tool"
},
{
"label": "Chat Model",
"name": "model",
"type": "BaseChatModel",
"id": "conversationalAgent_0-input-model-BaseChatModel"
},
{
"label": "Memory",
"name": "memory",
"type": "BaseChatMemory",
"id": "conversationalAgent_0-input-memory-BaseChatMemory"
}
],
"inputs": {
"tools": ["{{calculator_0.data.instance}}", "{{serpAPI_0.data.instance}}"],
"model": "{{chatOpenAI_0.data.instance}}",
"memory": "{{bufferMemory_0.data.instance}}"
},
"outputAnchors": [
{
"id": "conversationalAgent_0-output-conversationalAgent-AgentExecutor|BaseChain",
"name": "conversationalAgent",
"label": "AgentExecutor",
"type": "AgentExecutor | BaseChain"
}
],
"selected": false
},
"selected": false,
"positionAbsolute": {
"x": 1257.706443811743,
"y": 335.10277854416955
},
"dragging": false
}
],
"edges": [
{
"source": "calculator_0",
"sourceHandle": "calculator_0-output-calculator-Calculator|Tool",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "calculator_0-calculator_0-output-calculator-Calculator|Tool-conversationalAgent_0-conversationalAgent_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "serpAPI_0",
"sourceHandle": "serpAPI_0-output-serpAPI-SerpAPI|Tool",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-tools-Tool",
"type": "buttonedge",
"id": "serpAPI_0-serpAPI_0-output-serpAPI-SerpAPI|Tool-conversationalAgent_0-conversationalAgent_0-input-tools-Tool",
"data": {
"label": ""
}
},
{
"source": "chatOpenAI_0",
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-model-BaseChatModel",
"type": "buttonedge",
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel-conversationalAgent_0-conversationalAgent_0-input-model-BaseChatModel",
"data": {
"label": ""
}
},
{
"source": "bufferMemory_0",
"sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"target": "conversationalAgent_0",
"targetHandle": "conversationalAgent_0-input-memory-BaseChatMemory",
"type": "buttonedge",
"id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-conversationalAgent_0-conversationalAgent_0-input-memory-BaseChatMemory",
"data": {
"label": ""
}
}
]
}