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
This commit is contained in:
parent
07863ea098
commit
357d13b1a9
2 changed files with 3 additions and 3 deletions
|
|
@ -155,7 +155,7 @@ def create_function(code, function_name):
|
||||||
exec_globals[function_name] = locals()[function_name]
|
exec_globals[function_name] = locals()[function_name]
|
||||||
|
|
||||||
# Return a function that imports necessary modules and calls the target function
|
# 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():
|
for module_name, module in exec_globals.items():
|
||||||
if isinstance(module, type(importlib)):
|
if isinstance(module, type(importlib)):
|
||||||
globals()[module_name] = module
|
globals()[module_name] = module
|
||||||
|
|
|
||||||
|
|
@ -462,7 +462,7 @@ def test_mid_journey_prompt_chain(client: TestClient):
|
||||||
assert template["prompt"] == {
|
assert template["prompt"] == {
|
||||||
"required": False,
|
"required": False,
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"show": True,
|
"show": False,
|
||||||
"multiline": False,
|
"multiline": False,
|
||||||
"value": {
|
"value": {
|
||||||
"input_variables": ["history", "input"],
|
"input_variables": ["history", "input"],
|
||||||
|
|
@ -590,7 +590,7 @@ def test_time_travel_guide_chain(client: TestClient):
|
||||||
assert template["prompt"] == {
|
assert template["prompt"] == {
|
||||||
"required": False,
|
"required": False,
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"show": True,
|
"show": False,
|
||||||
"multiline": False,
|
"multiline": False,
|
||||||
"value": {
|
"value": {
|
||||||
"input_variables": ["history", "input"],
|
"input_variables": ["history", "input"],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue