dify-player 0.3.6__tar.gz → 0.3.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dify_player-0.3.6 → dify_player-0.3.7}/PKG-INFO +1 -1
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/__init__.py +1 -1
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/if_else.py +6 -2
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/if_else.py +2 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/plan_loader.py +4 -2
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player.egg-info/PKG-INFO +1 -1
- {dify_player-0.3.6 → dify_player-0.3.7}/pyproject.toml +1 -1
- {dify_player-0.3.6 → dify_player-0.3.7}/MANIFEST.in +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/README.md +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/__main__.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/cli.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/__init__.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/graph_parser.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/http_body_converter.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/__init__.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/assigner.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/code.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/end.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/http_request.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/llm.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/loop.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/start.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/template_transform.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/variable_aggregator.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/plan_serializer.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/reference_converter.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/workflow_loader.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/workflow_normalizer.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_workflow_importer.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/event_logger.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/exceptions.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/input_resolver.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/llm_cache.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/models.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/__init__.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/assigner.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/code.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/end.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/http.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/llm_azure_chat.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/llm_groq_chat.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/llm_xai_chat.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/start.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/template.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/nodes/variable_aggregator.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/provider_config.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/runtime.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/value_renderer.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/workflow_engine.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player/workflow_executor.py +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player.egg-info/SOURCES.txt +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player.egg-info/dependency_links.txt +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player.egg-info/requires.txt +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/dify_player.egg-info/top_level.txt +0 -0
- {dify_player-0.3.6 → dify_player-0.3.7}/setup.cfg +0 -0
{dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/if_else.py
RENAMED
|
@@ -42,7 +42,7 @@ def convert_if_else_node(
|
|
|
42
42
|
)
|
|
43
43
|
comparison_operator = raw_condition.get("comparison_operator")
|
|
44
44
|
operator = _convert_comparison_operator(comparison_operator, node_id=node_id)
|
|
45
|
-
value = raw_condition.get("value")
|
|
45
|
+
value = raw_condition.get("value", "" if operator in {"empty", "not_empty"} else None)
|
|
46
46
|
if not isinstance(value, str):
|
|
47
47
|
raise PlanValidationError(
|
|
48
48
|
f"Dify if-else node {node_id!r} cases[{case_index}].conditions[{condition_index}].value must be a string"
|
|
@@ -88,4 +88,8 @@ def _convert_comparison_operator(raw_value: Any, *, node_id: str) -> str:
|
|
|
88
88
|
return "equals"
|
|
89
89
|
if raw_value == "empty":
|
|
90
90
|
return "empty"
|
|
91
|
-
|
|
91
|
+
if raw_value == "not empty":
|
|
92
|
+
return "not_empty"
|
|
93
|
+
raise PlanValidationError(
|
|
94
|
+
f"Dify if-else node {node_id!r} only supports comparison_operator=contains, '=', empty, or not empty"
|
|
95
|
+
)
|
|
@@ -41,6 +41,8 @@ def _matches_condition(*, condition: dict[str, Any], resolved_inputs: dict[str,
|
|
|
41
41
|
return str(condition["value"]) in str(left_value)
|
|
42
42
|
if condition["operator"] == "empty":
|
|
43
43
|
return _is_empty(left_value)
|
|
44
|
+
if condition["operator"] == "not_empty":
|
|
45
|
+
return not _is_empty(left_value)
|
|
44
46
|
if condition["operator"] == "equals":
|
|
45
47
|
return str(left_value) == str(condition["value"])
|
|
46
48
|
raise ValueError(f"unsupported if_else operator {condition['operator']!r}")
|
|
@@ -390,8 +390,10 @@ def _validate_if_else_config(*, node_id: str, node_name: str | None, config: dic
|
|
|
390
390
|
raise PlanValidationError(
|
|
391
391
|
f"if_else node {node_label!r} config.cases[{case_index}].conditions[{condition_index}] must be an object"
|
|
392
392
|
)
|
|
393
|
-
if condition.get("operator") not in {"contains", "empty", "equals"}:
|
|
394
|
-
raise PlanValidationError(
|
|
393
|
+
if condition.get("operator") not in {"contains", "empty", "equals", "not_empty"}:
|
|
394
|
+
raise PlanValidationError(
|
|
395
|
+
f"if_else node {node_label!r} only supports operator=contains, empty, equals, or not_empty"
|
|
396
|
+
)
|
|
395
397
|
input_name = condition.get("input_name")
|
|
396
398
|
if not isinstance(input_name, str) or not input_name:
|
|
397
399
|
raise PlanValidationError(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/__init__.py
RENAMED
|
File without changes
|
{dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/assigner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dify_player-0.3.6 → dify_player-0.3.7}/dify_player/dify_importer/node_converters/http_request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|