Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io
This commit is contained in:
commit
fce7b398f7
2 changed files with 8 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ def build_input_keys_response(langchain_object, artifacts):
|
||||||
input_keys_response = {
|
input_keys_response = {
|
||||||
"input_keys": {key: "" for key in langchain_object.input_keys},
|
"input_keys": {key: "" for key in langchain_object.input_keys},
|
||||||
"memory_keys": [],
|
"memory_keys": [],
|
||||||
|
"handle_keys": artifacts.get("handle_keys", []),
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the input keys values from artifacts
|
# Set the input keys values from artifacts
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,13 @@ def instantiate_prompt(node_type, class_object, params):
|
||||||
for item in variable
|
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
|
return prompt, format_kwargs
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue