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/tests/unit_tests/core
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
..
agent/output_parser fix: code block syntax cannot be displayed correctly in react mode (#16904) 10 months ago
app fix(api): files not returned in the answer node (#21807) 7 months ago
file feat: Persist Variables for Enhanced Debugging Workflow (#20699) 8 months ago
helper test: add comprehensive unit tests for encrypter module (#22102) 7 months ago
mcp/client feat: add MCP support (#20716) 7 months ago
model_runtime fix: invalid new tool call creation logic during response handling in OAI-Compat model (#17781) 10 months ago
ops feat: add unit tests and validation for aliyun tracing (#22012) 7 months ago
prompt Refactor/remove db from cycle manager (#20455) 8 months ago
rag fix: markdown_extractor lost chunks if it starts without a header(#21308) (#21309) 8 months ago
repositories feat(api/repo): Allow to config repository implementation (#21458) 7 months ago
tools fix: generate deterministic operationId for root endpoints without one (#19888) 7 months ago
variables refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
workflow refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
__init__.py
test_file.py feat(llm_node): support order in text and files (#11837) 1 year ago
test_model_manager.py ext_redis.py support redis clusters --- Fixes #9538 (#9789) 1 year ago
test_provider_manager.py Introduce Plugins (#13836) 12 months ago