vellum-ai 0.14.2__py3-none-any.whl → 0.14.4__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.
- vellum/client/core/client_wrapper.py +1 -1
- vellum/client/resources/document_indexes/client.py +4 -4
- vellum/client/resources/documents/client.py +0 -2
- vellum/client/resources/folder_entities/client.py +4 -8
- vellum/client/resources/test_suite_runs/client.py +0 -2
- vellum/client/types/deployment_read.py +5 -5
- vellum/client/types/deployment_release_tag_read.py +2 -2
- vellum/client/types/document_document_to_document_index.py +5 -5
- vellum/client/types/document_index_read.py +5 -5
- vellum/client/types/document_read.py +1 -1
- vellum/client/types/enriched_normalized_completion.py +3 -3
- vellum/client/types/generate_options_request.py +2 -2
- vellum/client/types/slim_deployment_read.py +5 -5
- vellum/client/types/slim_document.py +3 -3
- vellum/client/types/slim_document_document_to_document_index.py +5 -5
- vellum/client/types/slim_workflow_deployment.py +5 -5
- vellum/client/types/test_suite_run_read.py +5 -5
- vellum/client/types/workflow_deployment_read.py +5 -5
- vellum/client/types/workflow_release_tag_read.py +2 -2
- vellum/prompts/blocks/compilation.py +2 -2
- vellum/prompts/blocks/tests/test_compilation.py +9 -0
- vellum/utils/templating/render.py +1 -1
- vellum/workflows/constants.py +9 -0
- vellum/workflows/nodes/core/map_node/node.py +1 -1
- vellum/workflows/nodes/core/retry_node/node.py +4 -3
- vellum/workflows/nodes/core/templating_node/tests/test_templating_node.py +14 -0
- vellum/workflows/nodes/core/try_node/node.py +1 -1
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py +5 -0
- vellum/workflows/nodes/displayable/tests/test_inline_text_prompt_node.py +1 -0
- vellum/workflows/tests/test_undefined.py +12 -0
- vellum/workflows/workflows/base.py +59 -0
- vellum/workflows/workflows/tests/test_base_workflow.py +88 -0
- {vellum_ai-0.14.2.dist-info → vellum_ai-0.14.4.dist-info}/METADATA +1 -1
- {vellum_ai-0.14.2.dist-info → vellum_ai-0.14.4.dist-info}/RECORD +45 -44
- vellum_ee/workflows/display/base.py +7 -6
- vellum_ee/workflows/display/nodes/__init__.py +4 -0
- vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py +3 -5
- vellum_ee/workflows/display/types.py +2 -3
- vellum_ee/workflows/display/vellum.py +11 -5
- vellum_ee/workflows/display/workflows/base_workflow_display.py +10 -18
- vellum_ee/workflows/display/workflows/vellum_workflow_display.py +7 -41
- vellum_ee/workflows/tests/local_workflow/display/workflow.py +0 -2
- {vellum_ai-0.14.2.dist-info → vellum_ai-0.14.4.dist-info}/LICENSE +0 -0
- {vellum_ai-0.14.2.dist-info → vellum_ai-0.14.4.dist-info}/WHEEL +0 -0
- {vellum_ai-0.14.2.dist-info → vellum_ai-0.14.4.dist-info}/entry_points.txt +0 -0
@@ -31,8 +31,6 @@ from vellum_ee.workflows.display.vellum import (
|
|
31
31
|
WorkflowInputsVellumDisplayOverrides,
|
32
32
|
WorkflowMetaVellumDisplay,
|
33
33
|
WorkflowMetaVellumDisplayOverrides,
|
34
|
-
WorkflowOutputVellumDisplay,
|
35
|
-
WorkflowOutputVellumDisplayOverrides,
|
36
34
|
)
|
37
35
|
from vellum_ee.workflows.display.workflows.base_workflow_display import BaseWorkflowDisplay
|
38
36
|
|
@@ -53,8 +51,6 @@ class VellumWorkflowDisplay(
|
|
53
51
|
EntrypointVellumDisplayOverrides,
|
54
52
|
EdgeVellumDisplay,
|
55
53
|
EdgeVellumDisplayOverrides,
|
56
|
-
WorkflowOutputVellumDisplay,
|
57
|
-
WorkflowOutputVellumDisplayOverrides,
|
58
54
|
]
|
59
55
|
):
|
60
56
|
node_display_base_class = BaseNodeDisplay
|
@@ -144,7 +140,7 @@ class VellumWorkflowDisplay(
|
|
144
140
|
|
145
141
|
# Add a synthetic Terminal Node and track the Workflow's output variables for each Workflow output
|
146
142
|
for workflow_output, workflow_output_display in self.display_context.workflow_output_displays.items():
|
147
|
-
final_output_node_id =
|
143
|
+
final_output_node_id = uuid4_from_hash(f"{self.workflow_id}|node_id|{workflow_output.name}")
|
148
144
|
inferred_type = infer_vellum_variable_type(workflow_output)
|
149
145
|
|
150
146
|
# Remove the terminal node output from the unreferenced set
|
@@ -176,22 +172,17 @@ class VellumWorkflowDisplay(
|
|
176
172
|
except IndexError:
|
177
173
|
source_node_display = None
|
178
174
|
|
179
|
-
synthetic_target_handle_id = (
|
180
|
-
|
181
|
-
if workflow_output_display.target_handle_id
|
182
|
-
else str(uuid4_from_hash(f"{self.workflow_id}|target_handle_id|{workflow_output_display.name}"))
|
183
|
-
)
|
184
|
-
synthetic_display_data = (
|
185
|
-
workflow_output_display.display_data.dict()
|
186
|
-
if workflow_output_display.display_data
|
187
|
-
else NodeDisplayData().dict()
|
175
|
+
synthetic_target_handle_id = str(
|
176
|
+
uuid4_from_hash(f"{self.workflow_id}|target_handle_id|{workflow_output_display.name}")
|
188
177
|
)
|
178
|
+
synthetic_display_data = NodeDisplayData().dict()
|
179
|
+
synthetic_node_label = "Final Output"
|
189
180
|
nodes.append(
|
190
181
|
{
|
191
182
|
"id": str(final_output_node_id),
|
192
183
|
"type": "TERMINAL",
|
193
184
|
"data": {
|
194
|
-
"label":
|
185
|
+
"label": synthetic_node_label,
|
195
186
|
"name": workflow_output_display.name,
|
196
187
|
"target_handle_id": synthetic_target_handle_id,
|
197
188
|
"output_id": str(workflow_output_display.id),
|
@@ -220,7 +211,7 @@ class VellumWorkflowDisplay(
|
|
220
211
|
"id": str(uuid4_from_hash(f"{self.workflow_id}|edge_id|{workflow_output_display.name}")),
|
221
212
|
"source_node_id": str(source_node_display.node_id),
|
222
213
|
"source_handle_id": str(source_handle_id),
|
223
|
-
"target_node_id": str(
|
214
|
+
"target_node_id": str(final_output_node_id),
|
224
215
|
"target_handle_id": synthetic_target_handle_id,
|
225
216
|
"type": "DEFAULT",
|
226
217
|
}
|
@@ -365,31 +356,6 @@ class VellumWorkflowDisplay(
|
|
365
356
|
|
366
357
|
return EntrypointVellumDisplay(id=entrypoint_id, edge_display=edge_display)
|
367
358
|
|
368
|
-
def _generate_workflow_output_display(
|
369
|
-
self,
|
370
|
-
output: BaseDescriptor,
|
371
|
-
overrides: Optional[WorkflowOutputVellumDisplayOverrides] = None,
|
372
|
-
) -> WorkflowOutputVellumDisplay:
|
373
|
-
if overrides:
|
374
|
-
return WorkflowOutputVellumDisplay(
|
375
|
-
id=overrides.id,
|
376
|
-
name=overrides.name,
|
377
|
-
label=overrides.label,
|
378
|
-
node_id=overrides.node_id,
|
379
|
-
target_handle_id=overrides.target_handle_id,
|
380
|
-
display_data=overrides.display_data,
|
381
|
-
)
|
382
|
-
|
383
|
-
output_id = uuid4_from_hash(f"{self.workflow_id}|id|{output.name}")
|
384
|
-
node_id = uuid4_from_hash(f"{self.workflow_id}|node_id|{output.name}")
|
385
|
-
|
386
|
-
return WorkflowOutputVellumDisplay(
|
387
|
-
id=output_id,
|
388
|
-
node_id=node_id,
|
389
|
-
name=output.name,
|
390
|
-
label="Final Output",
|
391
|
-
)
|
392
|
-
|
393
359
|
def _generate_edge_display(
|
394
360
|
self,
|
395
361
|
edge: Edge,
|
@@ -47,8 +47,6 @@ class WorkflowDisplay(VellumWorkflowDisplay[Workflow]):
|
|
47
47
|
output_displays = {
|
48
48
|
Workflow.Outputs.final_output: WorkflowOutputVellumDisplayOverrides(
|
49
49
|
id=UUID("5469b810-6ea6-4362-9e79-e360d44a1405"),
|
50
|
-
node_id=UUID("f3ef4b2b-fec9-4026-9cc6-e5eac295307f"),
|
51
50
|
name="final-output",
|
52
|
-
label="Final Output",
|
53
51
|
)
|
54
52
|
}
|
File without changes
|
File without changes
|
File without changes
|