Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io
This commit is contained in:
commit
657dfa1bb6
1 changed files with 7 additions and 11 deletions
|
|
@ -112,17 +112,13 @@ def instantiate_prompt(node_type, class_object, params):
|
||||||
|
|
||||||
prompt = class_object(**params)
|
prompt = class_object(**params)
|
||||||
|
|
||||||
# Now we go through input_variables
|
format_kwargs = {
|
||||||
# Check if they are in params, if so
|
input_variable: params[input_variable]
|
||||||
# get their values and set them
|
for input_variable in prompt.input_variables
|
||||||
format_kwargs = {}
|
if input_variable in params
|
||||||
for input_variable in prompt.input_variables:
|
}
|
||||||
if input_variable in params:
|
# if format_kwargs:
|
||||||
input_value = params[input_variable]
|
# prompt = prompt.partial(**format_kwargs)
|
||||||
format_kwargs[input_variable] = input_value
|
|
||||||
|
|
||||||
if format_kwargs:
|
|
||||||
prompt = prompt.partial(**format_kwargs)
|
|
||||||
|
|
||||||
return prompt, format_kwargs
|
return prompt, format_kwargs
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue