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.
Files changed (84) hide show
  1. vellum/__init__.py +16 -0
  2. vellum/client/README.md +55 -0
  3. vellum/client/__init__.py +66 -507
  4. vellum/client/core/client_wrapper.py +2 -2
  5. vellum/client/raw_client.py +844 -0
  6. vellum/client/reference.md +692 -19
  7. vellum/client/resources/ad_hoc/client.py +23 -180
  8. vellum/client/resources/ad_hoc/raw_client.py +276 -0
  9. vellum/client/resources/container_images/client.py +10 -36
  10. vellum/client/resources/deployments/client.py +16 -62
  11. vellum/client/resources/document_indexes/client.py +16 -72
  12. vellum/client/resources/documents/client.py +8 -30
  13. vellum/client/resources/folder_entities/client.py +4 -8
  14. vellum/client/resources/metric_definitions/client.py +4 -14
  15. vellum/client/resources/ml_models/client.py +2 -8
  16. vellum/client/resources/organizations/client.py +2 -6
  17. vellum/client/resources/prompts/client.py +2 -10
  18. vellum/client/resources/sandboxes/client.py +4 -20
  19. vellum/client/resources/test_suite_runs/client.py +4 -18
  20. vellum/client/resources/test_suites/client.py +11 -86
  21. vellum/client/resources/test_suites/raw_client.py +136 -0
  22. vellum/client/resources/workflow_deployments/client.py +20 -78
  23. vellum/client/resources/workflow_executions/client.py +2 -6
  24. vellum/client/resources/workflow_sandboxes/client.py +2 -10
  25. vellum/client/resources/workflows/client.py +7 -6
  26. vellum/client/resources/workflows/raw_client.py +58 -47
  27. vellum/client/resources/workspace_secrets/client.py +4 -20
  28. vellum/client/resources/workspaces/client.py +2 -6
  29. vellum/client/types/__init__.py +16 -0
  30. vellum/client/types/array_chat_message_content_item.py +4 -2
  31. vellum/client/types/array_chat_message_content_item_request.py +4 -2
  32. vellum/client/types/chat_message_content.py +4 -2
  33. vellum/client/types/chat_message_content_request.py +4 -2
  34. vellum/client/types/node_execution_span.py +2 -0
  35. vellum/client/types/prompt_block.py +4 -2
  36. vellum/client/types/vellum_value.py +4 -2
  37. vellum/client/types/vellum_value_request.py +4 -2
  38. vellum/client/types/vellum_variable_type.py +2 -1
  39. vellum/client/types/vellum_video.py +24 -0
  40. vellum/client/types/vellum_video_request.py +24 -0
  41. vellum/client/types/video_chat_message_content.py +25 -0
  42. vellum/client/types/video_chat_message_content_request.py +25 -0
  43. vellum/client/types/video_prompt_block.py +29 -0
  44. vellum/client/types/video_vellum_value.py +25 -0
  45. vellum/client/types/video_vellum_value_request.py +25 -0
  46. vellum/client/types/workflow_execution_span.py +2 -0
  47. vellum/client/types/workflow_execution_usage_calculation_fulfilled_body.py +22 -0
  48. vellum/prompts/blocks/compilation.py +22 -10
  49. vellum/types/vellum_video.py +3 -0
  50. vellum/types/vellum_video_request.py +3 -0
  51. vellum/types/video_chat_message_content.py +3 -0
  52. vellum/types/video_chat_message_content_request.py +3 -0
  53. vellum/types/video_prompt_block.py +3 -0
  54. vellum/types/video_vellum_value.py +3 -0
  55. vellum/types/video_vellum_value_request.py +3 -0
  56. vellum/types/workflow_execution_usage_calculation_fulfilled_body.py +3 -0
  57. vellum/workflows/events/workflow.py +11 -0
  58. vellum/workflows/graph/graph.py +103 -1
  59. vellum/workflows/graph/tests/test_graph.py +99 -0
  60. vellum/workflows/nodes/bases/base.py +9 -1
  61. vellum/workflows/nodes/displayable/bases/utils.py +4 -2
  62. vellum/workflows/nodes/displayable/tool_calling_node/node.py +19 -18
  63. vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py +17 -7
  64. vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py +7 -7
  65. vellum/workflows/nodes/displayable/tool_calling_node/utils.py +47 -80
  66. vellum/workflows/references/environment_variable.py +10 -0
  67. vellum/workflows/runner/runner.py +18 -2
  68. vellum/workflows/state/context.py +101 -12
  69. vellum/workflows/types/definition.py +11 -1
  70. vellum/workflows/types/tests/test_definition.py +19 -0
  71. vellum/workflows/utils/vellum_variables.py +9 -5
  72. vellum/workflows/workflows/base.py +12 -5
  73. {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.3.dist-info}/METADATA +1 -1
  74. {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.3.dist-info}/RECORD +84 -68
  75. vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -1
  76. vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +55 -1
  77. vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +15 -52
  78. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +15 -49
  79. vellum_ee/workflows/display/types.py +14 -1
  80. vellum_ee/workflows/display/utils/expressions.py +13 -4
  81. vellum_ee/workflows/display/workflows/base_workflow_display.py +6 -19
  82. {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.3.dist-info}/LICENSE +0 -0
  83. {vellum_ai-1.1.2.dist-info → vellum_ai-1.1.3.dist-info}/WHEEL +0 -0
  84. {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