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/controllers/console/app
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.
8 months ago
..
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2 years ago
advanced_prompt_template.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
agent.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
annotation.py Minor Improvements for File Validation and Configuration Handling #21179 (#21171) 9 months ago
app.py Revert "fix: fix duplicate app lose custom image" (#19995) 10 months ago
app_import.py feat: use default access mode when importing dsl (#21231) 9 months ago
audio.py fix: Before publish the app, preview the voice of tts, it raise an er… (#21821) 9 months ago
completion.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
conversation.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
conversation_variables.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
error.py catch openai rate limit error (#7658) 2 years ago
generator.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
mcp_server.py minor fix: wrong and (#22242) 8 months ago
message.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
model_config.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
ops_trace.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
site.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
statistic.py fix: conversatino statistic including data from debugger (#22412) 8 months ago
workflow.py feat: Persist Variables for Enhanced Debugging Workflow (#20699) 9 months ago
workflow_app_log.py Add Filter of Get Workflow Logs (#21172) 9 months ago
workflow_draft_variable.py refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 8 months ago
workflow_run.py feat(workflow): domain model for workflow node execution (#19430) 10 months ago
workflow_statistic.py chore: avoid repeated type ignore noqa by adding flask_restful and flask_login in mypy import exclusions (#19224) 11 months ago
wraps.py feat(api/repo): Allow to config repository implementation (#21458) 8 months ago