vellum-ai 0.12.17__py3-none-any.whl → 0.13.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. vellum/__init__.py +10 -22
  2. vellum/client/__init__.py +8 -0
  3. vellum/client/core/client_wrapper.py +1 -1
  4. vellum/client/resources/__init__.py +4 -0
  5. vellum/client/resources/organizations/__init__.py +2 -0
  6. vellum/client/resources/organizations/client.py +116 -0
  7. vellum/client/resources/workspaces/__init__.py +2 -0
  8. vellum/client/resources/workspaces/client.py +114 -0
  9. vellum/client/types/__init__.py +6 -22
  10. vellum/client/types/new_member_join_behavior_enum.py +8 -0
  11. vellum/client/types/{function_call_variable_value.py → organization_read.py} +6 -4
  12. vellum/client/types/workflow_execution_workflow_result_event.py +0 -2
  13. vellum/client/types/workflow_result_event.py +0 -2
  14. vellum/client/types/workflow_result_event_output_data_array.py +4 -4
  15. vellum/client/types/{string_variable_value.py → workspace_read.py} +12 -5
  16. vellum/{types/json_variable_value.py → resources/organizations/__init__.py} +1 -1
  17. vellum/resources/organizations/client.py +3 -0
  18. vellum/{types/image_variable_value.py → resources/workspaces/__init__.py} +1 -1
  19. vellum/{types/array_variable_value.py → resources/workspaces/client.py} +1 -1
  20. vellum/types/{array_variable_value_item.py → new_member_join_behavior_enum.py} +1 -1
  21. vellum/types/{audio_variable_value.py → organization_read.py} +1 -1
  22. vellum/types/{error_variable_value.py → workspace_read.py} +1 -1
  23. vellum/workflows/workflows/base.py +0 -32
  24. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/METADATA +1 -1
  25. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/RECORD +69 -76
  26. vellum_ee/workflows/display/nodes/base_node_display.py +17 -10
  27. vellum_ee/workflows/display/nodes/vellum/api_node.py +1 -0
  28. vellum_ee/workflows/display/nodes/vellum/base_node.py +97 -2
  29. vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -0
  30. vellum_ee/workflows/display/nodes/vellum/conditional_node.py +5 -62
  31. vellum_ee/workflows/display/nodes/vellum/error_node.py +1 -0
  32. vellum_ee/workflows/display/nodes/vellum/final_output_node.py +1 -0
  33. vellum_ee/workflows/display/nodes/vellum/guardrail_node.py +1 -0
  34. vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py +1 -0
  35. vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py +1 -0
  36. vellum_ee/workflows/display/nodes/vellum/map_node.py +1 -0
  37. vellum_ee/workflows/display/nodes/vellum/merge_node.py +1 -0
  38. vellum_ee/workflows/display/nodes/vellum/note_node.py +1 -0
  39. vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py +1 -0
  40. vellum_ee/workflows/display/nodes/vellum/search_node.py +1 -0
  41. vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py +1 -0
  42. vellum_ee/workflows/display/nodes/vellum/templating_node.py +1 -0
  43. vellum_ee/workflows/display/nodes/vellum/utils.py +63 -0
  44. vellum_ee/workflows/display/tests/test_vellum_workflow_display.py +2 -5
  45. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/conftest.py +18 -2
  46. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py +355 -0
  47. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_trigger_serialization.py +37 -22
  48. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py +12 -56
  49. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py +43 -93
  50. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py +31 -151
  51. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_error_node_serialization.py +8 -26
  52. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_generic_node_serialization.py +4 -15
  53. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py +9 -44
  54. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subworkflow_serialization.py +19 -101
  55. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py +19 -73
  56. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_merge_node_serialization.py +9 -44
  57. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_prompt_deployment_serialization.py +9 -44
  58. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py +8 -6
  59. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_subworkflow_deployment_serialization.py +11 -58
  60. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_templating_node_serialization.py +8 -11
  61. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_terminal_node_serialization.py +7 -30
  62. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_serialization.py +2 -11
  63. vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py +9 -44
  64. vellum_ee/workflows/display/vellum.py +2 -7
  65. vellum_ee/workflows/display/workflows/vellum_workflow_display.py +5 -9
  66. vellum_ee/workflows/server/virtual_file_loader.py +3 -3
  67. vellum/client/types/array_variable_value.py +0 -27
  68. vellum/client/types/array_variable_value_item.py +0 -29
  69. vellum/client/types/audio_variable_value.py +0 -25
  70. vellum/client/types/chat_history_variable_value.py +0 -21
  71. vellum/client/types/error_variable_value.py +0 -21
  72. vellum/client/types/image_variable_value.py +0 -25
  73. vellum/client/types/json_variable_value.py +0 -20
  74. vellum/client/types/number_variable_value.py +0 -20
  75. vellum/client/types/search_results_variable_value.py +0 -21
  76. vellum/types/chat_history_variable_value.py +0 -3
  77. vellum/types/function_call_variable_value.py +0 -3
  78. vellum/types/number_variable_value.py +0 -3
  79. vellum/types/search_results_variable_value.py +0 -3
  80. vellum/types/string_variable_value.py +0 -3
  81. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/LICENSE +0 -0
  82. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/WHEEL +0 -0
  83. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/entry_points.txt +0 -0
