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
@@ -9,6 +9,7 @@ from ...errors.bad_request_error import BadRequestError
|
|
9
9
|
from ...core.pydantic_utilities import parse_obj_as
|
10
10
|
from json.decoder import JSONDecodeError
|
11
11
|
from ...core.api_error import ApiError
|
12
|
+
import contextlib
|
12
13
|
from ...types.workflow_push_exec_config import WorkflowPushExecConfig
|
13
14
|
from ...types.workflow_push_deployment_config_request import WorkflowPushDeploymentConfigRequest
|
14
15
|
from ... import core
|
@@ -24,6 +25,7 @@ class RawWorkflowsClient:
|
|
24
25
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
25
26
|
self._client_wrapper = client_wrapper
|
26
27
|
|
28
|
+
@contextlib.contextmanager
|
27
29
|
def pull(
|
28
30
|
self,
|
29
31
|
id: str,
|
@@ -34,7 +36,7 @@ class RawWorkflowsClient:
|
|
34
36
|
include_sandbox: typing.Optional[bool] = None,
|
35
37
|
strict: typing.Optional[bool] = None,
|
36
38
|
request_options: typing.Optional[RequestOptions] = None,
|
37
|
-
) -> HttpResponse[typing.Iterator[bytes]]:
|
39
|
+
) -> typing.Iterator[HttpResponse[typing.Iterator[bytes]]]:
|
38
40
|
"""
|
39
41
|
Parameters
|
40
42
|
----------
|
@@ -56,7 +58,7 @@ class RawWorkflowsClient:
|
|
56
58
|
|
57
59
|
Returns
|
58
60
|
-------
|
59
|
-
HttpResponse[typing.Iterator[bytes]]
|
61
|
+
typing.Iterator[HttpResponse[typing.Iterator[bytes]]]
|
60
62
|
|
61
63
|
"""
|
62
64
|
with self._client_wrapper.httpx_client.stream(
|
@@ -72,27 +74,31 @@ class RawWorkflowsClient:
|
|
72
74
|
},
|
73
75
|
request_options=request_options,
|
74
76
|
) as _response:
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
77
|
+
|
78
|
+
def stream() -> HttpResponse[typing.Iterator[bytes]]:
|
79
|
+
try:
|
80
|
+
if 200 <= _response.status_code < 300:
|
81
|
+
_chunk_size = request_options.get("chunk_size", None) if request_options is not None else None
|
82
|
+
return HttpResponse(
|
83
|
+
response=_response, data=(_chunk for _chunk in _response.iter_bytes(chunk_size=_chunk_size))
|
84
|
+
)
|
85
|
+
_response.read()
|
86
|
+
if _response.status_code == 400:
|
87
|
+
raise BadRequestError(
|
88
|
+
typing.cast(
|
89
|
+
typing.Optional[typing.Any],
|
90
|
+
parse_obj_as(
|
91
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
92
|
+
object_=_response.json(),
|
93
|
+
),
|
94
|
+
)
|
90
95
|
)
|
91
|
-
)
|
92
|
-
|
93
|
-
|
94
|
-
raise ApiError(status_code=_response.status_code, body=
|
95
|
-
|
96
|
+
_response_json = _response.json()
|
97
|
+
except JSONDecodeError:
|
98
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
99
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
100
|
+
|
101
|
+
yield stream()
|
96
102
|
|
97
103
|
def push(
|
98
104
|
self,
|
@@ -142,7 +148,7 @@ class RawWorkflowsClient:
|
|
142
148
|
"strict": strict,
|
143
149
|
},
|
144
150
|
files={
|
145
|
-
"artifact": artifact,
|
151
|
+
**({"artifact": artifact} if artifact is not None else {}),
|
146
152
|
},
|
147
153
|
request_options=request_options,
|
148
154
|
omit=OMIT,
|
@@ -167,6 +173,7 @@ class AsyncRawWorkflowsClient:
|
|
167
173
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
168
174
|
self._client_wrapper = client_wrapper
|
169
175
|
|
176
|
+
@contextlib.asynccontextmanager
|
170
177
|
async def pull(
|
171
178
|
self,
|
172
179
|
id: str,
|
@@ -177,7 +184,7 @@ class AsyncRawWorkflowsClient:
|
|
177
184
|
include_sandbox: typing.Optional[bool] = None,
|
178
185
|
strict: typing.Optional[bool] = None,
|
179
186
|
request_options: typing.Optional[RequestOptions] = None,
|
180
|
-
) -> AsyncHttpResponse[typing.AsyncIterator[bytes]]:
|
187
|
+
) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]:
|
181
188
|
"""
|
182
189
|
Parameters
|
183
190
|
----------
|
@@ -199,7 +206,7 @@ class AsyncRawWorkflowsClient:
|
|
199
206
|
|
200
207
|
Returns
|
201
208
|
-------
|
202
|
-
AsyncHttpResponse[typing.AsyncIterator[bytes]]
|
209
|
+
typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[bytes]]]
|
203
210
|
|
204
211
|
"""
|
205
212
|
async with self._client_wrapper.httpx_client.stream(
|
@@ -215,28 +222,32 @@ class AsyncRawWorkflowsClient:
|
|
215
222
|
},
|
216
223
|
request_options=request_options,
|
217
224
|
) as _response:
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
225
|
+
|
226
|
+
async def stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]:
|
227
|
+
try:
|
228
|
+
if 200 <= _response.status_code < 300:
|
229
|
+
_chunk_size = request_options.get("chunk_size", None) if request_options is not None else None
|
230
|
+
return AsyncHttpResponse(
|
231
|
+
response=_response,
|
232
|
+
data=(_chunk async for _chunk in _response.aiter_bytes(chunk_size=_chunk_size)),
|
233
|
+
)
|
234
|
+
await _response.aread()
|
235
|
+
if _response.status_code == 400:
|
236
|
+
raise BadRequestError(
|
237
|
+
typing.cast(
|
238
|
+
typing.Optional[typing.Any],
|
239
|
+
parse_obj_as(
|
240
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
241
|
+
object_=_response.json(),
|
242
|
+
),
|
243
|
+
)
|
234
244
|
)
|
235
|
-
)
|
236
|
-
|
237
|
-
|
238
|
-
raise ApiError(status_code=_response.status_code, body=
|
239
|
-
|
245
|
+
_response_json = _response.json()
|
246
|
+
except JSONDecodeError:
|
247
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
248
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
249
|
+
|
250
|
+
yield await stream()
|
240
251
|
|
241
252
|
async def push(
|
242
253
|
self,
|
@@ -286,7 +297,7 @@ class AsyncRawWorkflowsClient:
|
|
286
297
|
"strict": strict,
|
287
298
|
},
|
288
299
|
files={
|
289
|
-
"artifact": artifact,
|
300
|
+
**({"artifact": artifact} if artifact is not None else {}),
|
290
301
|
},
|
291
302
|
request_options=request_options,
|
292
303
|
omit=OMIT,
|
@@ -60,10 +60,7 @@ class WorkspaceSecretsClient:
|
|
60
60
|
id="id",
|
61
61
|
)
|
62
62
|
"""
|
63
|
-
response = self._raw_client.retrieve(
|
64
|
-
id,
|
65
|
-
request_options=request_options,
|
66
|
-
)
|
63
|
+
response = self._raw_client.retrieve(id, request_options=request_options)
|
67
64
|
return response.data
|
68
65
|
|
69
66
|
def partial_update(
|
@@ -106,12 +103,7 @@ class WorkspaceSecretsClient:
|
|
106
103
|
id="id",
|
107
104
|
)
|
108
105
|
"""
|
109
|
-
response = self._raw_client.partial_update(
|
110
|
-
id,
|
111
|
-
label=label,
|
112
|
-
value=value,
|
113
|
-
request_options=request_options,
|
114
|
-
)
|
106
|
+
response = self._raw_client.partial_update(id, label=label, value=value, request_options=request_options)
|
115
107
|
return response.data
|
116
108
|
|
117
109
|
|
@@ -169,10 +161,7 @@ class AsyncWorkspaceSecretsClient:
|
|
169
161
|
|
170
162
|
asyncio.run(main())
|
171
163
|
"""
|
172
|
-
response = await self._raw_client.retrieve(
|
173
|
-
id,
|
174
|
-
request_options=request_options,
|
175
|
-
)
|
164
|
+
response = await self._raw_client.retrieve(id, request_options=request_options)
|
176
165
|
return response.data
|
177
166
|
|
178
167
|
async def partial_update(
|
@@ -223,10 +212,5 @@ class AsyncWorkspaceSecretsClient:
|
|
223
212
|
|
224
213
|
asyncio.run(main())
|
225
214
|
"""
|
226
|
-
response = await self._raw_client.partial_update(
|
227
|
-
id,
|
228
|
-
label=label,
|
229
|
-
value=value,
|
230
|
-
request_options=request_options,
|
231
|
-
)
|
215
|
+
response = await self._raw_client.partial_update(id, label=label, value=value, request_options=request_options)
|
232
216
|
return response.data
|
@@ -52,9 +52,7 @@ class WorkspacesClient:
|
|
52
52
|
)
|
53
53
|
client.workspaces.workspace_identity()
|
54
54
|
"""
|
55
|
-
response = self._raw_client.workspace_identity(
|
56
|
-
request_options=request_options,
|
57
|
-
)
|
55
|
+
response = self._raw_client.workspace_identity(request_options=request_options)
|
58
56
|
return response.data
|
59
57
|
|
60
58
|
|
@@ -105,7 +103,5 @@ class AsyncWorkspacesClient:
|
|
105
103
|
|
106
104
|
asyncio.run(main())
|
107
105
|
"""
|
108
|
-
response = await self._raw_client.workspace_identity(
|
109
|
-
request_options=request_options,
|
110
|
-
)
|
106
|
+
response = await self._raw_client.workspace_identity(request_options=request_options)
|
111
107
|
return response.data
|
vellum/client/types/__init__.py
CHANGED
@@ -549,7 +549,14 @@ from .vellum_value_request import VellumValueRequest
|
|
549
549
|
from .vellum_variable import VellumVariable
|
550
550
|
from .vellum_variable_extensions import VellumVariableExtensions
|
551
551
|
from .vellum_variable_type import VellumVariableType
|
552
|
+
from .vellum_video import VellumVideo
|
553
|
+
from .vellum_video_request import VellumVideoRequest
|
552
554
|
from .vellum_workflow_execution_event import VellumWorkflowExecutionEvent
|
555
|
+
from .video_chat_message_content import VideoChatMessageContent
|
556
|
+
from .video_chat_message_content_request import VideoChatMessageContentRequest
|
557
|
+
from .video_prompt_block import VideoPromptBlock
|
558
|
+
from .video_vellum_value import VideoVellumValue
|
559
|
+
from .video_vellum_value_request import VideoVellumValueRequest
|
553
560
|
from .workflow_deployment_event_executions_response import WorkflowDeploymentEventExecutionsResponse
|
554
561
|
from .workflow_deployment_history_item import WorkflowDeploymentHistoryItem
|
555
562
|
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext
|
@@ -586,6 +593,7 @@ from .workflow_execution_streaming_body import WorkflowExecutionStreamingBody
|
|
586
593
|
from .workflow_execution_streaming_event import WorkflowExecutionStreamingEvent
|
587
594
|
from .workflow_execution_usage_calculation_error import WorkflowExecutionUsageCalculationError
|
588
595
|
from .workflow_execution_usage_calculation_error_code_enum import WorkflowExecutionUsageCalculationErrorCodeEnum
|
596
|
+
from .workflow_execution_usage_calculation_fulfilled_body import WorkflowExecutionUsageCalculationFulfilledBody
|
589
597
|
from .workflow_execution_usage_result import WorkflowExecutionUsageResult
|
590
598
|
from .workflow_execution_view_online_eval_metric_result import WorkflowExecutionViewOnlineEvalMetricResult
|
591
599
|
from .workflow_execution_workflow_result_event import WorkflowExecutionWorkflowResultEvent
|
@@ -1153,7 +1161,14 @@ __all__ = [
|
|
1153
1161
|
"VellumVariable",
|
1154
1162
|
"VellumVariableExtensions",
|
1155
1163
|
"VellumVariableType",
|
1164
|
+
"VellumVideo",
|
1165
|
+
"VellumVideoRequest",
|
1156
1166
|
"VellumWorkflowExecutionEvent",
|
1167
|
+
"VideoChatMessageContent",
|
1168
|
+
"VideoChatMessageContentRequest",
|
1169
|
+
"VideoPromptBlock",
|
1170
|
+
"VideoVellumValue",
|
1171
|
+
"VideoVellumValueRequest",
|
1157
1172
|
"WorkflowDeploymentEventExecutionsResponse",
|
1158
1173
|
"WorkflowDeploymentHistoryItem",
|
1159
1174
|
"WorkflowDeploymentParentContext",
|
@@ -1190,6 +1205,7 @@ __all__ = [
|
|
1190
1205
|
"WorkflowExecutionStreamingEvent",
|
1191
1206
|
"WorkflowExecutionUsageCalculationError",
|
1192
1207
|
"WorkflowExecutionUsageCalculationErrorCodeEnum",
|
1208
|
+
"WorkflowExecutionUsageCalculationFulfilledBody",
|
1193
1209
|
"WorkflowExecutionUsageResult",
|
1194
1210
|
"WorkflowExecutionViewOnlineEvalMetricResult",
|
1195
1211
|
"WorkflowExecutionWorkflowResultEvent",
|
@@ -3,14 +3,16 @@
|
|
3
3
|
import typing
|
4
4
|
from .string_chat_message_content import StringChatMessageContent
|
5
5
|
from .function_call_chat_message_content import FunctionCallChatMessageContent
|
6
|
-
from .image_chat_message_content import ImageChatMessageContent
|
7
6
|
from .audio_chat_message_content import AudioChatMessageContent
|
7
|
+
from .video_chat_message_content import VideoChatMessageContent
|
8
|
+
from .image_chat_message_content import ImageChatMessageContent
|
8
9
|
from .document_chat_message_content import DocumentChatMessageContent
|
9
10
|
|
10
11
|
ArrayChatMessageContentItem = typing.Union[
|
11
12
|
StringChatMessageContent,
|
12
13
|
FunctionCallChatMessageContent,
|
13
|
-
ImageChatMessageContent,
|
14
14
|
AudioChatMessageContent,
|
15
|
+
VideoChatMessageContent,
|
16
|
+
ImageChatMessageContent,
|
15
17
|
DocumentChatMessageContent,
|
16
18
|
]
|
@@ -3,14 +3,16 @@
|
|
3
3
|
import typing
|
4
4
|
from .string_chat_message_content_request import StringChatMessageContentRequest
|
5
5
|
from .function_call_chat_message_content_request import FunctionCallChatMessageContentRequest
|
6
|
-
from .image_chat_message_content_request import ImageChatMessageContentRequest
|
7
6
|
from .audio_chat_message_content_request import AudioChatMessageContentRequest
|
7
|
+
from .video_chat_message_content_request import VideoChatMessageContentRequest
|
8
|
+
from .image_chat_message_content_request import ImageChatMessageContentRequest
|
8
9
|
from .document_chat_message_content_request import DocumentChatMessageContentRequest
|
9
10
|
|
10
11
|
ArrayChatMessageContentItemRequest = typing.Union[
|
11
12
|
StringChatMessageContentRequest,
|
12
13
|
FunctionCallChatMessageContentRequest,
|
13
|
-
ImageChatMessageContentRequest,
|
14
14
|
AudioChatMessageContentRequest,
|
15
|
+
VideoChatMessageContentRequest,
|
16
|
+
ImageChatMessageContentRequest,
|
15
17
|
DocumentChatMessageContentRequest,
|
16
18
|
]
|
@@ -4,15 +4,17 @@ import typing
|
|
4
4
|
from .string_chat_message_content import StringChatMessageContent
|
5
5
|
from .function_call_chat_message_content import FunctionCallChatMessageContent
|
6
6
|
from .array_chat_message_content import ArrayChatMessageContent
|
7
|
-
from .image_chat_message_content import ImageChatMessageContent
|
8
7
|
from .audio_chat_message_content import AudioChatMessageContent
|
8
|
+
from .video_chat_message_content import VideoChatMessageContent
|
9
|
+
from .image_chat_message_content import ImageChatMessageContent
|
9
10
|
from .document_chat_message_content import DocumentChatMessageContent
|
10
11
|
|
11
12
|
ChatMessageContent = typing.Union[
|
12
13
|
StringChatMessageContent,
|
13
14
|
FunctionCallChatMessageContent,
|
14
15
|
ArrayChatMessageContent,
|
15
|
-
ImageChatMessageContent,
|
16
16
|
AudioChatMessageContent,
|
17
|
+
VideoChatMessageContent,
|
18
|
+
ImageChatMessageContent,
|
17
19
|
DocumentChatMessageContent,
|
18
20
|
]
|
@@ -4,15 +4,17 @@ import typing
|
|
4
4
|
from .string_chat_message_content_request import StringChatMessageContentRequest
|
5
5
|
from .function_call_chat_message_content_request import FunctionCallChatMessageContentRequest
|
6
6
|
from .array_chat_message_content_request import ArrayChatMessageContentRequest
|
7
|
-
from .image_chat_message_content_request import ImageChatMessageContentRequest
|
8
7
|
from .audio_chat_message_content_request import AudioChatMessageContentRequest
|
8
|
+
from .video_chat_message_content_request import VideoChatMessageContentRequest
|
9
|
+
from .image_chat_message_content_request import ImageChatMessageContentRequest
|
9
10
|
from .document_chat_message_content_request import DocumentChatMessageContentRequest
|
10
11
|
|
11
12
|
ChatMessageContentRequest = typing.Union[
|
12
13
|
StringChatMessageContentRequest,
|
13
14
|
FunctionCallChatMessageContentRequest,
|
14
15
|
ArrayChatMessageContentRequest,
|
15
|
-
ImageChatMessageContentRequest,
|
16
16
|
AudioChatMessageContentRequest,
|
17
|
+
VideoChatMessageContentRequest,
|
18
|
+
ImageChatMessageContentRequest,
|
17
19
|
DocumentChatMessageContentRequest,
|
18
20
|
]
|
@@ -12,6 +12,7 @@ from .workflow_sandbox_parent_context import WorkflowSandboxParentContext
|
|
12
12
|
import typing
|
13
13
|
from .vellum_node_execution_event import VellumNodeExecutionEvent
|
14
14
|
from .node_execution_span_attributes import NodeExecutionSpanAttributes
|
15
|
+
from .workflow_execution_usage_calculation_fulfilled_body import WorkflowExecutionUsageCalculationFulfilledBody
|
15
16
|
import datetime as dt
|
16
17
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
17
18
|
import pydantic
|
@@ -21,6 +22,7 @@ class NodeExecutionSpan(UniversalBaseModel):
|
|
21
22
|
name: typing.Literal["node.execution"] = "node.execution"
|
22
23
|
events: typing.List[VellumNodeExecutionEvent]
|
23
24
|
attributes: NodeExecutionSpanAttributes
|
25
|
+
usage_result: typing.Optional[WorkflowExecutionUsageCalculationFulfilledBody] = None
|
24
26
|
span_id: str
|
25
27
|
start_ts: dt.datetime
|
26
28
|
end_ts: dt.datetime
|
@@ -5,8 +5,9 @@ import typing
|
|
5
5
|
from .jinja_prompt_block import JinjaPromptBlock
|
6
6
|
from .variable_prompt_block import VariablePromptBlock
|
7
7
|
from .rich_text_prompt_block import RichTextPromptBlock
|
8
|
-
from .audio_prompt_block import AudioPromptBlock
|
9
8
|
from .function_call_prompt_block import FunctionCallPromptBlock
|
9
|
+
from .audio_prompt_block import AudioPromptBlock
|
10
|
+
from .video_prompt_block import VideoPromptBlock
|
10
11
|
from .image_prompt_block import ImagePromptBlock
|
11
12
|
from .document_prompt_block import DocumentPromptBlock
|
12
13
|
import typing
|
@@ -18,8 +19,9 @@ PromptBlock = typing.Union[
|
|
18
19
|
"ChatMessagePromptBlock",
|
19
20
|
VariablePromptBlock,
|
20
21
|
RichTextPromptBlock,
|
21
|
-
AudioPromptBlock,
|
22
22
|
FunctionCallPromptBlock,
|
23
|
+
AudioPromptBlock,
|
24
|
+
VideoPromptBlock,
|
23
25
|
ImagePromptBlock,
|
24
26
|
DocumentPromptBlock,
|
25
27
|
]
|
@@ -5,8 +5,9 @@ import typing
|
|
5
5
|
from .string_vellum_value import StringVellumValue
|
6
6
|
from .number_vellum_value import NumberVellumValue
|
7
7
|
from .json_vellum_value import JsonVellumValue
|
8
|
-
from .image_vellum_value import ImageVellumValue
|
9
8
|
from .audio_vellum_value import AudioVellumValue
|
9
|
+
from .video_vellum_value import VideoVellumValue
|
10
|
+
from .image_vellum_value import ImageVellumValue
|
10
11
|
from .document_vellum_value import DocumentVellumValue
|
11
12
|
from .function_call_vellum_value import FunctionCallVellumValue
|
12
13
|
from .error_vellum_value import ErrorVellumValue
|
@@ -21,8 +22,9 @@ VellumValue = typing.Union[
|
|
21
22
|
StringVellumValue,
|
22
23
|
NumberVellumValue,
|
23
24
|
JsonVellumValue,
|
24
|
-
ImageVellumValue,
|
25
25
|
AudioVellumValue,
|
26
|
+
VideoVellumValue,
|
27
|
+
ImageVellumValue,
|
26
28
|
DocumentVellumValue,
|
27
29
|
FunctionCallVellumValue,
|
28
30
|
ErrorVellumValue,
|
@@ -5,8 +5,9 @@ import typing
|
|
5
5
|
from .string_vellum_value_request import StringVellumValueRequest
|
6
6
|
from .number_vellum_value_request import NumberVellumValueRequest
|
7
7
|
from .json_vellum_value_request import JsonVellumValueRequest
|
8
|
-
from .image_vellum_value_request import ImageVellumValueRequest
|
9
8
|
from .audio_vellum_value_request import AudioVellumValueRequest
|
9
|
+
from .video_vellum_value_request import VideoVellumValueRequest
|
10
|
+
from .image_vellum_value_request import ImageVellumValueRequest
|
10
11
|
from .document_vellum_value_request import DocumentVellumValueRequest
|
11
12
|
from .function_call_vellum_value_request import FunctionCallVellumValueRequest
|
12
13
|
from .error_vellum_value_request import ErrorVellumValueRequest
|
@@ -21,8 +22,9 @@ VellumValueRequest = typing.Union[
|
|
21
22
|
StringVellumValueRequest,
|
22
23
|
NumberVellumValueRequest,
|
23
24
|
JsonVellumValueRequest,
|
24
|
-
ImageVellumValueRequest,
|
25
25
|
AudioVellumValueRequest,
|
26
|
+
VideoVellumValueRequest,
|
27
|
+
ImageVellumValueRequest,
|
26
28
|
DocumentVellumValueRequest,
|
27
29
|
FunctionCallVellumValueRequest,
|
28
30
|
ErrorVellumValueRequest,
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import pydantic
|
5
|
+
import typing
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
|
8
|
+
|
9
|
+
class VellumVideo(UniversalBaseModel):
|
10
|
+
src: str = pydantic.Field()
|
11
|
+
"""
|
12
|
+
A valid data URL containing the video data.
|
13
|
+
"""
|
14
|
+
|
15
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
16
|
+
|
17
|
+
if IS_PYDANTIC_V2:
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
19
|
+
else:
|
20
|
+
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import pydantic
|
5
|
+
import typing
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
|
8
|
+
|
9
|
+
class VellumVideoRequest(UniversalBaseModel):
|
10
|
+
src: str = pydantic.Field()
|
11
|
+
"""
|
12
|
+
A valid data URL containing the video data.
|
13
|
+
"""
|
14
|
+
|
15
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
16
|
+
|
17
|
+
if IS_PYDANTIC_V2:
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
19
|
+
else:
|
20
|
+
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .vellum_video import VellumVideo
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class VideoChatMessageContent(UniversalBaseModel):
|
11
|
+
"""
|
12
|
+
A video value that is used in a chat message.
|
13
|
+
"""
|
14
|
+
|
15
|
+
type: typing.Literal["VIDEO"] = "VIDEO"
|
16
|
+
value: VellumVideo
|
17
|
+
|
18
|
+
if IS_PYDANTIC_V2:
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
20
|
+
else:
|
21
|
+
|
22
|
+
class Config:
|
23
|
+
frozen = True
|
24
|
+
smart_union = True
|
25
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .vellum_video_request import VellumVideoRequest
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class VideoChatMessageContentRequest(UniversalBaseModel):
|
11
|
+
"""
|
12
|
+
A video value that is used in a chat message.
|
13
|
+
"""
|
14
|
+
|
15
|
+
type: typing.Literal["VIDEO"] = "VIDEO"
|
16
|
+
value: VellumVideoRequest
|
17
|
+
|
18
|
+
if IS_PYDANTIC_V2:
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
20
|
+
else:
|
21
|
+
|
22
|
+
class Config:
|
23
|
+
frozen = True
|
24
|
+
smart_union = True
|
25
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .prompt_block_state import PromptBlockState
|
6
|
+
from .ephemeral_prompt_cache_config import EphemeralPromptCacheConfig
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
8
|
+
import pydantic
|
9
|
+
|
10
|
+
|
11
|
+
class VideoPromptBlock(UniversalBaseModel):
|
12
|
+
"""
|
13
|
+
A block that represents an video file in a prompt template.
|
14
|
+
"""
|
15
|
+
|
16
|
+
block_type: typing.Literal["VIDEO"] = "VIDEO"
|
17
|
+
state: typing.Optional[PromptBlockState] = None
|
18
|
+
cache_config: typing.Optional[EphemeralPromptCacheConfig] = None
|
19
|
+
src: str
|
20
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
21
|
+
|
22
|
+
if IS_PYDANTIC_V2:
|
23
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
24
|
+
else:
|
25
|
+
|
26
|
+
class Config:
|
27
|
+
frozen = True
|
28
|
+
smart_union = True
|
29
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .vellum_video import VellumVideo
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class VideoVellumValue(UniversalBaseModel):
|
11
|
+
"""
|
12
|
+
A base Vellum primitive value representing a video.
|
13
|
+
"""
|
14
|
+
|
15
|
+
type: typing.Literal["VIDEO"] = "VIDEO"
|
16
|
+
value: typing.Optional[VellumVideo] = None
|
17
|
+
|
18
|
+
if IS_PYDANTIC_V2:
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
20
|
+
else:
|
21
|
+
|
22
|
+
class Config:
|
23
|
+
frozen = True
|
24
|
+
smart_union = True
|
25
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from .vellum_video_request import VellumVideoRequest
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
|
9
|
+
|
10
|
+
class VideoVellumValueRequest(UniversalBaseModel):
|
11
|
+
"""
|
12
|
+
A base Vellum primitive value representing a video.
|
13
|
+
"""
|
14
|
+
|
15
|
+
type: typing.Literal["VIDEO"] = "VIDEO"
|
16
|
+
value: typing.Optional[VellumVideoRequest] = None
|
17
|
+
|
18
|
+
if IS_PYDANTIC_V2:
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
20
|
+
else:
|
21
|
+
|
22
|
+
class Config:
|
23
|
+
frozen = True
|
24
|
+
smart_union = True
|
25
|
+
extra = pydantic.Extra.allow
|