Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix variable-truncator max size comments (#27129)

hj242382229c7d36
diff --git a/api/configs/feature/__init__.py b/api/configs/feature/__init__.py
index 6ce72e80df5..a02f8a4d49e 100644
--- a/api/configs/feature/__init__.py
+++ b/api/configs/feature/__init__.py
@@ -548,7 +548,7 @@ class UpdateConfig(BaseSettings):
class WorkflowVariableTruncationConfig(BaseSettings):
WORKFLOW_VARIABLE_TRUNCATION_MAX_SIZE: PositiveInt = Field(
- # 100KB
+ # 1000 KiB
1024_000,
description="Maximum size for variable to trigger final truncation.",
)
diff --git a/api/services/variable_truncator.py b/api/services/variable_truncator.py
index d02508e4f34..a8f37c31c84 100644
--- a/api/services/variable_truncator.py
+++ b/api/services/variable_truncator.py
@@ -79,7 +79,7 @@ class VariableTruncator:
self,
string_length_limit=5000,
array_element_limit: int = 20,
- max_size_bytes: int = 1024_000, # 100KB
+ max_size_bytes: int = 1024_000, # 1000 KiB
):
if string_length_limit <= 3:
raise ValueError("string_length_limit should be greater than 3.")