feat:conversation variable support file array (#21174)

Co-authored-by: kino.lu <kino.lu@vipshop.com>
This commit is contained in:
kinoooolu 2025-06-19 10:26:38 +08:00 • committed by GitHub
commit 2bb19f85c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 89 additions and 76 deletions

View file

@ -101,6 +101,8 @@ def _build_variable_from_mapping(*, mapping: Mapping[str, Any], selector: Sequen
result = ArrayNumberVariable.model_validate(mapping)
case SegmentType.ARRAY_OBJECT if isinstance(value, list):
result = ArrayObjectVariable.model_validate(mapping)
case SegmentType.ARRAY_FILE if isinstance(value, list):
result = ArrayFileVariable.model_validate(mapping)
case _:
raise VariableError(f"not supported value type {value_type}")
if result.size > dify_config.MAX_VARIABLE_SIZE: