You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/api/core/workflow
QuantumGhost 2c1ab4879f
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025)
refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025)

This PR addresses serialization issues in the VariablePool model by separating the `value_type` tags for `IntegerSegment`/`FloatSegment` and `IntegerVariable`/`FloatVariable`. Previously, both Integer and Float types shared the same `SegmentType.NUMBER` tag, causing conflicts during serialization.

Key changes:
- Introduce distinct `value_type` tags for Integer and Float segments/variables
- Add `VariableUnion` and `SegmentUnion` types for proper type discrimination
- Leverage Pydantic's discriminated union feature for seamless serialization/deserialization
- Enable accurate serialization of data structures containing these types

Closes #22024.
7 months ago
..
callbacks update worklow events logs. (#19871) 7 months ago
entities refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
graph_engine refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
nodes refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
repositories fix(api): Fix resetting sys var causing internal server error (#21604) 7 months ago
utils refactor: move structured output support outside LLM Node (#21565) 7 months ago
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2 years ago
constants.py feat/enhance the multi-modal support (#8818) 1 year ago
conversation_variable_updater.py feat: Persist Variables for Enhanced Debugging Workflow (#20699) 8 months ago
enums.py refactor(api/core/workflow/enums): Rename WORKFLOW_RUN_ID to WORKFLOW_EXECUTION_ID (#20459) 8 months ago
errors.py feat/enhance the multi-modal support (#8818) 1 year ago
system_variable.py refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
variable_loader.py fix(api): adding variable to variable pool recursively while loading draft variables. (#21478) 7 months ago
workflow_cycle_manager.py refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
workflow_engine_manager.py feat: Parallel Execution of Nodes in Workflows (#8192) 1 year ago
workflow_entry.py refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
workflow_type_encoder.py feat: Persist Variables for Enhanced Debugging Workflow (#20699) 8 months ago