mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Merge pull request #1279 from FlowiseAI/feature/OpenAI-Function
Feature/Update models for openai function
This commit is contained in:
+3
-3
@@ -21,7 +21,7 @@ class ConversationalRetrievalAgent_Agents implements INode {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this.label = 'Conversational Retrieval Agent'
|
this.label = 'Conversational Retrieval Agent'
|
||||||
this.name = 'conversationalRetrievalAgent'
|
this.name = 'conversationalRetrievalAgent'
|
||||||
this.version = 1.0
|
this.version = 2.0
|
||||||
this.type = 'AgentExecutor'
|
this.type = 'AgentExecutor'
|
||||||
this.category = 'Agents'
|
this.category = 'Agents'
|
||||||
this.icon = 'agent.svg'
|
this.icon = 'agent.svg'
|
||||||
@@ -40,9 +40,9 @@ class ConversationalRetrievalAgent_Agents implements INode {
|
|||||||
type: 'BaseChatMemory'
|
type: 'BaseChatMemory'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'OpenAI Chat Model',
|
label: 'OpenAI/Azure Chat Model',
|
||||||
name: 'model',
|
name: 'model',
|
||||||
type: 'ChatOpenAI'
|
type: 'ChatOpenAI | AzureChatOpenAI'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'System Message',
|
label: 'System Message',
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ class OpenAIFunctionAgent_Agents implements INode {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this.label = 'OpenAI Function Agent'
|
this.label = 'OpenAI Function Agent'
|
||||||
this.name = 'openAIFunctionAgent'
|
this.name = 'openAIFunctionAgent'
|
||||||
this.version = 1.0
|
this.version = 2.0
|
||||||
this.type = 'AgentExecutor'
|
this.type = 'AgentExecutor'
|
||||||
this.category = 'Agents'
|
this.category = 'Agents'
|
||||||
this.icon = 'openai.png'
|
this.icon = 'openai.png'
|
||||||
this.description = `An agent that uses OpenAI's Function Calling functionality to pick the tool and args to call`
|
this.description = `An agent that uses Function Calling to pick the tool and args to call`
|
||||||
this.baseClasses = [this.type, ...getBaseClasses(AgentExecutor)]
|
this.baseClasses = [this.type, ...getBaseClasses(AgentExecutor)]
|
||||||
this.inputs = [
|
this.inputs = [
|
||||||
{
|
{
|
||||||
@@ -39,11 +39,9 @@ class OpenAIFunctionAgent_Agents implements INode {
|
|||||||
type: 'BaseChatMemory'
|
type: 'BaseChatMemory'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'OpenAI Chat Model',
|
label: 'OpenAI/Azure Chat Model',
|
||||||
name: 'model',
|
name: 'model',
|
||||||
description:
|
type: 'ChatOpenAI | AzureChatOpenAI'
|
||||||
'Only works with gpt-3.5-turbo-0613 and gpt-4-0613. Refer <a target="_blank" href="https://platform.openai.com/docs/guides/gpt/function-calling">docs</a> for more info',
|
|
||||||
type: 'BaseChatModel'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'System Message',
|
label: 'System Message',
|
||||||
|
|||||||
@@ -334,7 +334,7 @@
|
|||||||
"id": "openAIFunctionAgent_0",
|
"id": "openAIFunctionAgent_0",
|
||||||
"label": "OpenAI Function Agent",
|
"label": "OpenAI Function Agent",
|
||||||
"name": "openAIFunctionAgent",
|
"name": "openAIFunctionAgent",
|
||||||
"version": 1,
|
"version": 2,
|
||||||
"type": "AgentExecutor",
|
"type": "AgentExecutor",
|
||||||
"baseClasses": ["AgentExecutor", "BaseChain"],
|
"baseClasses": ["AgentExecutor", "BaseChain"],
|
||||||
"category": "Agents",
|
"category": "Agents",
|
||||||
@@ -365,11 +365,10 @@
|
|||||||
"id": "openAIFunctionAgent_0-input-memory-BaseChatMemory"
|
"id": "openAIFunctionAgent_0-input-memory-BaseChatMemory"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "OpenAI Chat Model",
|
"label": "OpenAI/Azure Chat Model",
|
||||||
"name": "model",
|
"name": "model",
|
||||||
"description": "Only works with gpt-3.5-turbo-0613 and gpt-4-0613. Refer <a target=\"_blank\" href=\"https://platform.openai.com/docs/guides/gpt/function-calling\">docs</a> for more info",
|
"type": "ChatOpenAI | AzureChatOpenAI",
|
||||||
"type": "BaseChatModel",
|
"id": "openAIFunctionAgent_0-input-model-ChatOpenAI | AzureChatOpenAI"
|
||||||
"id": "openAIFunctionAgent_0-input-model-BaseChatModel"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"id": "conversationalRetrievalAgent_0",
|
"id": "conversationalRetrievalAgent_0",
|
||||||
"label": "Conversational Retrieval Agent",
|
"label": "Conversational Retrieval Agent",
|
||||||
"version": 1,
|
"version": 2,
|
||||||
"name": "conversationalRetrievalAgent",
|
"name": "conversationalRetrievalAgent",
|
||||||
"type": "AgentExecutor",
|
"type": "AgentExecutor",
|
||||||
"baseClasses": ["AgentExecutor", "BaseChain", "Runnable"],
|
"baseClasses": ["AgentExecutor", "BaseChain", "Runnable"],
|
||||||
@@ -130,10 +130,10 @@
|
|||||||
"id": "conversationalRetrievalAgent_0-input-memory-BaseChatMemory"
|
"id": "conversationalRetrievalAgent_0-input-memory-BaseChatMemory"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "OpenAI Chat Model",
|
"label": "OpenAI/Azure Chat Model",
|
||||||
"name": "model",
|
"name": "model",
|
||||||
"type": "ChatOpenAI",
|
"type": "ChatOpenAI | AzureChatOpenAI",
|
||||||
"id": "conversationalRetrievalAgent_0-input-model-ChatOpenAI"
|
"id": "conversationalRetrievalAgent_0-input-model-ChatOpenAI | AzureChatOpenAI"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
|||||||
@@ -206,7 +206,7 @@
|
|||||||
"id": "openAIFunctionAgent_0",
|
"id": "openAIFunctionAgent_0",
|
||||||
"label": "OpenAI Function Agent",
|
"label": "OpenAI Function Agent",
|
||||||
"name": "openAIFunctionAgent",
|
"name": "openAIFunctionAgent",
|
||||||
"version": 1,
|
"version": 2,
|
||||||
"type": "AgentExecutor",
|
"type": "AgentExecutor",
|
||||||
"baseClasses": ["AgentExecutor", "BaseChain"],
|
"baseClasses": ["AgentExecutor", "BaseChain"],
|
||||||
"category": "Agents",
|
"category": "Agents",
|
||||||
@@ -237,11 +237,10 @@
|
|||||||
"id": "openAIFunctionAgent_0-input-memory-BaseChatMemory"
|
"id": "openAIFunctionAgent_0-input-memory-BaseChatMemory"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "OpenAI Chat Model",
|
"label": "OpenAI/Azure Chat Model",
|
||||||
"name": "model",
|
"name": "model",
|
||||||
"description": "Only works with gpt-3.5-turbo-0613 and gpt-4-0613. Refer <a target=\"_blank\" href=\"https://platform.openai.com/docs/guides/gpt/function-calling\">docs</a> for more info",
|
"type": "ChatOpenAI | AzureChatOpenAI",
|
||||||
"type": "BaseChatModel",
|
"id": "openAIFunctionAgent_0-input-model-ChatOpenAI | AzureChatOpenAI"
|
||||||
"id": "openAIFunctionAgent_0-input-model-BaseChatModel"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
|||||||
@@ -68,10 +68,14 @@ const AddNodes = ({ nodesData, node }) => {
|
|||||||
else newNodes.push(vsNode)
|
else newNodes.push(vsNode)
|
||||||
}
|
}
|
||||||
delete obj['Vector Stores']
|
delete obj['Vector Stores']
|
||||||
obj['Vector Stores;DEPRECATING'] = deprecatingNodes
|
if (deprecatingNodes.length) {
|
||||||
accordianCategories['Vector Stores;DEPRECATING'] = isFilter ? true : false
|
obj['Vector Stores;DEPRECATING'] = deprecatingNodes
|
||||||
obj['Vector Stores;NEW'] = newNodes
|
accordianCategories['Vector Stores;DEPRECATING'] = isFilter ? true : false
|
||||||
accordianCategories['Vector Stores;NEW'] = isFilter ? true : false
|
}
|
||||||
|
if (newNodes.length) {
|
||||||
|
obj['Vector Stores;NEW'] = newNodes
|
||||||
|
accordianCategories['Vector Stores;NEW'] = isFilter ? true : false
|
||||||
|
}
|
||||||
setNodes(obj)
|
setNodes(obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user