Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io

This commit is contained in:
Lucas Oliveira 2023-06-29 20:30:44 -03:00
commit fce7b398f7
2 changed files with 8 additions and 0 deletions

View file

@ -30,6 +30,7 @@ def build_input_keys_response(langchain_object, artifacts):
input_keys_response = {
"input_keys": {key: "" for key in langchain_object.input_keys},
"memory_keys": [],
"handle_keys": artifacts.get("handle_keys", []),
}
# Set the input keys values from artifacts

View file

@ -142,6 +142,13 @@ def instantiate_prompt(node_type, class_object, params):
for item in variable
]
)
# handle_keys will be a list but it does not exist yet
# so we need to create it
if "handle_keys" not in params:
format_kwargs["handle_keys"] = []
# Add the handle_keys to the list
format_kwargs["handle_keys"].append(input_variable)
return prompt, format_kwargs