refactor(workflow): move variables package into core.workflow (#32750)

This commit is contained in:
-LAN-
2026-03-01 03:15:09 +08:00
committed by GitHub
parent 962df17a15
commit 1f0fca89a8
104 changed files with 201 additions and 245 deletions

View File

@ -2,8 +2,8 @@ from collections.abc import Mapping, Sequence
from typing import Any, Protocol
from core.model_runtime.entities.llm_entities import LLMUsage
from core.variables.segments import Segment
from core.workflow.system_variable import SystemVariableReadOnlyView
from core.workflow.variables.segments import Segment
class ReadOnlyVariablePool(Protocol):

View File

@ -5,8 +5,8 @@ from copy import deepcopy
from typing import Any
from core.model_runtime.entities.llm_entities import LLMUsage
from core.variables.segments import Segment
from core.workflow.system_variable import SystemVariableReadOnlyView
from core.workflow.variables.segments import Segment
from .graph_runtime_state import GraphRuntimeState
from .variable_pool import VariablePool

View File

@ -8,10 +8,6 @@ from typing import Annotated, Any, Union, cast
from pydantic import BaseModel, Field
from core.variables import Segment, SegmentGroup, VariableBase
from core.variables.consts import SELECTORS_LENGTH
from core.variables.segments import FileSegment, ObjectSegment
from core.variables.variables import RAGPipelineVariableInput, Variable
from core.workflow.constants import (
CONVERSATION_VARIABLE_NODE_ID,
ENVIRONMENT_VARIABLE_NODE_ID,
@ -20,6 +16,10 @@ from core.workflow.constants import (
)
from core.workflow.file import File, FileAttribute, file_manager
from core.workflow.system_variable import SystemVariable
from core.workflow.variables import Segment, SegmentGroup, VariableBase
from core.workflow.variables.consts import SELECTORS_LENGTH
from core.workflow.variables.segments import FileSegment, ObjectSegment
from core.workflow.variables.variables import RAGPipelineVariableInput, Variable
from factories import variable_factory
VariableValue = Union[str, int, float, dict[str, object], list[object], File]