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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. vellum/client/core/client_wrapper.py +1 -1
  2. vellum/client/core/pydantic_utilities.py +5 -0
  3. vellum/client/resources/workflows/client.py +8 -0
  4. vellum/client/types/logical_operator.py +2 -0
  5. vellum/workflows/descriptors/base.py +1 -1
  6. vellum/workflows/descriptors/tests/test_utils.py +3 -0
  7. vellum/workflows/expressions/accessor.py +8 -2
  8. vellum/workflows/nodes/core/map_node/node.py +49 -24
  9. vellum/workflows/nodes/core/map_node/tests/test_node.py +4 -4
  10. vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py +1 -1
  11. vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py +5 -3
  12. vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py +3 -0
  13. vellum/workflows/nodes/displayable/bases/search_node.py +37 -2
  14. vellum/workflows/nodes/displayable/bases/tests/__init__.py +0 -0
  15. vellum/workflows/nodes/displayable/bases/tests/test_utils.py +61 -0
  16. vellum/workflows/nodes/displayable/bases/types.py +42 -0
  17. vellum/workflows/nodes/displayable/bases/utils.py +112 -0
  18. vellum/workflows/nodes/displayable/inline_prompt_node/tests/test_node.py +0 -1
  19. vellum/workflows/nodes/displayable/search_node/tests/__init__.py +0 -0
  20. vellum/workflows/nodes/displayable/search_node/tests/test_node.py +164 -0
  21. vellum/workflows/nodes/displayable/tests/test_inline_text_prompt_node.py +2 -3
  22. vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +0 -1
  23. vellum/workflows/runner/runner.py +37 -4
  24. vellum/workflows/types/tests/test_utils.py +5 -2
  25. vellum/workflows/types/utils.py +4 -0
  26. vellum/workflows/workflows/base.py +14 -0
  27. {vellum_ai-0.13.0.dist-info → vellum_ai-0.13.1.dist-info}/METADATA +1 -1
  28. {vellum_ai-0.13.0.dist-info → vellum_ai-0.13.1.dist-info}/RECORD +46 -36
  29. vellum_cli/__init__.py +10 -0
  30. vellum_cli/ping.py +28 -0
  31. vellum_cli/tests/test_ping.py +47 -0
  32. vellum_ee/workflows/display/nodes/vellum/base_node.py +22 -9
  33. vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py +3 -0
  34. vellum_ee/workflows/display/nodes/vellum/map_node.py +1 -1
  35. vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py +14 -10
  36. vellum_ee/workflows/display/nodes/vellum/tests/test_utils.py +2 -2
  37. vellum_ee/workflows/display/nodes/vellum/utils.py +8 -1
  38. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_adornments_serialization.py +67 -0
  39. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py +66 -0
  40. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py +660 -0
  41. vellum_ee/workflows/display/utils/vellum.py +4 -42
  42. vellum_ee/workflows/display/vellum.py +7 -36
  43. vellum_ee/workflows/display/workflows/vellum_workflow_display.py +2 -1
  44. {vellum_ai-0.13.0.dist-info → vellum_ai-0.13.1.dist-info}/LICENSE +0 -0
  45. {vellum_ai-0.13.0.dist-info → vellum_ai-0.13.1.dist-info}/WHEEL +0 -0
  46. {vellum_ai-0.13.0.dist-info → vellum_ai-0.13.1.dist-info}/entry_points.txt +0 -0
@@ -1,16 +1,18 @@
1
1
  vellum_cli/CONTRIBUTING.md,sha256=FtDC7BGxSeMnwCXAUssFsAIElXtmJE-O5Z7BpolcgvI,2935
2
2
  vellum_cli/README.md,sha256=2NudRoLzWxNKqnuVy1JuQ7DerIaxWGYkrH8kMd-asIE,90
3
- vellum_cli/__init__.py,sha256=7liY2AX5t51Vd_usohIU6QSLjAsF6MaHD30L6ng9SSg,8926
3
+ vellum_cli/__init__.py,sha256=9iXxS2FmJ0KbreuoBMc5Eh4TnShP12EpSN-xp433M8w,9177
4
4
  vellum_cli/aliased_group.py,sha256=ugW498j0yv4ALJ8vS9MsO7ctDW7Jlir9j6nE_uHAP8c,3363
5
5
  vellum_cli/config.py,sha256=998IZbvkrw2avjbvs8bw6NrbEgGz5UBKRbvKAcastJg,5493
6
6
  vellum_cli/image_push.py,sha256=SJwhwWJsLjwGNezNVd_oCVpFMfPsAB3dfLWmriZZUtw,4419
7
7
  vellum_cli/logger.py,sha256=PuRFa0WCh4sAGFS5aqWB0QIYpS6nBWwPJrIXpWxugV4,1022
8
+ vellum_cli/ping.py,sha256=lWyJw6sziXjyTopTYRdFF5hV-sYPVDdX0yVbG5fzcY4,585
8
9
  vellum_cli/pull.py,sha256=zf0y22XptUYI_hMP_4Q1CEo9s2wALsTJcCXNd-_ibd8,7551
9
10
  vellum_cli/push.py,sha256=iQ2H-vY8njqiYgIifGooqopqkb1BUUA3I7IN7VIHKv8,6149
10
11
  vellum_cli/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
12
  vellum_cli/tests/conftest.py,sha256=Jv-QUjXoCDhsvVvXEjOenNqRArO_xXhtNuCYt4wiOyE,1421
12
13
  vellum_cli/tests/test_config.py,sha256=uvKGDc8BoVyT9_H0Z-g8469zVxomn6Oi3Zj-vK7O_wU,2631
13
14
  vellum_cli/tests/test_main.py,sha256=qDZG-aQauPwBwM6A2DIu1494n47v3pL28XakTbLGZ-k,272
15
+ vellum_cli/tests/test_ping.py,sha256=QtbhYKMYn1DFnDyBij2mkQO32j9KOpZ5Pf0yek7k_Ao,1284
14
16
  vellum_cli/tests/test_pull.py,sha256=6gbASF6ASy5YcdWjOCt6b5K0u2VWsFegdrTWu6sEVKs,19613
15
17
  vellum_cli/tests/test_push.py,sha256=8o8DFW9HCakhfZMS1Iql13RC90hF9pM630Y-rQbo234,8593
16
18
  vellum_ee/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -28,31 +30,33 @@ vellum_ee/workflows/display/nodes/types.py,sha256=St1BB6no528OyELGiyRabWao0GGw6m
28
30
  vellum_ee/workflows/display/nodes/utils.py,sha256=sloya5TpXsnot1HURc9L51INwflRqUzHxRVnCS9Cd-4,973
29
31
  vellum_ee/workflows/display/nodes/vellum/__init__.py,sha256=_raKY9eKi_OvIFn6nGvf9xKSboKtYLHCWaWCwDQFbOc,1567
30
32
  vellum_ee/workflows/display/nodes/vellum/api_node.py,sha256=hoV-cUtS6H9kmRQXHd2py95GRWI_dAnnaPwvlNBkDOQ,8571
31
- vellum_ee/workflows/display/nodes/vellum/base_node.py,sha256=kyoRUm4jYzpHA20X8S4GkjCq2-eANJQTSK5lkRcIloU,5659
33
+ vellum_ee/workflows/display/nodes/vellum/base_node.py,sha256=5jsLW-xPSDq20QMd1QfP-1wKOC6LqEKdQgRT81RSH3I,6343
32
34
  vellum_ee/workflows/display/nodes/vellum/code_execution_node.py,sha256=z00Z3L0d4PsUQo4S8FRDTtOFLtjdi17TJbatNVF4nM8,4288
33
35
  vellum_ee/workflows/display/nodes/vellum/conditional_node.py,sha256=UJtdeppJFrrgJi48soO1-r5eaKTOExjYCrEx_YCsvtU,10486
34
36
  vellum_ee/workflows/display/nodes/vellum/error_node.py,sha256=Tyx74dUmj_ef0slptoUXHtkjLbNd3f4hXeoEozFaFcw,2023
35
37
  vellum_ee/workflows/display/nodes/vellum/final_output_node.py,sha256=p-PvlnxpBQ7IKskZi2A19jKAtKnSxJ8LPbGMA83VkFk,2805
36
38
  vellum_ee/workflows/display/nodes/vellum/guardrail_node.py,sha256=aYZSJTxknU4LMiQdWk9LcK6CkhdozeDEMiRxfAyUNEc,2202
37
- vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py,sha256=9oJzrgSAO_roFSQ3mlHkmSgdw5IgSa9f30kwq10aejc,7247
39
+ vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py,sha256=h8K183cZsU2b86WYQlqFtwMkwIHydnNr4ZaaQcWnFWo,7316
38
40
  vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py,sha256=9858pFzuhkAAmLcw4gkt5mPvsqWk5vqcX_vwHOg2xZw,5610
39
- vellum_ee/workflows/display/nodes/vellum/map_node.py,sha256=HKnImWY1qVaY46RpWt746oZAtCfQhRCwDTMVRwzOyxE,3736
41
+ vellum_ee/workflows/display/nodes/vellum/map_node.py,sha256=VlO3UwkspCOdDQ-h3v8k16-7JZwWNSLpOLT4p-eirIs,3740
40
42
  vellum_ee/workflows/display/nodes/vellum/merge_node.py,sha256=HkNMgdQELiON42jdO-xDLmqrEKdGx1RVqrz2DXNTLS8,3239
41
43
  vellum_ee/workflows/display/nodes/vellum/note_node.py,sha256=TMb8txILu2uWjzoxaghjgjlzeBAgzn4vkP_8zSh2qoE,1151
42
- vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py,sha256=YK5N6vGqfTfly0lUFy70-3HqkCmIjUEkpLmYjLMhZmA,3164
44
+ vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py,sha256=LFjLUrH6sJ4czPnExdRqFr0PB_yKBMLXLvK5GAzIAgc,3273
43
45
  vellum_ee/workflows/display/nodes/vellum/search_node.py,sha256=EaoYGbLMLogsP2JsRq1lSAM3AMNxeapXRBfMseNhCbE,9115
44
46
  vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py,sha256=lfevlHpGEX14dEDym6qmnkw3nvzQPTB1_D2ch12B_Rk,2701
45
47
  vellum_ee/workflows/display/nodes/vellum/templating_node.py,sha256=JVIMPR3WpveOCWZubHKZkE04mavnTdb_9QY_r3XliRg,3424
46
48
  vellum_ee/workflows/display/nodes/vellum/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- vellum_ee/workflows/display/nodes/vellum/tests/test_utils.py,sha256=JPZKf7irQ38Dus5bWV_ysKkG97z0oeqP57lOptA-dPk,3881
49
+ vellum_ee/workflows/display/nodes/vellum/tests/test_utils.py,sha256=Nqd6mxn0sgL4sp62wDYnQVc7COxrt5wXXIveRFoYQ8c,3913
48
50
  vellum_ee/workflows/display/nodes/vellum/try_node.py,sha256=hB8dcGMGkuC95kk9hmZUgHsCLwEA37fHTFXj0JzbRjM,4692
49
- vellum_ee/workflows/display/nodes/vellum/utils.py,sha256=OciFnPil7s58UF5RuzrAINRxg_GP8uxTZavJexoJ7_c,8006
51
+ vellum_ee/workflows/display/nodes/vellum/utils.py,sha256=nIZ1DYTYPRaYsVKcel9a-Fm8EniJL0N7f5PowxVGTVU,8318
50
52
  vellum_ee/workflows/display/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
53
  vellum_ee/workflows/display/tests/test_vellum_workflow_display.py,sha256=PNns-_fXMR2amAvM39Lkc_yXLAh06U2kaHeCxV_abdI,1576
52
54
  vellum_ee/workflows/display/tests/workflow_serialization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
55
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
56
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/conftest.py,sha256=RatRmgd1O7OX1r2QfMLPs-WvGQpPLfXIjWNGE4s0yLE,2186
55
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py,sha256=k7ZVsRYHowu6VfODPJL27YviMdLjznYzi3ubD9Ap7g8,12449
57
+ vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_adornments_serialization.py,sha256=MtKRKcPJsUJ3le7PLz9H6iH3vmRBZDRy6c-4LUF76zE,1987
58
+ vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py,sha256=3Rzj7m0O_BwrZQOj3TiJIjp0sk7Sa_mhXVK4fNURvYA,2020
59
+ vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py,sha256=aDkWS_cXNgxz9TkvJXbNzw10WxGnE_Mj6ODtZQz6TOo,37217
56
60
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_trigger_serialization.py,sha256=1oOLjUxr7jJzNvMEsLOAKhuGIBiIf8IAkNc5cSlTStQ,4476
57
61
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py,sha256=bXZWxOKAVjZlbP3iLHPHGA4aPs0EguKlQqmYPNGv3cU,16391
58
62
  vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py,sha256=UPLEQPwsLzOqZdkXrB5Jo1FdCx0iQNf7ekfcq1byoFw,29392
@@ -72,12 +76,12 @@ vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_ser
72
76
  vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py,sha256=wQ97k-y9rZwKYlZSA6Z9XGUnGRaJ5BvCFu5QnhuEp4A,7404
73
77
  vellum_ee/workflows/display/types.py,sha256=-ninso8Yf2EBn_RkFhpOEOjRhX2bYgCeMWssHoEgPRg,2248
74
78
  vellum_ee/workflows/display/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