@@ -54,7 +54,8 @@ def test_serialize_workflow_with_filepath():
54
54
  "inputs": [],
55
55
  "data": {"label": "Entrypoint Node", "source_handle_id": "118e4298-aa79-467c-b8b4-2df540905e86"},
56
56
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
57
- "definition": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []},
57
+ "base": None,
58
+ "definition": None,
58
59
  }
59
60
 
60
61
  code_execution_node = workflow_raw_data["nodes"][1]
@@ -97,26 +98,19 @@ def test_serialize_workflow_with_filepath():
97
98
  "log_output_id": "7cac05e3-b7c3-475e-8df8-422b496c3398",
98
99
  },
99
100
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
100
- "definition": {
101
- "bases": [
102
- {
103
- "module": [
104
- "vellum",
105
- "workflows",
106
- "nodes",
107
- "displayable",
108
- "code_execution_node",
109
- "node",
110
- ],
111
- "name": "CodeExecutionNode",
112
- }
113
- ],
101
+ "base": {
114
102
  "module": [
115
- "tests",
103
+ "vellum",
116
104
  "workflows",
117
- "basic_code_execution_node",
118
- "workflow",
105
+ "nodes",
106
+ "displayable",
107
+ "code_execution_node",
108
+ "node",
119
109
  ],
110
+ "name": "CodeExecutionNode",
111
+ },
112
+ "definition": {
113
+ "module": ["tests", "workflows", "basic_code_execution_node", "workflow"],
120
114
  "name": "SimpleCodeExecutionNode",
121
115
  },
122
116
  }
@@ -152,13 +146,11 @@ def test_serialize_workflow_with_filepath():
152
146
  }
153
147
  ],
154
148
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
155
- "definition": {
149
+ "base": {
156
150
  "name": "FinalOutputNode",
157
151
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
158
- "bases": [
159
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
160
- ],
161
152
  },
153
+ "definition": None,
162
154
  },
163
155
  {
164
156
  "id": "c6e3aced-1fc9-48d2-ae55-d2a880e359cb",
@@ -190,13 +182,11 @@ def test_serialize_workflow_with_filepath():
190
182
  }
191
183
  ],
192
184
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
193
- "definition": {
185
+ "base": {
194
186
  "name": "FinalOutputNode",
195
187
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
196
- "bases": [
197
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
198
- ],
199
188
  },
189
+ "definition": None,
200
190
  },
201
191
  ],
202
192
  workflow_raw_data["nodes"][2:],
@@ -304,7 +294,8 @@ def test_serialize_workflow_with_code():
304
294
  "inputs": [],
305
295
  "data": {"label": "Entrypoint Node", "source_handle_id": "e82390bb-c68c-48c1-9f87-7fbfff494c45"},
306
296
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
307
- "definition": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []},
297
+ "base": None,
298
+ "definition": None,
308
299
  }
309
300
 
310
301
  code_execution_node = workflow_raw_data["nodes"][1]
@@ -347,15 +338,13 @@ def test_serialize_workflow_with_code():
347
338
  "log_output_id": "7cac05e3-b7c3-475e-8df8-422b496c3398",
348
339
  },
