From 3a4bfc2e366d0b30bf4f666225b7b8a6aa5f119f Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Thu, 6 Apr 2023 16:18:13 -0300 Subject: [PATCH] formatting --- src/backend/langflow/api/base.py | 3 ++- src/backend/langflow/graph/graph.py | 2 +- tests/test_prompts_template.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/backend/langflow/api/base.py b/src/backend/langflow/api/base.py index 4ae313fd3..084e04d65 100644 --- a/src/backend/langflow/api/base.py +++ b/src/backend/langflow/api/base.py @@ -1,6 +1,7 @@ -from langflow.graph.utils import extract_input_variables_from_prompt from pydantic import BaseModel, validator +from langflow.graph.utils import extract_input_variables_from_prompt + class Code(BaseModel): code: str diff --git a/src/backend/langflow/graph/graph.py b/src/backend/langflow/graph/graph.py index 57b9082bb..84b94a6a5 100644 --- a/src/backend/langflow/graph/graph.py +++ b/src/backend/langflow/graph/graph.py @@ -15,12 +15,12 @@ from langflow.graph.nodes import ( from langflow.interface.agents.base import agent_creator from langflow.interface.chains.base import chain_creator from langflow.interface.llms.base import llm_creator +from langflow.interface.memories.base import memory_creator from langflow.interface.prompts.base import prompt_creator from langflow.interface.toolkits.base import toolkits_creator from langflow.interface.tools.base import tool_creator from langflow.interface.tools.constants import FILE_TOOLS from langflow.interface.wrappers.base import wrapper_creator -from langflow.interface.memories.base import memory_creator from langflow.utils import payload diff --git a/tests/test_prompts_template.py b/tests/test_prompts_template.py index 24729cb63..caa30821c 100644 --- a/tests/test_prompts_template.py +++ b/tests/test_prompts_template.py @@ -167,7 +167,7 @@ def test_zero_shot_prompt(client: TestClient): "placeholder": "", "show": True, "multiline": True, - "value": "Answer the following questions as best you can. You have access to the following tools:", # noqa: E501 + "value": "Answer the following questions as best you can. You have access to the following tools:", # noqa: E501 "password": False, "name": "prefix", "type": "str", @@ -189,7 +189,7 @@ def test_zero_shot_prompt(client: TestClient): "placeholder": "", "show": False, "multiline": False, - "value": "Use the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [{tool_names}]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question", # noqa: E501 + "value": "Use the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [{tool_names}]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question", # noqa: E501 "password": False, "name": "format_instructions", "type": "str",