vellum-ai 1.1.2__py3-none-any.whl → 1.1.3__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/__init__.py +16 -0
- vellum/client/README.md +55 -0
- vellum/client/__init__.py +66 -507
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/raw_client.py +844 -0
- vellum/client/reference.md +692 -19
- vellum/client/resources/ad_hoc/client.py +23 -180
- vellum/client/resources/ad_hoc/raw_client.py +276 -0
- vellum/client/resources/container_images/client.py +10 -36
- vellum/client/resources/deployments/client.py +16 -62
- vellum/client/resources/document_indexes/client.py +16 -72
- vellum/client/resources/documents/client.py +8 -30
- vellum/client/resources/folder_entities/client.py +4 -8
- vellum/client/resources/metric_definitions/client.py +4 -14
- vellum/client/resources/ml_models/client.py +2 -8
- vellum/client/resources/organizations/client.py +2 -6
- vellum/client/resources/prompts/client.py +2 -10
- vellum/client/resources/sandboxes/client.py +4 -20
- vellum/client/resources/test_suite_runs/client.py +4 -18
- vellum/client/resources/test_suites/client.py +11 -86
- vellum/client/resources/test_suites/raw_client.py +136 -0
- vellum/client/resources/workflow_deployments/client.py +20 -78
- vellum/client/resources/workflow_executions/client.py +2 -6
- vellum/client/resources/workflow_sandboxes/client.py +2 -10
- vellum/client/resources/workflows/client.py +7 -6
- vellum/client/resources/workflows/raw_client.py +58 -47
- vellum/client/resources/workspace_secrets/client.py +4 -20
- vellum/client/resources/workspaces/client.py +2 -6
- vellum/client/types/__init__.py +16 -0
- vellum/client/types/array_chat_message_content_item.py +4 -2
- vellum/client/types/array_chat_message_content_item_request.py +4 -2
- vellum/client/types/chat_message_content.py +4 -2
- vellum/client/types/chat_message_content_request.py +4 -2
- vellum/client/types/node_execution_span.py +2 -0
- vellum/client/types/prompt_block.py +4 -2
- vellum/client/types/vellum_value.py +4 -2
- vellum/client/types/vellum_value_request.py +4 -2
- vellum/client/types/vellum_variable_type.py +2 -1
- vellum/client/types/vellum_video.py +24 -0
- vellum/client/types/vellum_video_request.py +24 -0
- vellum/client/types/video_chat_message_content.py +25 -0
- vellum/client/types/video_chat_message_content_request.py +25 -0
- vellum/client/types/video_prompt_block.py +29 -0
- vellum/client/types/video_vellum_value.py +25 -0
- vellum/client/types/video_vellum_value_request.py +25 -0
- vellum/client/types/workflow_execution_span.py +2 -0
- vellum/client/types/workflow_execution_usage_calculation_fulfilled_body.py +22 -0
- vellum/prompts/blocks/compilation.py +22 -10
- vellum/types/vellum_video.py +3 -0
- vellum/types/vellum_video_request.py +3 -0
- vellum/types/video_chat_message_content.py +3 -0
- vellum/types/video_chat_message_content_request.py +3 -0
- vellum/types/video_prompt_block.py +3 -0
- vellum/types/video_vellum_value.py +3 -0
- vellum/types/video_vellum_value_request.py +3 -0
- vellum/types/workflow_execution_usage_calculation_fulfilled_body.py +3 -0
- vellum/workflows/events/workflow.py +11 -0
- vellum/workflows/graph/graph.py +103 -1
- vellum/workflows/graph/tests/test_graph.py +99 -0
- vellum/workflows/nodes/bases/base.py +9 -1
- vellum/workflows/nodes/displayable/bases/utils.py +4 -2
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +19 -18
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py +17 -7
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py +7 -7
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +47 -80
- vellum/workflows/references/environment_variable.py +10 -0
- vellum/workflows/runner/runner.py +18 -2
- vellum/workflows/state/context.py +101 -12
- vellum/workflows/types/definition.py +11 -1
- vellum/workflows/types/tests/test_definition.py +19 -0
- vellum/workflows/utils/vellum_variables.py +9 -5
- vellum/workflows/workflows/base.py +12 -5
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.3.dist-info}/METADATA +1 -1
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.3.dist-info}/RECORD +84 -68
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +55 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +15 -52
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +15 -49
- vellum_ee/workflows/display/types.py +14 -1
- vellum_ee/workflows/display/utils/expressions.py +13 -4
- vellum_ee/workflows/display/workflows/base_workflow_display.py +6 -19
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.3.dist-info}/LICENSE +0 -0
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.3.dist-info}/WHEEL +0 -0
- {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.3.dist-info}/entry_points.txt +0 -0
vellum/__init__.py
CHANGED
@@ -525,7 +525,14 @@ from .client.types import (
|
|
525
525
|
VellumVariable,
|
526
526
|
VellumVariableExtensions,
|
527
527
|
VellumVariableType,
|
528
|
+
VellumVideo,
|
529
|
+
VellumVideoRequest,
|
528
530
|
VellumWorkflowExecutionEvent,
|
531
|
+
VideoChatMessageContent,
|
532
|
+
VideoChatMessageContentRequest,
|
533
|
+
VideoPromptBlock,
|
534
|
+
VideoVellumValue,
|
535
|
+
VideoVellumValueRequest,
|
529
536
|
WorkflowDeploymentEventExecutionsResponse,
|
530
537
|
WorkflowDeploymentHistoryItem,
|
531
538
|
WorkflowDeploymentParentContext,
|
@@ -562,6 +569,7 @@ from .client.types import (
|
|
562
569
|
WorkflowExecutionStreamingEvent,
|
563
570
|
WorkflowExecutionUsageCalculationError,
|
564
571
|
WorkflowExecutionUsageCalculationErrorCodeEnum,
|
572
|
+
WorkflowExecutionUsageCalculationFulfilledBody,
|
565
573
|
WorkflowExecutionUsageResult,
|
566
574
|
WorkflowExecutionViewOnlineEvalMetricResult,
|
567
575
|
WorkflowExecutionWorkflowResultEvent,
|
@@ -1175,7 +1183,14 @@ __all__ = [
|
|
1175
1183
|
"VellumVariable",
|
1176
1184
|
"VellumVariableExtensions",
|
1177
1185
|
"VellumVariableType",
|
1186
|
+
"VellumVideo",
|
1187
|
+
"VellumVideoRequest",
|
1178
1188
|
"VellumWorkflowExecutionEvent",
|
1189
|
+
"VideoChatMessageContent",
|
1190
|
+
"VideoChatMessageContentRequest",
|
1191
|
+
"VideoPromptBlock",
|
1192
|
+
"VideoVellumValue",
|
1193
|
+
"VideoVellumValueRequest",
|
1179
1194
|
"WorkflowDeploymentEventExecutionsResponse",
|
1180
1195
|
"WorkflowDeploymentHistoryItem",
|
1181
1196
|
"WorkflowDeploymentParentContext",
|
@@ -1213,6 +1228,7 @@ __all__ = [
|
|
1213
1228
|
"WorkflowExecutionStreamingEvent",
|
1214
1229
|
"WorkflowExecutionUsageCalculationError",
|
1215
1230
|
"WorkflowExecutionUsageCalculationErrorCodeEnum",
|
1231
|
+
"WorkflowExecutionUsageCalculationFulfilledBody",
|
1216
1232
|
"WorkflowExecutionUsageResult",
|
1217
1233
|
"WorkflowExecutionViewOnlineEvalMetricResult",
|
1218
1234
|
"WorkflowExecutionWorkflowResultEvent",
|
vellum/client/README.md
CHANGED
@@ -95,6 +95,61 @@ except ApiError as e:
|
|
95
95
|
print(e.body)
|
96
96
|
```
|
97
97
|
|
98
|
+
## Streaming
|
99
|
+
|
100
|
+
The SDK supports streaming responses, as well, the response will be a generator that you can loop over.
|
101
|
+
|
102
|
+
```python
|
103
|
+
from vellum import (
|
104
|
+
JinjaPromptBlock,
|
105
|
+
PromptParameters,
|
106
|
+
PromptRequestStringInput,
|
107
|
+
Vellum,
|
108
|
+
VellumVariable,
|
109
|
+
)
|
110
|
+
|
111
|
+
client = Vellum(
|
112
|
+
api_version="YOUR_API_VERSION",
|
113
|
+
api_key="YOUR_API_KEY",
|
114
|
+
)
|
115
|
+
response = client.ad_hoc.adhoc_execute_prompt_stream(
|
116
|
+
ml_model="x",
|
117
|
+
input_values=[
|
118
|
+
PromptRequestStringInput(
|
119
|
+
key="x",
|
120
|
+
value="value",
|
121
|
+
),
|
122
|
+
PromptRequestStringInput(
|
123
|
+
key="x",
|
124
|
+
value="value",
|
125
|
+
),
|
126
|
+
],
|
127
|
+
input_variables=[
|
128
|
+
VellumVariable(
|
129
|
+
id="x",
|
130
|
+
key="key",
|
131
|
+
type="STRING",
|
132
|
+
),
|
133
|
+
VellumVariable(
|
134
|
+
id="x",
|
135
|
+
key="key",
|
136
|
+
type="STRING",
|
137
|
+
),
|
138
|
+
],
|
139
|
+
parameters=PromptParameters(),
|
140
|
+
blocks=[
|
141
|
+
JinjaPromptBlock(
|
142
|
+
template="template",
|
143
|
+
),
|
144
|
+
JinjaPromptBlock(
|
145
|
+
template="template",
|
146
|
+
),
|
147
|
+
],
|
148
|
+
)
|
149
|
+
for chunk in response.data:
|
150
|
+
yield chunk
|
151
|
+
```
|
152
|
+
|
98
153
|
## Advanced
|
99
154
|
|
100
155
|
### Retries
|