- vellum_ee/workflows/display/utils/vellum.py,sha256=72wyR_ngYjirPYT8kFDxVPtRdHT7FpzBpsjoGMh1q0c,5053
76
- vellum_ee/workflows/display/vellum.py,sha256=obPj48h2ie72r5NmBI9mO3ivDITg_H0RQxvb8cWDBLI,8849
79
+ vellum_ee/workflows/display/utils/vellum.py,sha256=N5VSDYdtHUxvTeSj4zA8aMiAAKn4bAVgpKUDV_obNQ8,3632
80
+ vellum_ee/workflows/display/vellum.py,sha256=8xXRI8b8Tt661H-iZreTQTvLNEKUr4lf-XaKhE7_yUY,8147
77
81
  vellum_ee/workflows/display/workflows/__init__.py,sha256=kapXsC67VJcgSuiBMa86FdePG5A9kMB5Pi4Uy1O2ob4,207
78
82
  vellum_ee/workflows/display/workflows/base_workflow_display.py,sha256=u5u_KnDp_ktLBlfkT5wiGHIloodSlUT3D3_DQXijtMA,13735
79
83
  vellum_ee/workflows/display/workflows/get_vellum_workflow_display_class.py,sha256=kp0u8LN_2IwshLrhMImhpZx1hRyAcD5gXY-kDuuaGMQ,1269
80
- vellum_ee/workflows/display/workflows/vellum_workflow_display.py,sha256=nsDyzrftDOZ5jSXf7qVyoqRNveWAikfuKAZFO1yXZmo,16748
84
+ vellum_ee/workflows/display/workflows/vellum_workflow_display.py,sha256=xwFkPG_vYqVd3bUPhaYbfirLbN3vlDxPaxJ_33ADrck,16806
81
85
  vellum_ee/workflows/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
86
  vellum_ee/workflows/server/virtual_file_loader.py,sha256=X_DdNK7MfyOjKWekk6YQpOSCT6klKcdjT6nVJcBH1sM,1481
83
87
  vellum/__init__.py,sha256=iwoL3PQsiTvtX79J4qlAJ2EIqZ77zYJm3q7o1Ei3Awo,35398
@@ -85,12 +89,12 @@ vellum/client/README.md,sha256=JkCJjmMZl4jrPj46pkmL9dpK4gSzQQmP5I7z4aME4LY,4749
85
89
  vellum/client/__init__.py,sha256=8nZt88C9SVwWanjLbIQMU3rzb32h5UZfFMBx3VPHB50,111887
86
90
  vellum/client/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
87
91
  vellum/client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
88
- vellum/client/core/client_wrapper.py,sha256=ELBh9wg18RagUfX8FhO8NI53Uiup-MZiY3l6428mgq0,1868
92
+ vellum/client/core/client_wrapper.py,sha256=GjSMbrCyeaeaduT1VW1zMQYR48NPqQEDnuhO3I88JWo,1868
89
93
  vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
90
94
  vellum/client/core/file.py,sha256=X9IbmkZmB2bB_DpmZAO3crWdXagOakAyn6UCOCImCPg,2322
91
95
  vellum/client/core/http_client.py,sha256=R0pQpCppnEtxccGvXl4uJ76s7ro_65Fo_erlNNLp_AI,19228
92
96
  vellum/client/core/jsonable_encoder.py,sha256=qaF1gtgH-kQZb4kJskETwcCsOPUof-NnYVdszHkb-dM,3656
93
- vellum/client/core/pydantic_utilities.py,sha256=Pj_AIcjRR-xc28URvV4t2XssDPjLvpN6HAcsY3MVLRM,11973
97
+ vellum/client/core/pydantic_utilities.py,sha256=vPw05-aAxUB_jinMTmP7m8dAjRurZ8XqNZruXZdWORs,12056
94
98
  vellum/client/core/query_encoder.py,sha256=ekulqNd0j8TgD7ox-Qbz7liqX8-KP9blvT9DsRCenYM,2144
95
99
  vellum/client/core/remove_none_from_dict.py,sha256=EU9SGgYidWq7SexuJbNs4-PZ-5Bl3Vppd864mS6vQZw,342
96
100
  vellum/client/core/request_options.py,sha256=5cCGt5AEGgtP5xifDl4oVQUmSjlIA8FmRItAlJawM18,1417
@@ -141,7 +145,7 @@ vellum/client/resources/workflow_deployments/types/workflow_deployments_list_req
141
145
  vellum/client/resources/workflow_sandboxes/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
142
146
  vellum/client/resources/workflow_sandboxes/client.py,sha256=3wVQxkjrJ5bIS8fB5FpKXCP2dX38299ghWrJ8YmXxwQ,7435
143
147
  vellum/client/resources/workflows/__init__.py,sha256=Z4xi8Nxd9U4t35FQSepTt1p-ns0X1xtdNs168kUcuBk,153
144
- vellum/client/resources/workflows/client.py,sha256=4TOVbNauZ7x84rot3FBo8KKqmjd1mMGKLLXE7BRFEK0,11179
148
+ vellum/client/resources/workflows/client.py,sha256=9y2Tak0kduS0D1yu57FlgvV_svJZzJlRbGTJ6bz-QuA,11419
145
149
  vellum/client/resources/workflows/types/__init__.py,sha256=-uFca4ypncAOvfsg6sjD-5C9zWdA5qNvU6m675GphVg,177
146
150
  vellum/client/resources/workflows/types/workflows_pull_request_format.py,sha256=dOWE_jnDnniIJLoeseeCms23aklghyBkoPmBFzcqqZk,165
147
151
  vellum/client/resources/workspace_secrets/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
@@ -317,7 +321,7 @@ vellum/client/types/json_input.py,sha256=ZUA2O9YueBCx0IMMdB8uYNSWJiSDZxMm5ogwbwC
317
321
  vellum/client/types/json_input_request.py,sha256=x5sA-VXxF4QH-98xRcIKPZhsMVbnJNUQofiUQqyfGk4,768
318
322
  vellum/client/types/json_vellum_value.py,sha256=8irlw6NkRRVafysfTc1Q5BFFhRrWJYzdwrDYTdJK4JY,689
319
323
  vellum/client/types/json_vellum_value_request.py,sha256=IUlkdwFGgBeLl9sCmAJhoaxomWiEMpWgRcLa_WnlK8g,696
320
- vellum/client/types/logical_operator.py,sha256=a3a-5tP9vkZWqz2NqccZuJfB3R3fVpRnn97ejAbh1jM,567
324
+ vellum/client/types/logical_operator.py,sha256=3IJNJf8Esrq8-RzcgUJgeM6qns1RHdk01DG7gYs3Az8,596
321
325
  vellum/client/types/logprobs_enum.py,sha256=D_458cZX2CAb6dX_ovrQ6HARlJkYcZRadKwsi1Cr-JM,151
322
326
  vellum/client/types/map_node_result.py,sha256=e2YqEP-aKig2TbbZIlfn5LCeVEVhEJJBR7o7xTBKXaY,752
323
327
  vellum/client/types/map_node_result_data.py,sha256=3xJXC1JrS9lo3-3_u1S79sYwLxMknNntDyspN24vQzY,699
@@ -1223,8 +1227,8 @@ vellum/workflows/__init__.py,sha256=CssPsbNvN6rDhoLuqpEv7MMKGa51vE6dvAh6U31Pcio,
1223
1227
  vellum/workflows/constants.py,sha256=Z0W4YlqfSlSgWC11PrVUPs6ZOBeIaQ78E_90J1hohiw,789
1224
1228
  vellum/workflows/context.py,sha256=R8qdsFbD_0p7B6PWnyvSrZ_aOgMtGw-_uk0P0UAmwLA,1230
1225
1229
  vellum/workflows/descriptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1226
- vellum/workflows/descriptors/base.py,sha256=BhYd5O9_3fjS_Vet9Q2_kyUJCySHGVM_HWaOBtctkNA,14320
1227
- vellum/workflows/descriptors/tests/test_utils.py,sha256=1CFx6Yejrg_AlwSO6kqGjuav4-ZubCLN0u4NtR3KgCk,4510
1230
+ vellum/workflows/descriptors/base.py,sha256=gSib3vJpcI_UC8y8jhdp-hOK3_TGTF-SuwdhxF6x5iQ,14332
1231
+ vellum/workflows/descriptors/tests/test_utils.py,sha256=63w1P6PELNhWzpg1BqL8y2XQZ8XRt0RUkHgLcsXyOQE,4592
1228
1232
  vellum/workflows/descriptors/utils.py,sha256=lO_dbr5g3PXpHPtVBkdguAK4-1qayZ7RXjl3BgAhrMM,3795
1229
1233
  vellum/workflows/edges/__init__.py,sha256=wSkmAnz9xyi4vZwtDbKxwlplt2skD7n3NsxkvR_pUus,50
1230
1234
  vellum/workflows/edges/edge.py,sha256=N0SnY3gKVuxImPAdCbPMPlHJIXbkQ3fwq_LbJRvVMFc,677
@@ -1242,7 +1246,7 @@ vellum/workflows/events/types.py,sha256=cjRE8WL8tYCFradd9NOGl_H0mN3LiWWnA1uHmyT2
1242
1246
  vellum/workflows/events/workflow.py,sha256=l5tXes0sg7iWaA1ZUE5dtAqNnGQ8iy6trVbOU9meu7U,5240
1243
1247
  vellum/workflows/exceptions.py,sha256=l-FLGvXywxg6ivolCts71b8pcsYAWoB1cmUR4Jx7N8g,614
1244
1248
  vellum/workflows/expressions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1245
- vellum/workflows/expressions/accessor.py,sha256=OFvAHAVABr-k7GceIhtzIurV4OuV_yHft7JPRsq87Es,1472
1249
+ vellum/workflows/expressions/accessor.py,sha256=daIkEudAdyiqCOzO9x_3cy-Y9ilYgNWSEeqcFelkjI0,1743
1246
1250
  vellum/workflows/expressions/and_.py,sha256=I7lNqrUM3-m_5hmjjiMhaHhJtKcLj39kEFVWPDOqwfo,916
1247
1251
  vellum/workflows/expressions/begins_with.py,sha256=Ae-RBz_0Xr1WiX1EP0mSgCOOUo-ji1A85aAGd-4BscY,1012
1248
1252
  vellum/workflows/expressions/between.py,sha256=xjc_-TLDN-25tVQ9k9aZciH0wOfqrXV8qNmyGOhimd8,1365
@@ -1291,9 +1295,9 @@ vellum/workflows/nodes/core/inline_subworkflow_node/node.py,sha256=XJLz7Kkk4OwrM
1291
1295
  vellum/workflows/nodes/core/inline_subworkflow_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1292
1296
  vellum/workflows/nodes/core/inline_subworkflow_node/tests/test_node.py,sha256=n0-821Ov9ZfRFX_lbzLy5o2rX8fEw2qoxz0aFWCOxVg,1547
1293
1297
  vellum/workflows/nodes/core/map_node/__init__.py,sha256=MXpZYmGfhsMJHqqlpd64WiJRtbAtAMQz-_3fCU_cLV0,56
1294
- vellum/workflows/nodes/core/map_node/node.py,sha256=DTMoGqtR8MyfZ8jy8apNoN-4KFFFHywo87pfpqyBVEw,7322
1298
+ vellum/workflows/nodes/core/map_node/node.py,sha256=bjCVMAzkqJUvaLWVBObjskcutwLGrgfTMHXcAcOnra8,8085
1295
1299
  vellum/workflows/nodes/core/map_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1296
- vellum/workflows/nodes/core/map_node/tests/test_node.py,sha256=RHSZs7t6mW3UWvRrXnHZqaXVdRT2ZquOK_YHJ-gzXsU,1871
1300
+ vellum/workflows/nodes/core/map_node/tests/test_node.py,sha256=P7ImQyeLcK-aEJUYCX1gPQyuOxdxnSPpI3mNPpKQ62Y,1919
1297
1301
  vellum/workflows/nodes/core/retry_node/__init__.py,sha256=lN2bIy5a3Uzhs_FYCrooADyYU6ZGShtvLKFWpelwPvo,60
1298
1302
  vellum/workflows/nodes/core/retry_node/node.py,sha256=QEpxhKOyxDkRoAn2b0PToZWtAGQetSQYVTpb9yCOLlw,4028
1299
1303
  vellum/workflows/nodes/core/retry_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -1312,12 +1316,16 @@ vellum/workflows/nodes/displayable/bases/__init__.py,sha256=0mWIx3qUrzllV7jqt7wN
1312
1316
  vellum/workflows/nodes/displayable/bases/api_node/__init__.py,sha256=1jwx4WC358CLA1jgzl_UD-rZmdMm2v9Mps39ndwCD7U,64
1313
1317
  vellum/workflows/nodes/displayable/bases/api_node/node.py,sha256=ywPwCxDesgnE86Wjyf2ZyG2Dr2O7xW8D4tPHZB5Se_s,2477
1314
1318
  vellum/workflows/nodes/displayable/bases/base_prompt_node/__init__.py,sha256=Org3xTvgp1pA0uUXFfnJr29D3HzCey2lEdYF4zbIUgo,70
