Merge branch 'main' into feat/rag-2

This commit is contained in:
twwu
2025-08-22 17:40:34 +08:00
113 changed files with 1945 additions and 269 deletions

View File

@ -126,7 +126,7 @@ class SegmentType(StrEnum):
"""
if self.is_array_type():
return self._validate_array(value, array_validation)
elif self == SegmentType.NUMBER:
elif self in [SegmentType.INTEGER, SegmentType.FLOAT, SegmentType.NUMBER]:
return isinstance(value, (int, float))
elif self == SegmentType.STRING:
return isinstance(value, str)
@ -166,7 +166,6 @@ _ARRAY_TYPES = frozenset(
]
)
_NUMERICAL_TYPES = frozenset(
[
SegmentType.NUMBER,