Commit Graph

14 Commits (17da96bdd8083bdd0635b765231d3c04621d7064)

Author SHA1 Message Date
zxhlyh e0e0a7661d merge main 10 months ago
zxhlyh de47b56ca4 merge main 10 months ago
zxhlyh 01566035e3 merge main 10 months ago
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.
10 months ago
jyong efccbe4039 r2 10 months ago
jyong 1d2ee9020c r2 11 months ago
jyong 9cdd2cbb27 r2 11 months ago
jyong 7f59ffe7af r2 11 months ago
Bowen Liang cbc8ebd8f5
chore: bump pydantic to 2.11 and pydantic-settings to 2.9 (#15049) 1 year ago
yihong 56e15d09a9
feat: mypy for all type check (#10921) 1 year ago
-LAN- 094343739b
fix/array file cannot use in iteration node (#12035)
Signed-off-by: -LAN- <laipz8200@outlook.com>
1 year ago
-LAN- 9cfd1c67b6
fix: Introduce ArrayVariable and update iteration node to handle it (#12001)
Signed-off-by: -LAN- <laipz8200@outlook.com>
1 year ago
-LAN- 70c2ec8ed5
feat(variable-handling): enhance variable and segment conversion (#10483) 1 year ago
-LAN- e61752bd3a
feat/enhance the multi-modal support (#8818) 2 years ago