Skip to content

Commit 24d16a7

Browse files
fix: Fix the Parameter Extraction node responded with incorrect attribute names when parameters were not extracted
1 parent 55d1590 commit 24d16a7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/application/flow/step_node/parameter_extraction_node/impl/base_parameter_extraction_node.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def generate_content(input_variable, variable_list):
6262
return value
6363

6464

65-
def json_loads(response, expected_fields):
65+
def json_loads(response, variable_list):
6666
if not response or not isinstance(response, str):
67-
return {field: None for field in expected_fields}
67+
return generate_example(variable_list)
6868

6969
cleaned = response.strip()
7070

@@ -79,7 +79,7 @@ def json_loads(response, expected_fields):
7979
return result
8080
except:
8181
continue
82-
return generate_example(expected_fields)
82+
return generate_example(variable_list)
8383

8484

8585
class BaseParameterExtractionNode(IParameterExtractionNode):

0 commit comments

Comments
 (0)