vellum-ai 0.14.66__py3-none-any.whl → 0.14.67__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,7 @@ from vellum.workflows.references.state_value import StateValueReference
38
38
  from vellum.workflows.references.vellum_secret import VellumSecretReference
39
39
  from vellum.workflows.references.workflow_input import WorkflowInputReference
40
40
  from vellum.workflows.types.core import JsonArray, JsonObject
41
+ from vellum.workflows.types.generics import is_workflow_class
41
42
  from vellum.workflows.utils.uuids import uuid4_from_hash
42
43
  from vellum_ee.workflows.display.utils.exceptions import UnsupportedSerializationException
43
44
 
@@ -300,6 +301,22 @@ def serialize_value(display_context: "WorkflowDisplayContext", value: Any) -> Js
300
301
  else:
301
302
  return {"type": "DICTIONARY_REFERENCE", "entries": cast(JsonArray, serialized_entries)}
302
303
 
304
+ if is_workflow_class(value):
305
+ from vellum_ee.workflows.display.workflows.get_vellum_workflow_display_class import get_workflow_display
306
+
307
+ workflow_display = get_workflow_display(workflow_class=value)
308
+ value = workflow_display.serialize()
309
+ return {
310
+ "type": "CONSTANT_VALUE",
311
+ "value": {
312
+ "type": "JSON",
313
+ "value": {
314
+ "type": "INLINE_WORKFLOW",
315
+ "exec_config": value,
316
+ },
317
+ },
318
+ }
319
+
303
320
  if not isinstance(value, BaseDescriptor):
304
321
  vellum_value = primitive_to_vellum_value(value)
305
322
  return {