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/fields
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
..
__init__.py Feat/dataset service api (#1245) 2 years ago
_value_type_serializer.py refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
annotation_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
api_based_extension_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
app_fields.py feat: add MCP support (#20716) 7 months ago
conversation_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
conversation_variable_fields.py refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
data_source_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
dataset_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
document_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
end_user_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
file_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
hit_testing_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
installed_app_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
member_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
message_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
raws.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
segment_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
tag_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
workflow_app_log_fields.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 9 months ago
workflow_fields.py refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
workflow_run_fields.py fix(workflow_run): sequence_number race. (#21228) 8 months ago