mirror of
https://github.com/langgenius/dify.git
synced 2026-04-24 17:16:37 +08:00
chore(api): Introduce variable truncation configuration
This commit is contained in:
parent
a10586c8ea
commit
0cf8a80bdd
@ -499,6 +499,22 @@ class UpdateConfig(BaseSettings):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class WorkflowVariableTruncationConfig(BaseSettings):
|
||||||
|
WORKFLOW_VARIABLE_TRUNCATION_MAX_SIZE: PositiveInt = Field(
|
||||||
|
# 100KB
|
||||||
|
1024_000,
|
||||||
|
description="Maximum size for variable to trigger final truncation.",
|
||||||
|
)
|
||||||
|
WORKFLOW_VARIABLE_TRUNCATION_STRING_LENGTH: PositiveInt = Field(
|
||||||
|
50000,
|
||||||
|
description="maximum length for string to trigger tuncation, measure in number of characters",
|
||||||
|
)
|
||||||
|
WORKFLOW_VARIABLE_TRUNCATION_ARRAY_LENGTH: PositiveInt = Field(
|
||||||
|
100,
|
||||||
|
description="maximum length for array to trigger truncation.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class WorkflowConfig(BaseSettings):
|
class WorkflowConfig(BaseSettings):
|
||||||
"""
|
"""
|
||||||
Configuration for workflow execution
|
Configuration for workflow execution
|
||||||
@ -1025,5 +1041,6 @@ class FeatureConfig(
|
|||||||
CeleryBeatConfig,
|
CeleryBeatConfig,
|
||||||
CeleryScheduleTasksConfig,
|
CeleryScheduleTasksConfig,
|
||||||
WorkflowLogConfig,
|
WorkflowLogConfig,
|
||||||
|
WorkflowVariableTruncationConfig,
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user