fix artifact type

This commit is contained in:
italojohnny 2024-06-04 16:17:53 -03:00
commit 4f1c925d9a
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ def get_artifact_type(custom_component, build_result) -> str:
case str():
result = ArtifactType.TEXT
case dict():
case dict() | list():
result = ArtifactType.OBJECT
if result == ArtifactType.UNKNOWN:

View file

@ -134,5 +134,5 @@ async def instantiate_custom_component(params, user_id, vertex, fallback_to_env_
elif hasattr(raw, "model_dump"):
raw = raw.model_dump()
artifact = {"repr": custom_repr, "raw": raw, "type": get_artifact_type(custom_component.repr_value)}
artifact = {"repr": custom_repr, "raw": raw, "type": get_artifact_type(custom_component, build_result)}
return custom_component, build_result, artifact