🐛 fix(loading.py): fix condition to remove empty input_key and output_key parameters
The condition to remove empty input_key and output_key parameters has been fixed to correctly handle cases where the parameters are empty strings. This ensures that the parameters are only removed if they are either empty strings or not present in the params dictionary.
This commit is contained in:
parent
7304b922b9
commit
da0cf30057
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ def instantiate_memory(node_type, class_object, params):
|
|||
# process input_key and output_key to remove them if
|
||||
# they are empty strings
|
||||
for key in ["input_key", "output_key"]:
|
||||
if key in params and not params[key]:
|
||||
if key in params and (params[key] == "" or not params[key]):
|
||||
params.pop(key)
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue