From 357d13b1a90a594796709302231288474a7e17e8 Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Fri, 28 Apr 2023 15:45:53 -0300 Subject: [PATCH] refactor(validate.py): change wrapped_function from async to sync fix(test_chains_template.py): set prompt show value to False for mid_journey_prompt_chain and time_travel_guide_chain tests --- src/backend/langflow/utils/validate.py | 2 +- tests/test_chains_template.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/langflow/utils/validate.py b/src/backend/langflow/utils/validate.py index 59d22a143..d1353bd77 100644 --- a/src/backend/langflow/utils/validate.py +++ b/src/backend/langflow/utils/validate.py @@ -155,7 +155,7 @@ def create_function(code, function_name): exec_globals[function_name] = locals()[function_name] # Return a function that imports necessary modules and calls the target function - async def wrapped_function(*args, **kwargs): + def wrapped_function(*args, **kwargs): for module_name, module in exec_globals.items(): if isinstance(module, type(importlib)): globals()[module_name] = module diff --git a/tests/test_chains_template.py b/tests/test_chains_template.py index 510437797..ad57a9a39 100644 --- a/tests/test_chains_template.py +++ b/tests/test_chains_template.py @@ -462,7 +462,7 @@ def test_mid_journey_prompt_chain(client: TestClient): assert template["prompt"] == { "required": False, "placeholder": "", - "show": True, + "show": False, "multiline": False, "value": { "input_variables": ["history", "input"], @@ -590,7 +590,7 @@ def test_time_travel_guide_chain(client: TestClient): assert template["prompt"] == { "required": False, "placeholder": "", - "show": True, + "show": False, "multiline": False, "value": { "input_variables": ["history", "input"],