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
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 feat(api/repo): Allow to config repository implementation (#21458) 7 months ago
app refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
base refactor: Remove RepositoryFactory (#19176) 9 months ago
callback_handler Refactor/message cycle manage and knowledge retrieval (#20460) 8 months ago
entities feat: add MCP support (#20716) 7 months ago
errors fix(core/errors): change base class of custom exceptions to ValueError (#11955) 1 year ago
extension refactor: Improve model status handling and structured output (#20586) 8 months ago
external_data_tool Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 9 months ago
file fix: resolve Docker file URL networking issue for plugins (#21334) (#21382) 7 months ago
helper fix: code result included "error" field (#22392) 7 months ago
llm_generator fix: add list contents handling in structured LLM output (#21837) 7 months ago
mcp minor fix: using Pydantic model_validate instead of deprecated parse_obj (#22239) 7 months ago
memory feat(api/repo): Allow to config repository implementation (#21458) 7 months ago
model_runtime feat: add support for dark icons in provider and tool entities (#22081) 7 months ago
moderation Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 9 months ago
ops improve opik workflow_trace span name to node name (#22356) 7 months ago
plugin fix(plugin): introduce response_type parameter in plugin list API to enable paginated response support (#22251) 7 months ago
prompt refactor(api): Separate SegmentType for Integer/Float to Enable Pydantic Serialization (#22025) 7 months ago
rag tablestore vector support more method (#22225) 7 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 chore(api/core): apply ruff reformatting (#7624) 1 year ago
hosting_configuration.py chore(provider_manager): Update hosted model's name (#14334) 11 months ago
indexing_runner.py fix: document delete image files check file exist (#21991) 7 months ago
model_manager.py unreachable-code for lb model fetch. (#20797) 8 months ago
provider_manager.py refactor: Improve model status handling and structured output (#20586) 8 months ago