1315
- vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py,sha256=EvylK1rGKpd4iiooEW9O5A9Q8DMTtBwETe_GtQT8M-E,2139
1319
+ vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py,sha256=w9HfUhVHtF3Y95duj9bsAj5XHmObN6S6vvfI67u7RyY,2156
1316
1320
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/__init__.py,sha256=Hl35IAoepRpE-j4cALaXVJIYTYOF3qszyVbxTj4kS1s,82
1317
1321
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/constants.py,sha256=fnjiRWLoRlC4Puo5oQcpZD5Hd-EesxsAo9l5tGAkpZQ,270
1318
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py,sha256=fypgmZHgaDtGqSBC8rjYiyryJ0H58LPt_CafLfAprO0,6341
1319
- vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py,sha256=zdpNJoawB5PedsCCfgOGDDoWuif0jNtlV-K9sFL6cNQ,4968
1320
- vellum/workflows/nodes/displayable/bases/search_node.py,sha256=huhfEaolvf8TTzRyFqAyO1t0Vgqt0kcEOcbAChvvix0,3427
1322
+ vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py,sha256=TKoxReiGGQfafwrZyy7FLvVGYPlk_NT-bTRX04ozRB8,6311
1323
+ vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py,sha256=rm23ZebJ4nj3wakfLI8bcuHZAydXCk1d7IPdXhiQHys,5039
1324
+ vellum/workflows/nodes/displayable/bases/search_node.py,sha256=m37Ukjb75U6e5ehxV9YKz8r0J1e3p_Tv-f8pTvaH4RI,5245
1325
+ vellum/workflows/nodes/displayable/bases/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1326
+ vellum/workflows/nodes/displayable/bases/tests/test_utils.py,sha256=uQM9RTVmC-fMQ4hd4481QZbviokshwYSxk1ee9leh3A,2406
1327
+ vellum/workflows/nodes/displayable/bases/types.py,sha256=4G0xULiaQ8E1JMWjxesW3iPNm6s-7Gpqb6phFc8wB_U,1699
1328
+ vellum/workflows/nodes/displayable/bases/utils.py,sha256=hlbIRLAAeqRhzZPLK7WDvBzUT2b6tupaXYOF54iYvS0,4973
1321
1329
  vellum/workflows/nodes/displayable/code_execution_node/__init__.py,sha256=0FLWMMktpzSnmBMizQglBpcPrP80fzVsoJwJgf822Cg,76
1322
1330
  vellum/workflows/nodes/displayable/code_execution_node/node.py,sha256=JgyTgZRSb-gSXL4ccHn4VkPcPZFOkVK5ohPazPqSWFw,8652
1323
1331
  vellum/workflows/nodes/displayable/code_execution_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -1334,7 +1342,7 @@ vellum/workflows/nodes/displayable/guardrail_node/node.py,sha256=7Ep7Ff7FtFry3Jw
1334
1342
  vellum/workflows/nodes/displayable/inline_prompt_node/__init__.py,sha256=gSUOoEZLlrx35-tQhSAd3An8WDwBqyiQh-sIebLU9wU,74
1335
1343
  vellum/workflows/nodes/displayable/inline_prompt_node/node.py,sha256=OPjdEK5mL3D2cwL68GiBFlRJ2b0tgatxsfeUEPeQDxI,2146
1336
1344
  vellum/workflows/nodes/displayable/inline_prompt_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1337
- vellum/workflows/nodes/displayable/inline_prompt_node/tests/test_node.py,sha256=eobyGcb4hMdmmyk-CcJPpOAB-NSVMUCleWVSmuHmMiQ,4752
1345
+ vellum/workflows/nodes/displayable/inline_prompt_node/tests/test_node.py,sha256=57JYbHvfZAjEGfa4CvYSpAt5yLDj0bPIr1_RoG8n9oI,4725
1338
1346
  vellum/workflows/nodes/displayable/merge_node/__init__.py,sha256=J8IC08dSH7P76wKlNuxe1sn7toNGtSQdFirUbtPDEs0,60
1339
1347
  vellum/workflows/nodes/displayable/merge_node/node.py,sha256=ZyPvcTgfPOneOm5Dc2kUOoPkwNJqwRPZSj232akXynA,324
1340
1348
  vellum/workflows/nodes/displayable/note_node/__init__.py,sha256=KWA3P4fyYJ-fOTky8qNGlcOotQ-HeHJ9AjZt6mRQmCE,58
@@ -1343,12 +1351,14 @@ vellum/workflows/nodes/displayable/prompt_deployment_node/__init__.py,sha256=krX
1343
1351
  vellum/workflows/nodes/displayable/prompt_deployment_node/node.py,sha256=cpOrqQQanZ0xO4B4B3mgyBWKcnkT5b0DFxOSeS8otrI,2528
1344
1352
  vellum/workflows/nodes/displayable/search_node/__init__.py,sha256=hpBpvbrDYf43DElRZFLzieSn8weXiwNiiNOJurERQbs,62
1345
1353
  vellum/workflows/nodes/displayable/search_node/node.py,sha256=yhFWulbNmSQoDAwtTSGD4AtKmBbcykezRGRG16xga_0,1311
1354
+ vellum/workflows/nodes/displayable/search_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1355
+ vellum/workflows/nodes/displayable/search_node/tests/test_node.py,sha256=FQOZxSLv-KkMDD6jZWXKFL-SsxvSNTEwqgpIGzjy13M,6048
1346
1356
  vellum/workflows/nodes/displayable/subworkflow_deployment_node/__init__.py,sha256=9yYM6001YZeqI1VOk1QuEM_yrffk_EdsO7qaPzINKds,92
1347
1357
  vellum/workflows/nodes/displayable/subworkflow_deployment_node/node.py,sha256=FgS1ZMnIBliqEMNKX2ChE80bw4IVHEQ6IGiTDvF0RZw,7226
1348
1358
  vellum/workflows/nodes/displayable/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1349
- vellum/workflows/nodes/displayable/tests/test_inline_text_prompt_node.py,sha256=UI_RMmXn9qwB-StnFPvkDd9FctBQAg43wrfouqvPepk,4701
1359
+ vellum/workflows/nodes/displayable/tests/test_inline_text_prompt_node.py,sha256=CI7iMyyIlnds1rkVSjICOFg2UY0yV51NTKtKpfeEME4,4677
1350
1360
  vellum/workflows/nodes/displayable/tests/test_search_node_wth_text_output.py,sha256=VepO5z1277c1y5N6LLIC31nnWD1aak2m5oPFplfJHHs,6935
1351
- vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py,sha256=KqKJtJ0vuNoPuUPMdILmBTt4a2fBBxxun-nmOI7T8jo,2585
1361
+ vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py,sha256=wOd5WvQdcwiqcmXExQr95QtIhSgpB6F3EfjybBuTw9E,2558
1352
1362
  vellum/workflows/nodes/experimental/README.md,sha256=eF6DfIL8t-HbF9-mcofOMymKrraiBHDLKTlnBa51ZiE,284
1353
1363
  vellum/workflows/nodes/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1354
1364
  vellum/workflows/nodes/experimental/openai_chat_completion_node/__init__.py,sha256=lsyD9laR9p7kx5-BXGH2gUTM242UhKy8SMV0SR6S2iE,90
@@ -1375,7 +1385,7 @@ vellum/workflows/references/workflow_input.py,sha256=86IuhlBz-9cGxeUzizyjdp482aj
1375
1385
  vellum/workflows/resolvers/__init__.py,sha256=eH6hTvZO4IciDaf_cf7aM2vs-DkBDyJPycOQevJxQnI,82
1376
1386
  vellum/workflows/resolvers/base.py,sha256=WHra9LRtlTuB1jmuNqkfVE2JUgB61Cyntn8f0b0WZg4,411
1377
1387
  vellum/workflows/runner/__init__.py,sha256=i1iG5sAhtpdsrlvwgH6B-m49JsINkiWyPWs8vyT-bqM,72
1378
- vellum/workflows/runner/runner.py,sha256=wS9GulRM8f77sQ9-FlDpHjQJgoMLt0cTDRSTpucTyr0,28139
1388
+ vellum/workflows/runner/runner.py,sha256=LvP1UwLmwV1nCZYYrsiwtCzay73voMp1TDRVVBrlMj8,29196
1379
1389
  vellum/workflows/sandbox.py,sha256=GVJzVjMuYzOBnSrboB0_6MMRZWBluAyQ2o7syeaeBd0,2235
1380
1390
  vellum/workflows/state/__init__.py,sha256=yUUdR-_Vl7UiixNDYQZ-GEM_kJI9dnOia75TtuNEsnE,60
1381
1391
  vellum/workflows/state/base.py,sha256=jpSzF1OQd3-fqi6dMGlNsQl-7JnJxCdzWIigmX8Wz-I,14425
@@ -1392,8 +1402,8 @@ vellum/workflows/types/cycle_map.py,sha256=-ZMQsKzZBpCi0bchJrkuN_dtCFuz9uFABy7Fq
1392
1402
  vellum/workflows/types/generics.py,sha256=ZkfoRhWs042i5IjA99v2wIhmh1u-Wieo3LzosgGWJVk,600
1393
1403
  vellum/workflows/types/stack.py,sha256=RDSGLkcV612ge8UuAH9TZiEGXxJt0Av2-H5rfzrTVVI,1014
1394
1404
  vellum/workflows/types/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1395
- vellum/workflows/types/tests/test_utils.py,sha256=t6eqTSZqw2oVkIw6lP393qVmuyzjZZ62Ls1iELwZg_o,2434
1396
- vellum/workflows/types/utils.py,sha256=Vk_itjV8YrfoT_Pm_x7QMvBdpCTr_XBTlszqZkQQJLw,5587
1405
+ vellum/workflows/types/tests/test_utils.py,sha256=y2bj4O8-ykPRRRocdD98NdnQz6ydSCoMBp6rECPPqE8,2536
1406
+ vellum/workflows/types/utils.py,sha256=mSlcgIr8q_qMCtSCdPxcduRntL_5hk4ptFGq3K0EVgw,5801
1397
1407
  vellum/workflows/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1398
1408
  vellum/workflows/utils/functions.py,sha256=7A4BImhtY__qQpNrF5uPiwLfkj6PSUxYvF7ITigIkxY,4051
1399
1409
  vellum/workflows/utils/names.py,sha256=QLUqfJ1tmSEeUwBKTTiv_Qk3QGbInC2RSmlXfGXc8Wo,380
@@ -1406,10 +1416,10 @@ vellum/workflows/utils/uuids.py,sha256=DFzPv9RCvsKhvdTEIQyfSek2A31D6S_QcmeLPbgrg
1406
1416
  vellum/workflows/utils/vellum_variables.py,sha256=g5xHYB8etfHE32ek19nP6Anf8NyjhmUtOwO2KmQ5xZU,3111
1407
1417
  vellum/workflows/vellum_client.py,sha256=ODrq_TSl-drX2aezXegf7pizpWDVJuTXH-j6528t75s,683
1408
1418
  vellum/workflows/workflows/__init__.py,sha256=KY45TqvavCCvXIkyCFMEc0dc6jTMOUci93U2DUrlZYc,66
1409
- vellum/workflows/workflows/base.py,sha256=BVLyaqBgS6TgL90CvaePoGgtUHwm9aLXN9LNusny98A,17507
1419
+ vellum/workflows/workflows/base.py,sha256=k0kUWWko4fHyCqLSU_1cBK_pXZpl9MXekWiG-bdOAo0,18353
1410
1420
  vellum/workflows/workflows/event_filters.py,sha256=GSxIgwrX26a1Smfd-6yss2abGCnadGsrSZGa7t7LpJA,2008
1411
- vellum_ai-0.13.0.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
1412
- vellum_ai-0.13.0.dist-info/METADATA,sha256=Tpl2aYBmIoJgvLgaN88kzfHnVRl8ZKo4tqghz9JYJrI,5327
1413
- vellum_ai-0.13.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1414
- vellum_ai-0.13.0.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
1415
- vellum_ai-0.13.0.dist-info/RECORD,,
1421
+ vellum_ai-0.13.1.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
1422
+ vellum_ai-0.13.1.dist-info/METADATA,sha256=4wEaXFcoDkNev8uoMpdroK3TDq2U5rm2tTzlfm6V-mg,5327
1423
+ vellum_ai-0.13.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1424
+ vellum_ai-0.13.1.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
1425
+ vellum_ai-0.13.1.dist-info/RECORD,,
vellum_cli/__init__.py CHANGED
@@ -4,6 +4,7 @@ import click
4
4
 
5
5
  from vellum_cli.aliased_group import ClickAliasedGroup
6
6
  from vellum_cli.image_push import image_push_command
7
+ from vellum_cli.ping import ping_command
7
8
  from vellum_cli.pull import pull_command
8
9
  from vellum_cli.push import push_command
9
10
 
@@ -14,6 +15,15 @@ def main() -> None:
14
15
  pass
15
16
 
16
17
 
18
+ @main.command
19
+ def ping() -> None:
20
+ """
21
+ Ping Vellum to confirm that requests are correctly authenticated and to return information about the active
22
+ Workspace/Organization
23
+ """
24
+ ping_command()
25
+
26
+
17
27
  class PushGroup(ClickAliasedGroup):
18
28
  def get_command(self, ctx, cmd_name):
19
29
  # First try to get the command normally
vellum_cli/ping.py ADDED
@@ -0,0 +1,28 @@
1
+ from dotenv import load_dotenv
2
+
3
+ from vellum.workflows.vellum_client import create_vellum_client
4
+ from vellum_cli.logger import load_cli_logger
5
+
6
+
7
+ def ping_command():
8
+ load_dotenv()
9
+ logger = load_cli_logger()
10
+
11
+ client = create_vellum_client()
12
+
13
+ workspace = client.workspaces.workspace_identity()
14
+ organization = client.organizations.organization_identity()
15
+
16
+ logger.info(
17
+ f"""\
18
+ Successfully authenticated with Vellum!
19
+
20
+ Organization:
21
+ ID: {organization.id}
22
+ Name: {organization.name}
23
+
24
+ Workspace:
25
+ ID: {workspace.id}
26
+ Name: {workspace.name}
27
+ """
28
+ )
@@ -0,0 +1,47 @@
1
+ from datetime import datetime
2
+
3
+ from click.testing import CliRunner
4
+
5
+ from vellum.client.types.organization_read import OrganizationRead
6
+ from vellum.client.types.workspace_read import WorkspaceRead
7
+ from vellum_cli import main as cli_main
8
+
9
+
10
+ def test_ping__happy_path(vellum_client):
11
+ # GIVEN a cli
12
+ runner = CliRunner()
13
+
14
+ # AND a valid response from both the workflow and organization API calls
15
+ vellum_client.workspaces.workspace_identity.return_value = WorkspaceRead(
16
+ id="1234567890",
17
+ name="Test Workspace",
18
+ label="Test Workspace",
19
+ created=datetime.now(),
20
+ )
21
+ vellum_client.organizations.organization_identity.return_value = OrganizationRead(
22
+ id="1234567890",
23
+ name="Test Organization",
24
+ new_member_join_behavior="AUTO_ACCEPT_FROM_SHARED_DOMAIN",
25
+ allow_staff_access=True,
26
+ )
27
+
28
+ # WHEN calling `vellum ping`
29
+ result = runner.invoke(cli_main, ["ping"])
30
+
31
+ # THEN it should return Status information about the user's workspace
32
+ assert result.exit_code == 0
33
+ assert (
34
+ result.output
35
+ == """\x1b[38;20m\
36
+ Successfully authenticated with Vellum!
37
+
38
+ Organization:
39
+ ID: 1234567890
40
+ Name: Test Organization
41
+
42
+ Workspace:
43
+ ID: 1234567890
44
+ Name: Test Workspace
45
+ \x1b[0m
46
+ """
47
+ )
@@ -1,12 +1,10 @@
1
1
  from typing import Any, Generic, TypeVar
2
2
 
3
3
  from vellum.workflows.descriptors.base import BaseDescriptor
4
- from vellum.workflows.expressions.and_ import AndExpression
5
4
  from vellum.workflows.expressions.between import BetweenExpression
6
5
  from vellum.workflows.expressions.is_not_null import IsNotNullExpression
7
6
  from vellum.workflows.expressions.is_null import IsNullExpression
8
7
  from vellum.workflows.expressions.not_between import NotBetweenExpression
9
- from vellum.workflows.expressions.or_ import OrExpression
10
8
  from vellum.workflows.nodes.bases.base import BaseNode
11
9
  from vellum.workflows.references.execution_count import ExecutionCountReference
12
10
  from vellum.workflows.references.output import OutputReference
@@ -71,12 +69,25 @@ class BaseNodeDisplay(BaseNodeVellumDisplay[_BaseNodeType], Generic[_BaseNodeTyp
71
69
  return explicit_value if explicit_value else GenericNodeDisplayData()
72
70
 
73
71
  def serialize_condition(self, display_context: WorkflowDisplayContext, condition: BaseDescriptor) -> JsonObject:
74
- if isinstance(condition, (AndExpression, OrExpression)):
75
- return {}
76
- elif isinstance(condition, (IsNullExpression, IsNotNullExpression)):
77
- return {}
72
+ if isinstance(condition, (IsNullExpression, IsNotNullExpression)):
73
+ lhs = self.serialize_value(display_context, condition._expression) # type: ignore[attr-defined]
74
+ return {
75
+ "type": "UNARY_EXPRESSION",
76
+ "lhs": lhs,
77
+ "operator": convert_descriptor_to_operator(condition),
78
+ }
78
79
  elif isinstance(condition, (BetweenExpression, NotBetweenExpression)):
79
- return {}
80
+ base = self.serialize_value(display_context, condition._value) # type: ignore[attr-defined]
81
+ lhs = self.serialize_value(display_context, condition._start) # type: ignore[attr-defined]
82
+ rhs = self.serialize_value(display_context, condition._end) # type: ignore[attr-defined]
83
+
84
+ return {
85
+ "type": "TERNARY_EXPRESSION",
86
+ "base": base,
87
+ "operator": convert_descriptor_to_operator(condition),
88
+ "lhs": lhs,
89
+ "rhs": rhs,
90
+ }
80
91
  else:
81
92
  lhs = self.serialize_value(display_context, condition._lhs) # type: ignore[attr-defined]
82
93
  rhs = self.serialize_value(display_context, condition._rhs) # type: ignore[attr-defined]
@@ -113,7 +124,7 @@ class BaseNodeDisplay(BaseNodeVellumDisplay[_BaseNodeType], Generic[_BaseNodeTyp
113
124
  }
114
125
 
115
126
  if isinstance(value, ExecutionCountReference):
116
- node_class_display = display_context.node_displays[value.node_class]
127
+ node_class_display = display_context.global_node_displays[value.node_class]
117
128
 
118
129
  return {
119
130
  "type": "EXECUTION_COUNTER",
@@ -127,4 +138,6 @@ class BaseNodeDisplay(BaseNodeVellumDisplay[_BaseNodeType], Generic[_BaseNodeTyp
127
138
  "value": vellum_value.dict(),
128
139
  }
129
140
 
130
- raise ValueError(f"Unsupported descriptor type: {value.__class__.__name__}")
141
+ # If it's not any of the references we know about,
142
+ # then try to serialize it as a nested value
143
+ return self.serialize_condition(display_context, value)
@@ -74,6 +74,9 @@ class BaseInlinePromptNodeDisplay(BaseNodeVellumDisplay[_InlinePromptNodeType],
74
74
  node_inputs: List[NodeInput] = []
75
75
  prompt_inputs: List[VellumVariable] = []
76
76
 
77
+ if not value:
78
+ return node_inputs, prompt_inputs
79
+
77
80
  for variable_name, variable_value in value.items():
78
81
  node_input = create_node_input(
79
82
  node_id=node_id,
@@ -69,7 +69,7 @@ class BaseMapNodeDisplay(BaseNodeVellumDisplay[_MapNodeType], Generic[_MapNodeTy
69
69
  "workflow_raw_data": serialized_subworkflow["workflow_raw_data"],
70
70
  "input_variables": cast(JsonObject, renamed_input_variables),
71
71
  "output_variables": serialized_subworkflow["output_variables"],
72
- "concurrency": raise_if_descriptor(node.concurrency),
72
+ "concurrency": raise_if_descriptor(node.max_concurrency),
73
73
  "items_input_id": items_workflow_input_id,
74
74
  "item_input_id": item_workflow_input_id,
75
75
  "index_input_id": index_workflow_input_id,
@@ -27,16 +27,20 @@ class BasePromptDeploymentNodeDisplay(
27
27
  node_id = self.node_id
28
28
 
29
29
  prompt_inputs = raise_if_descriptor(node.prompt_inputs)
30
- node_inputs = [
31
- create_node_input(
32
- node_id=node_id,
33
- input_name=variable_name,
34
- value=variable_value,
35
- display_context=display_context,
36
- input_id=self.prompt_input_ids_by_name.get(variable_name),
37
- )
38
- for variable_name, variable_value in prompt_inputs.items()
39
- ]
30
+ node_inputs = (
31
+ [
32
+ create_node_input(
33
+ node_id=node_id,
34
+ input_name=variable_name,
35
+ value=variable_value,
36
+ display_context=display_context,
37
+ input_id=self.prompt_input_ids_by_name.get(variable_name),
38
+ )
39
+ for variable_name, variable_value in prompt_inputs.items()
40
+ ]
41
+ if prompt_inputs
42
+ else []
43
+ )
40
44
 
41
45
  _, output_display = display_context.global_node_output_displays[cast(OutputReference, node.Outputs.text)]
42
46
  _, array_display = display_context.global_node_output_displays[cast(OutputReference, node.Outputs.results)]
@@ -2,6 +2,7 @@ import pytest
2
2
  from uuid import UUID, uuid4
3
3
  from typing import List, cast
4
4
 
5
+ from vellum.client.types.string_vellum_value import StringVellumValue
5
6
  from vellum.workflows.descriptors.base import BaseDescriptor
6
7
  from vellum.workflows.inputs import BaseInputs
7
8
  from vellum.workflows.nodes.bases import BaseNode
@@ -19,7 +20,6 @@ from vellum_ee.workflows.display.vellum import (
19
20
  NodeInputValuePointerRule,
20
21
  NodeOutputData,
21
22
  NodeOutputPointer,
22
- StringVellumValue,
23
23
  WorkflowInputsVellumDisplayOverrides,
24
24
  WorkflowMetaVellumDisplay,
25
25
  )
@@ -74,7 +74,7 @@ class MyNodeB(BaseNode):
74
74
  type="INPUT_VARIABLE",
75
75
  data=InputVariableData(input_variable_id="a154c29d-fac0-4cd0-ba88-bc52034f5470"),
76
76
  ),
77
- ConstantValuePointer(type="CONSTANT_VALUE", data=StringVellumValue(type="STRING", value="fallback")),
77
+ ConstantValuePointer(type="CONSTANT_VALUE", data=StringVellumValue(value="fallback")),
78
78
  ],
79
79
  ),
80
80
  ],
@@ -2,6 +2,7 @@ from uuid import UUID
2
2
  from typing import Any, List, Optional, Type, Union, cast
3
3
 
4
4
  from vellum.workflows.descriptors.base import BaseDescriptor
5
+ from vellum.workflows.expressions.and_ import AndExpression
5
6
  from vellum.workflows.expressions.begins_with import BeginsWithExpression
6
7
  from vellum.workflows.expressions.between import BetweenExpression
7
8
  from vellum.workflows.expressions.coalesce_expression import CoalesceExpression
@@ -25,11 +26,13 @@ from vellum.workflows.expressions.less_than import LessThanExpression
25
26
  from vellum.workflows.expressions.less_than_or_equal_to import LessThanOrEqualToExpression
26
27
  from vellum.workflows.expressions.not_between import NotBetweenExpression
27
28
  from vellum.workflows.expressions.not_in import NotInExpression
29
+ from vellum.workflows.expressions.or_ import OrExpression
30
+ from vellum.workflows.nodes.displayable.bases.utils import primitive_to_vellum_value
28
31
  from vellum.workflows.nodes.utils import get_wrapped_node, has_wrapped_node
29
32
  from vellum.workflows.references import NodeReference, OutputReference
30
33
  from vellum.workflows.utils.uuids import uuid4_from_hash
31
34
  from vellum_ee.workflows.display.types import WorkflowDisplayContext
32
- from vellum_ee.workflows.display.utils.vellum import create_node_input_value_pointer_rule, primitive_to_vellum_value
35
+ from vellum_ee.workflows.display.utils.vellum import create_node_input_value_pointer_rule
33
36
  from vellum_ee.workflows.display.vellum import (
34
37
  ConstantValuePointer,
35
38
  ExecutionCounterData,
@@ -170,5 +173,9 @@ def convert_descriptor_to_operator(descriptor: BaseDescriptor) -> str:
170
173
  return "between"
171
174
  elif isinstance(descriptor, NotBetweenExpression):
172
175
  return "notBetween"
176
+ elif isinstance(descriptor, AndExpression):
177
+ return "and"
178
+ elif isinstance(descriptor, OrExpression):
179
+ return "or"
173
180
  else:
174
181
  raise ValueError(f"Unsupported descriptor type: {descriptor}")
@@ -0,0 +1,67 @@
1
+ import pytest
2
+
3
+ from deepdiff import DeepDiff
4
+
5
+ from vellum.workflows.inputs.base import BaseInputs
6
+ from vellum.workflows.nodes.bases.base import BaseNode
7
+ from vellum.workflows.nodes.core.map_node.node import MapNode
8
+ from vellum.workflows.outputs.base import BaseOutputs
9
+ from vellum.workflows.state.base import BaseState
10
+
11
+
12
+ class Inputs(BaseInputs):
13
+ foo: str
14
+
15
+
16
+ class State(BaseState):
17
+ bar: str
18
+
19
+
20
+ @MapNode.wrap(items=[1, 2, 3])
21
+ class MapGenericNode(BaseNode):
22
+ item = MapNode.SubworkflowInputs.item
23
+ foo = Inputs.foo
24
+ bar = State.bar
25
+
26
+ class Outputs(BaseOutputs):
27
+ value: str
28
+
29
+ def run(self) -> Outputs:
30
+ return self.Outputs(value=f"{self.foo} {self.bar} {self.item}")
31
+
32
+
33
+ @pytest.mark.skip(reason="not implemented")
34
+ def test_serialize_node__try(serialize_node):
35
+ serialized_node = serialize_node(MapGenericNode)
36
+ assert not DeepDiff(
37
+ {
38
+ "id": "c2ed23f7-f6cb-4a56-a91c-2e5f9d8fda7f",
39
+ "label": "BasicGenericNode",
40
+ "type": "GENERIC",
41
+ "display_data": {"position": {"x": 0.0, "y": 0.0}},
42
+ "base": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"]},
43
+ "definition": {
44
+ "name": "BasicGenericNode",
45
+ "module": [
46
+ "vellum_ee",
47
+ "workflows",
48
+ "display",
49
+ "tests",
50
+ "workflow_serialization",
51
+ "generic_nodes",
52
+ "test_adornments_serialization",
53
+ ],
54
+ },
55
+ "trigger": {"id": "9d3a1b3d-4a38-4f2e-bbf1-dd8be152bce8", "merge_behavior": "AWAIT_ANY"},
56
+ "ports": [
57
+ {
58
+ "id": "4fbf0fff-a42e-4410-852a-238b5059198e",
59
+ "type": "DEFAULT",
60
+ }
61
+ ],
62
+ "adornments": None,
63
+ "attributes": [],
64
+ },
65
+ serialized_node,
66
+ ignore_order=True,
67
+ )