349
340
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
341
+ "base": {
342
+ "name": "CodeExecutionNode",
343
+ "module": ["vellum", "workflows", "nodes", "displayable", "code_execution_node", "node"],
344
+ },
350
345
  "definition": {
351
346
  "name": "SimpleCodeExecutionNode",
352
347
  "module": ["tests", "workflows", "basic_code_execution_node", "workflow_with_code"],
353
- "bases": [
354
- {
355
- "name": "CodeExecutionNode",
356
- "module": ["vellum", "workflows", "nodes", "displayable", "code_execution_node", "node"],
357
- }
358
- ],
359
348
  },
360
349
  }
361
350
  assert not DeepDiff(
@@ -390,13 +379,11 @@ def test_serialize_workflow_with_code():
390
379
  }
391
380
  ],
392
381
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
393
- "definition": {
382
+ "base": {
394
383
  "name": "FinalOutputNode",
395
384
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
396
- "bases": [
397
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
398
- ],
399
385
  },
386
+ "definition": None,
400
387
  },
401
388
  {
402
389
  "id": "eccf97c7-e766-471f-9703-4d2595800e66",
@@ -428,13 +415,11 @@ def test_serialize_workflow_with_code():
428
415
  }
429
416
  ],
430
417
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
431
- "definition": {
418
+ "base": {
432
419
  "name": "FinalOutputNode",
433
420
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
434
- "bases": [
435
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
436
- ],
437
421
  },
422
+ "definition": None,
438
423
  },
439
424
  ],
440
425
  workflow_raw_data["nodes"][2:],
@@ -539,17 +524,8 @@ def test_serialize_workflow__try_wrapped():
539
524
  "label": "Entrypoint Node",
540
525
  "source_handle_id": "8cd1e612-39aa-4471-88cf-f7999b713fa6",
541
526
  },
542
- "definition": {
543
- "bases": [],
544
- "module": [
545
- "vellum",
546
- "workflows",
547
- "nodes",
548
- "bases",
549
- "base",
550
- ],
551
- "name": "BaseNode",
552
- },
527
+ "base": None,
528
+ "definition": None,
553
529
  "display_data": {
554
530
  "position": {"x": 0.0, "y": 0.0},
555
531
  },
@@ -595,20 +571,18 @@ def test_serialize_workflow__try_wrapped():
595
571
  "log_output_id": "7cac05e3-b7c3-475e-8df8-422b496c3398",
596
572
  },
