From e6c26cb8db0e52d731d6feeb0551f77c761ead46 Mon Sep 17 00:00:00 2001 From: Edwin Jose Date: Mon, 11 Nov 2024 10:32:50 -0500 Subject: [PATCH 1/8] info added --- src/backend/base/langflow/base/agents/agent.py | 4 ++++ .../base/langflow/components/agents/agent.py | 3 ++- .../langchain_utilities/tool_calling.py | 16 ++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/backend/base/langflow/base/agents/agent.py b/src/backend/base/langflow/base/agents/agent.py index 63eacc3fdc7..bd7f864850e 100644 --- a/src/backend/base/langflow/base/agents/agent.py +++ b/src/backend/base/langflow/base/agents/agent.py @@ -44,18 +44,21 @@ class LCAgentComponent(Component): display_name="Handle Parse Errors", value=True, advanced=True, + info="Handle parsing errors in the agent.", ), BoolInput( name="verbose", display_name="Verbose", value=True, advanced=True, + info="Whether to print verbose output.", ), IntInput( name="max_iterations", display_name="Max Iterations", value=15, advanced=True, + info="The maximum number of iterations for the agent.", ), MultilineInput( name="agent_description", @@ -187,6 +190,7 @@ class LCToolsAgentComponent(LCAgentComponent): input_types=["Tool", "BaseTool", "StructuredTool"], is_list=True, required=True, + info="Tools for the agent", ), *LCAgentComponent._base_inputs, ] diff --git a/src/backend/base/langflow/components/agents/agent.py b/src/backend/base/langflow/components/agents/agent.py index c7f9500f77a..9aee2a6a834 100644 --- a/src/backend/base/langflow/components/agents/agent.py +++ b/src/backend/base/langflow/components/agents/agent.py @@ -28,6 +28,7 @@ class AgentComponent(ToolCallingAgentComponent): DropdownInput( name="agent_llm", display_name="Model Provider", + info="The language model provider for the agent.", options=[*sorted(MODEL_PROVIDERS_DICT.keys()), "Custom"], value="OpenAI", real_time_refresh=True, @@ -37,7 +38,7 @@ class AgentComponent(ToolCallingAgentComponent): MultilineInput( name="system_prompt", display_name="Agent Instructions", - info="Initial instructions and context provided to guide the agent's behavior.", + info="System prompt to guide the agent's behavior.", value="You are a helpful assistant that can use tools to answer questions and perform tasks.", advanced=False, ), diff --git a/src/backend/base/langflow/components/langchain_utilities/tool_calling.py b/src/backend/base/langflow/components/langchain_utilities/tool_calling.py index 92b169a9eca..f4aaac40546 100644 --- a/src/backend/base/langflow/components/langchain_utilities/tool_calling.py +++ b/src/backend/base/langflow/components/langchain_utilities/tool_calling.py @@ -15,14 +15,26 @@ class ToolCallingAgentComponent(LCToolsAgentComponent): inputs = [ *LCToolsAgentComponent._base_inputs, - HandleInput(name="llm", display_name="Language Model", input_types=["LanguageModel"], required=True), + HandleInput( + name="llm", + display_name="Language Model", + input_types=["LanguageModel"], + required=True, + info="The language model provider forthe agent.", + ), MessageTextInput( name="system_prompt", display_name="System Prompt", info="Initial instructions and context provided to guide the agent's behavior.", value="You are a helpful assistant that can use tools to answer questions and perform tasks.", ), - DataInput(name="chat_history", display_name="Chat Memory", is_list=True, advanced=True), + DataInput( + name="chat_history", + display_name="Chat Memory", + is_list=True, + advanced=True, + info="To store past interactions for chat continuity.", + ), ] def get_chat_history_data(self) -> list[Data] | None: From 9f64fc0792d659a993bb11842a47999ec37f174c Mon Sep 17 00:00:00 2001 From: Edwin Jose Date: Mon, 11 Nov 2024 11:36:20 -0500 Subject: [PATCH 2/8] Update openai.py update to Open AI model info --- src/backend/base/langflow/components/models/openai.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/components/models/openai.py b/src/backend/base/langflow/components/models/openai.py index f4a8be80fb7..63d999a4b7c 100644 --- a/src/backend/base/langflow/components/models/openai.py +++ b/src/backend/base/langflow/components/models/openai.py @@ -27,7 +27,12 @@ class OpenAIModelComponent(LCModelComponent): info="The maximum number of tokens to generate. Set to 0 for unlimited tokens.", range_spec=RangeSpec(min=0, max=128000), ), - DictInput(name="model_kwargs", display_name="Model Kwargs", advanced=True), + DictInput( + name="model_kwargs", + display_name="Model Kwargs", + advanced=True, + info="Additional keyword arguments to pass to the model.", + ), BoolInput( name="json_mode", display_name="JSON Mode", From 974d5b5bd67a219251ba4d2c365e59260fc85373 Mon Sep 17 00:00:00 2001 From: Edwin Jose Date: Mon, 11 Nov 2024 11:47:00 -0500 Subject: [PATCH 3/8] info changed --- src/backend/base/langflow/base/agents/agent.py | 6 +++--- src/backend/base/langflow/components/agents/agent.py | 4 ++-- .../langflow/components/langchain_utilities/tool_calling.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backend/base/langflow/base/agents/agent.py b/src/backend/base/langflow/base/agents/agent.py index bd7f864850e..68ffb75c77b 100644 --- a/src/backend/base/langflow/base/agents/agent.py +++ b/src/backend/base/langflow/base/agents/agent.py @@ -44,21 +44,21 @@ class LCAgentComponent(Component): display_name="Handle Parse Errors", value=True, advanced=True, - info="Handle parsing errors in the agent.", + info="Should the Agent fix errors when reading user input for better processing?", ), BoolInput( name="verbose", display_name="Verbose", value=True, advanced=True, - info="Whether to print verbose output.", + info="Print more details about the Agent's actions and thoughts.", ), IntInput( name="max_iterations", display_name="Max Iterations", value=15, advanced=True, - info="The maximum number of iterations for the agent.", + info="The maximum number of attempts the agent can make to complete its task before it stops.", ), MultilineInput( name="agent_description", diff --git a/src/backend/base/langflow/components/agents/agent.py b/src/backend/base/langflow/components/agents/agent.py index 9aee2a6a834..067e1660c6c 100644 --- a/src/backend/base/langflow/components/agents/agent.py +++ b/src/backend/base/langflow/components/agents/agent.py @@ -28,7 +28,7 @@ class AgentComponent(ToolCallingAgentComponent): DropdownInput( name="agent_llm", display_name="Model Provider", - info="The language model provider for the agent.", + info="The provider of the language model that the agent will use.", options=[*sorted(MODEL_PROVIDERS_DICT.keys()), "Custom"], value="OpenAI", real_time_refresh=True, @@ -38,7 +38,7 @@ class AgentComponent(ToolCallingAgentComponent): MultilineInput( name="system_prompt", display_name="Agent Instructions", - info="System prompt to guide the agent's behavior.", + info="System Prompt: Instructions to guide the agent's behavior.", value="You are a helpful assistant that can use tools to answer questions and perform tasks.", advanced=False, ), diff --git a/src/backend/base/langflow/components/langchain_utilities/tool_calling.py b/src/backend/base/langflow/components/langchain_utilities/tool_calling.py index f4aaac40546..c3ee31951aa 100644 --- a/src/backend/base/langflow/components/langchain_utilities/tool_calling.py +++ b/src/backend/base/langflow/components/langchain_utilities/tool_calling.py @@ -20,7 +20,7 @@ class ToolCallingAgentComponent(LCToolsAgentComponent): display_name="Language Model", input_types=["LanguageModel"], required=True, - info="The language model provider forthe agent.", + info="The language model that the agent will use.", ), MessageTextInput( name="system_prompt", @@ -33,7 +33,7 @@ class ToolCallingAgentComponent(LCToolsAgentComponent): display_name="Chat Memory", is_list=True, advanced=True, - info="To store past interactions for chat continuity.", + info="This keeps track of previous chats so the agent can remember what was said before.", ), ] From 0a799609f8e72ad3212a4f8e5adcb32362b64f18 Mon Sep 17 00:00:00 2001 From: Edwin Jose Date: Mon, 11 Nov 2024 11:49:25 -0500 Subject: [PATCH 4/8] Update tool_calling.py made info of LLM much simpler --- .../langflow/components/langchain_utilities/tool_calling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/components/langchain_utilities/tool_calling.py b/src/backend/base/langflow/components/langchain_utilities/tool_calling.py index c3ee31951aa..0616d8ecf0e 100644 --- a/src/backend/base/langflow/components/langchain_utilities/tool_calling.py +++ b/src/backend/base/langflow/components/langchain_utilities/tool_calling.py @@ -20,7 +20,7 @@ class ToolCallingAgentComponent(LCToolsAgentComponent): display_name="Language Model", input_types=["LanguageModel"], required=True, - info="The language model that the agent will use.", + info="Language model that the agent utilizes to perform tasks effectively.", ), MessageTextInput( name="system_prompt", From bb408cde10927dc66800af73b9848b216f480512 Mon Sep 17 00:00:00 2001 From: Edwin Jose Date: Mon, 11 Nov 2024 12:00:08 -0500 Subject: [PATCH 5/8] info updated to be simpler --- src/backend/base/langflow/components/agents/agent.py | 4 ++-- .../langflow/components/langchain_utilities/tool_calling.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/base/langflow/components/agents/agent.py b/src/backend/base/langflow/components/agents/agent.py index 067e1660c6c..83a657679c7 100644 --- a/src/backend/base/langflow/components/agents/agent.py +++ b/src/backend/base/langflow/components/agents/agent.py @@ -28,7 +28,7 @@ class AgentComponent(ToolCallingAgentComponent): DropdownInput( name="agent_llm", display_name="Model Provider", - info="The provider of the language model that the agent will use.", + info="The provider of the language model that the agent will use to generate responses.", options=[*sorted(MODEL_PROVIDERS_DICT.keys()), "Custom"], value="OpenAI", real_time_refresh=True, @@ -38,7 +38,7 @@ class AgentComponent(ToolCallingAgentComponent): MultilineInput( name="system_prompt", display_name="Agent Instructions", - info="System Prompt: Instructions to guide the agent's behavior.", + info="System Prompt: Initial instructions and context provided to guide the agent's behavior.", value="You are a helpful assistant that can use tools to answer questions and perform tasks.", advanced=False, ), diff --git a/src/backend/base/langflow/components/langchain_utilities/tool_calling.py b/src/backend/base/langflow/components/langchain_utilities/tool_calling.py index 0616d8ecf0e..f2c16e66a68 100644 --- a/src/backend/base/langflow/components/langchain_utilities/tool_calling.py +++ b/src/backend/base/langflow/components/langchain_utilities/tool_calling.py @@ -33,7 +33,7 @@ class ToolCallingAgentComponent(LCToolsAgentComponent): display_name="Chat Memory", is_list=True, advanced=True, - info="This keeps track of previous chats so the agent can remember what was said before.", + info="This input stores the chat history, allowing the agent to remember previous conversations.", ), ] From abc52647ddcc3b4c8d443f9e69af19584bd12fef Mon Sep 17 00:00:00 2001 From: Edwin Jose Date: Mon, 11 Nov 2024 12:01:47 -0500 Subject: [PATCH 6/8] Update agent.py --- src/backend/base/langflow/base/agents/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/base/agents/agent.py b/src/backend/base/langflow/base/agents/agent.py index 68ffb75c77b..199b2e836a4 100644 --- a/src/backend/base/langflow/base/agents/agent.py +++ b/src/backend/base/langflow/base/agents/agent.py @@ -190,7 +190,7 @@ class LCToolsAgentComponent(LCAgentComponent): input_types=["Tool", "BaseTool", "StructuredTool"], is_list=True, required=True, - info="Tools for the agent", + info="These are the tools that the agent can use to help with tasks.", ), *LCAgentComponent._base_inputs, ] From 6a7a6cbb268dd75642e74e989de0382343d469c7 Mon Sep 17 00:00:00 2001 From: Edwin Jose Date: Mon, 11 Nov 2024 20:59:22 -0500 Subject: [PATCH 7/8] Update agent.py --- src/backend/base/langflow/base/agents/agent.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/base/langflow/base/agents/agent.py b/src/backend/base/langflow/base/agents/agent.py index 199b2e836a4..1c104c4aa0f 100644 --- a/src/backend/base/langflow/base/agents/agent.py +++ b/src/backend/base/langflow/base/agents/agent.py @@ -50,8 +50,7 @@ class LCAgentComponent(Component): name="verbose", display_name="Verbose", value=True, - advanced=True, - info="Print more details about the Agent's actions and thoughts.", + advanced=True ), IntInput( name="max_iterations", From 61bd280b1b0e78b72170d81b2b3368179892be7d Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 02:03:27 +0000 Subject: [PATCH 8/8] [autofix.ci] apply automated fixes --- src/backend/base/langflow/base/agents/agent.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/backend/base/langflow/base/agents/agent.py b/src/backend/base/langflow/base/agents/agent.py index 1c104c4aa0f..0c4b2b3da08 100644 --- a/src/backend/base/langflow/base/agents/agent.py +++ b/src/backend/base/langflow/base/agents/agent.py @@ -46,12 +46,7 @@ class LCAgentComponent(Component): advanced=True, info="Should the Agent fix errors when reading user input for better processing?", ), - BoolInput( - name="verbose", - display_name="Verbose", - value=True, - advanced=True - ), + BoolInput(name="verbose", display_name="Verbose", value=True, advanced=True), IntInput( name="max_iterations", display_name="Max Iterations",