597
573
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
598
- "definition": {
599
- "bases": [
600
- {
601
- "module": [
602
- "vellum",
603
- "workflows",
604
- "nodes",
605
- "displayable",
606
- "code_execution_node",
607
- "node",
608
- ],
609
- "name": "CodeExecutionNode",
610
- }
574
+ "base": {
575
+ "module": [
576
+ "vellum",
577
+ "workflows",
578
+ "nodes",
579
+ "displayable",
580
+ "code_execution_node",
581
+ "node",
611
582
  ],
583
+ "name": "CodeExecutionNode",
584
+ },
585
+ "definition": {
612
586
  "module": [
613
587
  "tests",
614
588
  "workflows",
@@ -627,20 +601,7 @@ def test_serialize_workflow__try_wrapped():
627
601
  {
628
602
  "id": "af4fc1ef-7701-43df-b5e7-4f354f707db2",
629
603
  "type": "TERMINAL",
630
- "definition": {
631
- "bases": [
632
- {
633
- "bases": [],
634
- "module": [
635
- "vellum",
636
- "workflows",
637
- "nodes",
638
- "bases",
639
- "base",
640
- ],
641
- "name": "BaseNode",
642
- },
643
- ],
604
+ "base": {
644
605
  "module": [
645
606
  "vellum",
646
607
  "workflows",
@@ -651,6 +612,7 @@ def test_serialize_workflow__try_wrapped():
651
612
  ],
652
613
  "name": "FinalOutputNode",
653
614
  },
615
+ "definition": None,
654
616
  "data": {
655
617
  "label": "Final Output",
656
618
  "name": "log",
@@ -682,20 +644,7 @@ def test_serialize_workflow__try_wrapped():
682
644
  {
683
645
  "id": "4cbfa5f7-fc12-4ab2-81cb-168c5caef4f0",
684
646
  "type": "TERMINAL",
685
- "definition": {
686
- "bases": [
687
- {
688
- "bases": [],
689
- "module": [
690
- "vellum",
691
- "workflows",
692
- "nodes",
693
- "bases",
694
- "base",
695
- ],
696
- "name": "BaseNode",
697
- },
698
- ],
647
+ "base": {
699
648
  "module": [
700
649
  "vellum",
701
650
  "workflows",
@@ -706,6 +655,7 @@ def test_serialize_workflow__try_wrapped():
706
655
  ],
707
656
  "name": "FinalOutputNode",
708
657
  },
658
+ "definition": None,
709
659
  "data": {
710
660
  "label": "Final Output",
711
661
  "name": "result",
@@ -104,17 +104,8 @@ def test_serialize_workflow():
104
104
  assert entrypoint_node == {
105
105
  "id": "089b3201-537a-4ed7-8d15-2524a00e8534",
106
106
  "type": "ENTRYPOINT",
107
- "definition": {
108
- "bases": [],
109
- "module": [
110
- "vellum",
111
- "workflows",
112
- "nodes",
113
- "bases",
114
- "base",
115
- ],
116
- "name": "BaseNode",
117
- },
107
+ "base": None,
108
+ "definition": None,
118
109
  "inputs": [],
119
110
  "data": {
120
111
  "label": "Entrypoint Node",
@@ -426,22 +417,13 @@ def test_serialize_workflow():
426
417
  "version": "2",
427
418
  },
428
419
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
420
+ "base": {
421
+ "name": "ConditionalNode",
422
+ "module": ["vellum", "workflows", "nodes", "displayable", "conditional_node", "node"],
423
+ },
429
424
  "definition": {
430
425
  "name": "CategoryConditionalNode",
431
426
  "module": ["tests", "workflows", "basic_conditional_node", "workflow"],
432
- "bases": [
433
- {
434
- "name": "ConditionalNode",
435
- "module": [
436
- "vellum",
437
- "workflows",
438
- "nodes",
439
- "displayable",
440
- "conditional_node",
441
- "node",
442
- ],
443
- }
444
- ],
445
427
  },
446
428
  },
447
429
  conditional_node,
@@ -456,20 +438,7 @@ def test_serialize_workflow():
456
438
  {
457
439
  "id": "9c22ee47-01da-4e4e-863d-b4a6874bed66",
458
440
  "type": "TERMINAL",
459
- "definition": {
460
- "bases": [
461
- {
462
- "bases": [],
463
- "module": [
464
- "vellum",
465
- "workflows",
466
- "nodes",
467
- "bases",
468
- "base",
469
- ],
470
- "name": "BaseNode",
471
- },
472
- ],
441
+ "base": {
473
442
  "module": [
474
443
  "vellum",
475
444
  "workflows",
@@ -480,6 +449,7 @@ def test_serialize_workflow():
480
449
  ],
481
450
  "name": "FinalOutputNode",
482
451
  },
452
+ "definition": None,
483
453
  "data": {
484
454
  "label": "Final Output",
485
455
  "name": "statement",
@@ -511,20 +481,7 @@ def test_serialize_workflow():
511
481
  {
512
482
  "id": "47f0931c-41f6-4b84-bf39-0c486941f599",
513
483
  "type": "TERMINAL",
514
- "definition": {
515
- "bases": [
516
- {
517
- "bases": [],
518
- "module": [
519
- "vellum",
520
- "workflows",
521
- "nodes",
522
- "bases",
523
- "base",
524
- ],
525
- "name": "BaseNode",
526
- },
527
- ],
484
+ "base": {
528
485
  "module": [
529
486
  "vellum",
530
487
  "workflows",
@@ -535,6 +492,7 @@ def test_serialize_workflow():
535
492
  ],
536
493
  "name": "FinalOutputNode",
537
494
  },
495
+ "definition": None,
538
496
  "data": {
539
497
  "label": "Final Output",
540
498
  "name": "compliment",
@@ -566,20 +524,7 @@ def test_serialize_workflow():
566
524
  {
567
525
  "id": "e3d29229-f746-4125-819e-f847acbed307",
568
526
  "type": "TERMINAL",
569
- "definition": {
570
- "bases": [
571
- {
572
- "bases": [],
573
- "module": [
574
- "vellum",
575
- "workflows",
576
- "nodes",
577
- "bases",
578
- "base",
579
- ],
580
- "name": "BaseNode",
581
- },
582
- ],
527
+ "base": {
583
528
  "module": [
584
529
  "vellum",
585
530
  "workflows",
@@ -590,6 +535,7 @@ def test_serialize_workflow():
590
535
  ],
591
536
  "name": "FinalOutputNode",
592
537
  },
538
+ "definition": None,
593
539
  "data": {
594
540
  "label": "Final Output",
595
541
  "name": "complaint",
@@ -621,20 +567,7 @@ def test_serialize_workflow():
621
567
  {
622
568
  "id": "6efa7b45-0580-406d-85aa-439117ba8021",
623
569
  "type": "TERMINAL",
624
- "definition": {
625
- "bases": [
626
- {
627
- "bases": [],
628
- "module": [
629
- "vellum",
630
- "workflows",
631
- "nodes",
632
- "bases",
633
- "base",
634
- ],
635
- "name": "BaseNode",
636
- },
637
- ],
570
+ "base": {
638
571
  "module": [
639
572
  "vellum",
640
573
  "workflows",
@@ -645,6 +578,7 @@ def test_serialize_workflow():
645
578
  ],
646
579
  "name": "FinalOutputNode",
647
580
  },
581
+ "definition": None,
648
582
  "data": {
649
583
  "label": "Final Output",
650
584
  "name": "fallthrough",
@@ -676,20 +610,7 @@ def test_serialize_workflow():
676
610
  {
677
611
  "id": "fa11b84b-1d76-4adc-ab28-cbbaa933c267",
678
612
  "type": "TERMINAL",
679
- "definition": {
680
- "bases": [
681
- {
682
- "bases": [],
683
- "module": [
684
- "vellum",
685
- "workflows",
686
- "nodes",
687
- "bases",
688
- "base",
689
- ],
690
- "name": "BaseNode",
691
- },
692
- ],
613
+ "base": {
693
614
  "module": [
694
615
  "vellum",
695
616
  "workflows",
@@ -700,6 +621,7 @@ def test_serialize_workflow():
700
621
  ],
701
622
  "name": "FinalOutputNode",
702
623
  },
624
+ "definition": None,
703
625
  "data": {
704
626
  "label": "Final Output",
705
627
  "name": "question",
@@ -977,27 +899,13 @@ def test_conditional_node_serialize_all_operators_with_lhs_and_rhs(descriptor, o
977
899
  "version": "2",
978
900
  },
979
901
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
902
+ "base": {
903
+ "name": "ConditionalNode",
904
+ "module": ["vellum", "workflows", "nodes", "displayable", "conditional_node", "node"],
905
+ },
980
906
  "definition": {
981
907
  "name": "SimpleConditionalNode",
982
- "module": [
983
- "tests",
984
- "workflows",
985
- "basic_conditional_node",
986
- "workflow_with_only_one_conditional_node",
987
- ],
988
- "bases": [
989
- {
990
- "name": "ConditionalNode",
991
- "module": [
992
- "vellum",
993
- "workflows",
994
- "nodes",
995
- "displayable",
996
- "conditional_node",
997
- "node",
998
- ],
999
- }
1000
- ],
908
+ "module": ["tests", "workflows", "basic_conditional_node", "workflow_with_only_one_conditional_node"],
1001
909
  },
1002
910
  },
1003
911
  conditional_node,
@@ -1083,27 +991,13 @@ def test_conditional_node_serialize_all_operators_with_expression(descriptor, op
1083
991
  "version": "2",
1084
992
  },
1085
993
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
994
+ "base": {
995
+ "name": "ConditionalNode",
996
+ "module": ["vellum", "workflows", "nodes", "displayable", "conditional_node", "node"],
997
+ },
1086
998
  "definition": {
1087
999
  "name": "SimpleConditionalNode",
1088
- "module": [
1089
- "tests",
1090
- "workflows",
1091
- "basic_conditional_node",
1092
- "workflow_with_only_one_conditional_node",
1093
- ],
1094
- "bases": [
1095
- {
1096
- "name": "ConditionalNode",
1097
- "module": [
1098
- "vellum",
1099
- "workflows",
1100
- "nodes",
1101
- "displayable",
1102
- "conditional_node",
1103
- "node",
1104
- ],
1105
- }
1106
- ],
1000
+ "module": ["tests", "workflows", "basic_conditional_node", "workflow_with_only_one_conditional_node"],
1107
1001
  },
1108
1002
  },
1109
1003
  conditional_node,
@@ -1202,27 +1096,13 @@ def test_conditional_node_serialize_all_operators_with_value_and_start_and_end(d
1202
1096
  "version": "2",
1203
1097
  },
1204
1098
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
1099
+ "base": {
1100
+ "name": "ConditionalNode",
1101
+ "module": ["vellum", "workflows", "nodes", "displayable", "conditional_node", "node"],
1102
+ },
1205
1103
  "definition": {
1206
1104
  "name": "SimpleConditionalNode",
1207
- "module": [
1208
- "tests",
1209
- "workflows",
1210
- "basic_conditional_node",
1211
- "workflow_with_only_one_conditional_node",
1212
- ],
1213
- "bases": [
1214
- {
1215
- "name": "ConditionalNode",
1216
- "module": [
1217
- "vellum",
1218
- "workflows",
1219
- "nodes",
1220
- "displayable",
1221
- "conditional_node",
1222
- "node",
1223
- ],
1224
- }
1225
- ],
1105
+ "module": ["tests", "workflows", "basic_conditional_node", "workflow_with_only_one_conditional_node"],
1226
1106
  },
1227
1107
  },
1228
1108
  conditional_node,
@@ -72,11 +72,8 @@ def test_serialize_workflow():
72
72
  "source_handle_id": "7d86498b-84ed-4feb-8e62-2188058c2c4e",
73
73
  },
74
74
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
75
- "definition": {
76
- "name": "BaseNode",
77
- "module": ["vellum", "workflows", "nodes", "bases", "base"],
78
- "bases": [],
79
- },
75
+ "base": None,
76
+ "definition": None,
80
77
  }
81
78
 
82
79
  error_node, error_index = next(
@@ -100,22 +97,13 @@ def test_serialize_workflow():
100
97
  "error_output_id": "None",
101
98
  },
102
99
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
100
+ "base": {
101
+ "name": "ErrorNode",
102
+ "module": ["vellum", "workflows", "nodes", "core", "error_node", "node"],
103
+ },
103
104
  "definition": {
104
105
  "name": "FailNode",
105
106
  "module": ["tests", "workflows", "basic_error_node", "workflow"],
106
- "bases": [
107
- {
108
- "name": "ErrorNode",
109
- "module": [
110
- "vellum",
111
- "workflows",
112
- "nodes",
113
- "core",
114
- "error_node",
115
- "node",
116
- ],
117
- }
118
- ],
119
107
  },
120
108
  },
121
109
  error_node,
@@ -157,7 +145,7 @@ def test_serialize_workflow():
157
145
  }
158
146
  ],
159
147
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
160
- "definition": {
148
+ "base": {
161
149
  "name": "FinalOutputNode",
162
150
  "module": [
163
151
  "vellum",
@@ -167,14 +155,8 @@ def test_serialize_workflow():
167
155
  "final_output_node",
168
156
  "node",
169
157
  ],
170
- "bases": [
171
- {
172
- "name": "BaseNode",
173
- "module": ["vellum", "workflows", "nodes", "bases", "base"],
174
- "bases": [],
175
- }
176
- ],
177
158
  },
159
+ "definition": None,
178
160
  },
179
161
  terminal_node,
180
162
  )
@@ -65,17 +65,8 @@ def test_serialize_workflow(vellum_client):
65
65
  "inputs": [],
66
66
  "data": {"label": "Entrypoint Node", "source_handle_id": "40201804-8beb-43ad-8873-a027759512f1"},
67
67
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
68
- "definition": {
69
- "name": "BaseNode",
70
- "module": [
71
- "vellum",
72
- "workflows",
73
- "nodes",
74
- "bases",
75
- "base",
76
- ],
77
- "bases": [],
78
- },
68
+ "base": None,
69
+ "definition": None,
79
70
  }
80
71
 
81
72
  api_node = workflow_raw_data["nodes"][1]
@@ -113,13 +104,11 @@ def test_serialize_workflow(vellum_client):
113
104
  }
114
105
  ],
115
106
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
116
- "definition": {
107
+ "base": {
117
108
  "name": "FinalOutputNode",
118
109
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
119
- "bases": [
120
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
121
- ],
122
110
  },
111
+ "definition": None,
123
112
  },
124
113
  final_output_node,
125
114
  ignore_order=True,