vellum-ai 1.0.11__py3-none-any.whl → 1.1.1__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 +2 -2
- vellum/client/README.md +0 -55
- vellum/client/__init__.py +159 -877
- vellum/client/core/__init__.py +3 -0
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/core/http_response.py +47 -0
- vellum/client/raw_client.py +1561 -0
- vellum/client/reference.md +22 -696
- vellum/client/resources/__init__.py +0 -2
- vellum/client/resources/ad_hoc/client.py +55 -161
- vellum/client/resources/ad_hoc/raw_client.py +278 -0
- vellum/client/resources/container_images/client.py +62 -172
- vellum/client/resources/container_images/raw_client.py +400 -0
- vellum/client/resources/deployments/client.py +112 -437
- vellum/client/resources/deployments/raw_client.py +995 -0
- vellum/client/resources/document_indexes/client.py +108 -317
- vellum/client/resources/document_indexes/raw_client.py +847 -0
- vellum/client/resources/documents/client.py +88 -285
- vellum/client/resources/documents/raw_client.py +655 -0
- vellum/client/resources/folder_entities/client.py +54 -92
- vellum/client/resources/folder_entities/raw_client.py +277 -0
- vellum/client/resources/metric_definitions/client.py +48 -95
- vellum/client/resources/metric_definitions/raw_client.py +225 -0
- vellum/client/resources/ml_models/client.py +36 -40
- vellum/client/resources/ml_models/raw_client.py +103 -0
- vellum/client/resources/organizations/client.py +34 -39
- vellum/client/resources/organizations/raw_client.py +96 -0
- vellum/client/resources/prompts/client.py +50 -193
- vellum/client/resources/prompts/raw_client.py +346 -0
- vellum/client/resources/sandboxes/client.py +68 -141
- vellum/client/resources/sandboxes/raw_client.py +393 -0
- vellum/client/resources/test_suite_runs/client.py +58 -141
- vellum/client/resources/test_suite_runs/raw_client.py +355 -0
- vellum/client/resources/test_suites/client.py +73 -141
- vellum/client/resources/test_suites/raw_client.py +379 -0
- vellum/client/resources/workflow_deployments/client.py +203 -328
- vellum/client/resources/workflow_deployments/raw_client.py +931 -0
- vellum/client/resources/workflow_executions/client.py +36 -40
- vellum/client/resources/workflow_executions/raw_client.py +97 -0
- vellum/client/resources/workflow_sandboxes/client.py +60 -108
- vellum/client/resources/workflow_sandboxes/raw_client.py +300 -0
- vellum/client/resources/workflows/client.py +68 -133
- vellum/client/resources/workflows/raw_client.py +307 -0
- vellum/client/resources/workspace_secrets/client.py +46 -90
- vellum/client/resources/workspace_secrets/raw_client.py +220 -0
- vellum/client/resources/workspaces/client.py +34 -39
- vellum/client/resources/workspaces/raw_client.py +96 -0
- vellum/client/types/__init__.py +2 -0
- vellum/client/types/api_request_parent_context.py +1 -0
- vellum/client/types/external_parent_context.py +36 -0
- vellum/client/types/node_execution_fulfilled_event.py +1 -0
- vellum/client/types/node_execution_initiated_event.py +1 -0
- vellum/client/types/node_execution_paused_event.py +1 -0
- vellum/client/types/node_execution_rejected_event.py +1 -0
- vellum/client/types/node_execution_resumed_event.py +1 -0
- vellum/client/types/node_execution_span.py +1 -0
- vellum/client/types/node_execution_span_attributes.py +1 -0
- vellum/client/types/node_execution_streaming_event.py +1 -0
- vellum/client/types/node_parent_context.py +1 -0
- vellum/client/types/parent_context.py +2 -0
- vellum/client/types/prompt_deployment_parent_context.py +1 -0
- vellum/client/types/slim_workflow_execution_read.py +1 -0
- vellum/client/types/span_link.py +1 -0
- vellum/client/types/workflow_deployment_event_executions_response.py +1 -0
- vellum/client/types/workflow_deployment_parent_context.py +1 -0
- vellum/client/types/workflow_event_execution_read.py +1 -0
- vellum/client/types/workflow_execution_detail.py +1 -0
- vellum/client/types/workflow_execution_fulfilled_event.py +1 -0
- vellum/client/types/workflow_execution_initiated_event.py +1 -0
- vellum/client/types/workflow_execution_paused_event.py +1 -0
- vellum/client/types/workflow_execution_rejected_event.py +1 -0
- vellum/client/types/workflow_execution_resumed_event.py +1 -0
- vellum/client/types/workflow_execution_snapshotted_event.py +1 -0
- vellum/client/types/workflow_execution_span.py +1 -0
- vellum/client/types/workflow_execution_span_attributes.py +1 -0
- vellum/client/types/workflow_execution_streaming_event.py +1 -0
- vellum/client/types/workflow_parent_context.py +1 -0
- vellum/client/types/workflow_sandbox_parent_context.py +1 -0
- vellum/{resources/release_reviews/__init__.py → core/http_response.py} +1 -1
- vellum/{resources/release_reviews/client.py → raw_client.py} +1 -1
- vellum/resources/ad_hoc/raw_client.py +3 -0
- vellum/resources/container_images/raw_client.py +3 -0
- vellum/resources/deployments/raw_client.py +3 -0
- vellum/resources/document_indexes/raw_client.py +3 -0
- vellum/resources/documents/raw_client.py +3 -0
- vellum/resources/folder_entities/raw_client.py +3 -0
- vellum/resources/metric_definitions/raw_client.py +3 -0
- vellum/resources/ml_models/raw_client.py +3 -0
- vellum/resources/organizations/raw_client.py +3 -0
- vellum/resources/prompts/raw_client.py +3 -0
- vellum/resources/sandboxes/raw_client.py +3 -0
- vellum/resources/test_suite_runs/raw_client.py +3 -0
- vellum/resources/test_suites/raw_client.py +3 -0
- vellum/resources/workflow_deployments/raw_client.py +3 -0
- vellum/resources/workflow_executions/raw_client.py +3 -0
- vellum/resources/workflow_sandboxes/raw_client.py +3 -0
- vellum/resources/workflows/raw_client.py +3 -0
- vellum/resources/workspace_secrets/raw_client.py +3 -0
- vellum/resources/workspaces/raw_client.py +3 -0
- vellum/types/external_parent_context.py +3 -0
- vellum/workflows/emitters/vellum_emitter.py +3 -2
- vellum/workflows/events/types.py +6 -0
- vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +5 -15
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +6 -0
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +75 -0
- vellum/workflows/state/context.py +13 -2
- vellum/workflows/types/definition.py +2 -2
- vellum/workflows/types/tests/test_definition.py +2 -3
- vellum/workflows/utils/functions.py +1 -1
- vellum/workflows/utils/tests/test_functions.py +3 -3
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/METADATA +1 -1
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/RECORD +123 -81
- vellum_ee/workflows/display/exceptions.py +7 -0
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +2 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +53 -2
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +93 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +98 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_workflow_deployment_serialization.py +1 -1
- vellum_ee/workflows/display/utils/expressions.py +1 -1
- vellum_ee/workflows/display/workflows/base_workflow_display.py +2 -1
- vellum/client/resources/release_reviews/__init__.py +0 -2
- vellum/client/resources/release_reviews/client.py +0 -139
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/LICENSE +0 -0
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/WHEEL +0 -0
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/entry_points.txt +0 -0
@@ -2,15 +2,13 @@
|
|
2
2
|
|
3
3
|
import typing
|
4
4
|
from ...core.client_wrapper import SyncClientWrapper
|
5
|
+
from .raw_client import RawContainerImagesClient
|
5
6
|
from ...core.request_options import RequestOptions
|
6
7
|
from ...types.paginated_container_image_read_list import PaginatedContainerImageReadList
|
7
|
-
from ...core.pydantic_utilities import parse_obj_as
|
8
|
-
from json.decoder import JSONDecodeError
|
9
|
-
from ...core.api_error import ApiError
|
10
8
|
from ...types.container_image_read import ContainerImageRead
|
11
|
-
from ...core.jsonable_encoder import jsonable_encoder
|
12
9
|
from ...types.docker_service_token import DockerServiceToken
|
13
10
|
from ...core.client_wrapper import AsyncClientWrapper
|
11
|
+
from .raw_client import AsyncRawContainerImagesClient
|
14
12
|
|
15
13
|
# this is used as the default value for optional parameters
|
16
14
|
OMIT = typing.cast(typing.Any, ...)
|
@@ -18,9 +16,24 @@ OMIT = typing.cast(typing.Any, ...)
|
|
18
16
|
|
19
17
|
class ContainerImagesClient:
|
20
18
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
21
|
-
self.
|
19
|
+
self._raw_client = RawContainerImagesClient(client_wrapper=client_wrapper)
|
22
20
|
|
23
|
-
|
21
|
+
@property
|
22
|
+
def _client_wrapper(self) -> SyncClientWrapper:
|
23
|
+
return self._raw_client._client_wrapper
|
24
|
+
|
25
|
+
@property
|
26
|
+
def with_raw_response(self) -> RawContainerImagesClient:
|
27
|
+
"""
|
28
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
29
|
+
|
30
|
+
Returns
|
31
|
+
-------
|
32
|
+
RawContainerImagesClient
|
33
|
+
"""
|
34
|
+
return self._raw_client
|
35
|
+
|
36
|
+
def list_(
|
24
37
|
self,
|
25
38
|
*,
|
26
39
|
limit: typing.Optional[int] = None,
|
@@ -60,30 +73,13 @@ class ContainerImagesClient:
|
|
60
73
|
)
|
61
74
|
client.container_images.list()
|
62
75
|
"""
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
params={
|
68
|
-
"limit": limit,
|
69
|
-
"offset": offset,
|
70
|
-
"ordering": ordering,
|
71
|
-
},
|
76
|
+
response = self._raw_client.list(
|
77
|
+
limit=limit,
|
78
|
+
offset=offset,
|
79
|
+
ordering=ordering,
|
72
80
|
request_options=request_options,
|
73
81
|
)
|
74
|
-
|
75
|
-
if 200 <= _response.status_code < 300:
|
76
|
-
return typing.cast(
|
77
|
-
PaginatedContainerImageReadList,
|
78
|
-
parse_obj_as(
|
79
|
-
type_=PaginatedContainerImageReadList, # type: ignore
|
80
|
-
object_=_response.json(),
|
81
|
-
),
|
82
|
-
)
|
83
|
-
_response_json = _response.json()
|
84
|
-
except JSONDecodeError:
|
85
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
86
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
82
|
+
return response.data
|
87
83
|
|
88
84
|
def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ContainerImageRead:
|
89
85
|
"""
|
@@ -114,25 +110,11 @@ class ContainerImagesClient:
|
|
114
110
|
id="id",
|
115
111
|
)
|
116
112
|
"""
|
117
|
-
|
118
|
-
|
119
|
-
base_url=self._client_wrapper.get_environment().default,
|
120
|
-
method="GET",
|
113
|
+
response = self._raw_client.retrieve(
|
114
|
+
id,
|
121
115
|
request_options=request_options,
|
122
116
|
)
|
123
|
-
|
124
|
-
if 200 <= _response.status_code < 300:
|
125
|
-
return typing.cast(
|
126
|
-
ContainerImageRead,
|
127
|
-
parse_obj_as(
|
128
|
-
type_=ContainerImageRead, # type: ignore
|
129
|
-
object_=_response.json(),
|
130
|
-
),
|
131
|
-
)
|
132
|
-
_response_json = _response.json()
|
133
|
-
except JSONDecodeError:
|
134
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
135
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
117
|
+
return response.data
|
136
118
|
|
137
119
|
def docker_service_token(self, *, request_options: typing.Optional[RequestOptions] = None) -> DockerServiceToken:
|
138
120
|
"""
|
@@ -156,25 +138,10 @@ class ContainerImagesClient:
|
|
156
138
|
)
|
157
139
|
client.container_images.docker_service_token()
|
158
140
|
"""
|
159
|
-
|
160
|
-
"v1/container-images/docker-service-token",
|
161
|
-
base_url=self._client_wrapper.get_environment().default,
|
162
|
-
method="GET",
|
141
|
+
response = self._raw_client.docker_service_token(
|
163
142
|
request_options=request_options,
|
164
143
|
)
|
165
|
-
|
166
|
-
if 200 <= _response.status_code < 300:
|
167
|
-
return typing.cast(
|
168
|
-
DockerServiceToken,
|
169
|
-
parse_obj_as(
|
170
|
-
type_=DockerServiceToken, # type: ignore
|
171
|
-
object_=_response.json(),
|
172
|
-
),
|
173
|
-
)
|
174
|
-
_response_json = _response.json()
|
175
|
-
except JSONDecodeError:
|
176
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
177
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
144
|
+
return response.data
|
178
145
|
|
179
146
|
def push_container_image(
|
180
147
|
self,
|
@@ -215,41 +182,31 @@ class ContainerImagesClient:
|
|
215
182
|
tags=["tags", "tags"],
|
216
183
|
)
|
217
184
|
"""
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
json={
|
223
|
-
"name": name,
|
224
|
-
"sha": sha,
|
225
|
-
"tags": tags,
|
226
|
-
},
|
227
|
-
headers={
|
228
|
-
"content-type": "application/json",
|
229
|
-
},
|
185
|
+
response = self._raw_client.push_container_image(
|
186
|
+
name=name,
|
187
|
+
sha=sha,
|
188
|
+
tags=tags,
|
230
189
|
request_options=request_options,
|
231
|
-
omit=OMIT,
|
232
190
|
)
|
233
|
-
|
234
|
-
if 200 <= _response.status_code < 300:
|
235
|
-
return typing.cast(
|
236
|
-
ContainerImageRead,
|
237
|
-
parse_obj_as(
|
238
|
-
type_=ContainerImageRead, # type: ignore
|
239
|
-
object_=_response.json(),
|
240
|
-
),
|
241
|
-
)
|
242
|
-
_response_json = _response.json()
|
243
|
-
except JSONDecodeError:
|
244
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
245
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
191
|
+
return response.data
|
246
192
|
|
247
193
|
|
248
194
|
class AsyncContainerImagesClient:
|
249
195
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
250
|
-
self.
|
196
|
+
self._raw_client = AsyncRawContainerImagesClient(client_wrapper=client_wrapper)
|
197
|
+
|
198
|
+
@property
|
199
|
+
def with_raw_response(self) -> AsyncRawContainerImagesClient:
|
200
|
+
"""
|
201
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
202
|
+
|
203
|
+
Returns
|
204
|
+
-------
|
205
|
+
AsyncRawContainerImagesClient
|
206
|
+
"""
|
207
|
+
return self._raw_client
|
251
208
|
|
252
|
-
async def
|
209
|
+
async def list_(
|
253
210
|
self,
|
254
211
|
*,
|
255
212
|
limit: typing.Optional[int] = None,
|
@@ -297,30 +254,13 @@ class AsyncContainerImagesClient:
|
|
297
254
|
|
298
255
|
asyncio.run(main())
|
299
256
|
"""
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
params={
|
305
|
-
"limit": limit,
|
306
|
-
"offset": offset,
|
307
|
-
"ordering": ordering,
|
308
|
-
},
|
257
|
+
response = await self._raw_client.list(
|
258
|
+
limit=limit,
|
259
|
+
offset=offset,
|
260
|
+
ordering=ordering,
|
309
261
|
request_options=request_options,
|
310
262
|
)
|
311
|
-
|
312
|
-
if 200 <= _response.status_code < 300:
|
313
|
-
return typing.cast(
|
314
|
-
PaginatedContainerImageReadList,
|
315
|
-
parse_obj_as(
|
316
|
-
type_=PaginatedContainerImageReadList, # type: ignore
|
317
|
-
object_=_response.json(),
|
318
|
-
),
|
319
|
-
)
|
320
|
-
_response_json = _response.json()
|
321
|
-
except JSONDecodeError:
|
322
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
323
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
263
|
+
return response.data
|
324
264
|
|
325
265
|
async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ContainerImageRead:
|
326
266
|
"""
|
@@ -359,25 +299,11 @@ class AsyncContainerImagesClient:
|
|
359
299
|
|
360
300
|
asyncio.run(main())
|
361
301
|
"""
|
362
|
-
|
363
|
-
|
364
|
-
base_url=self._client_wrapper.get_environment().default,
|
365
|
-
method="GET",
|
302
|
+
response = await self._raw_client.retrieve(
|
303
|
+
id,
|
366
304
|
request_options=request_options,
|
367
305
|
)
|
368
|
-
|
369
|
-
if 200 <= _response.status_code < 300:
|
370
|
-
return typing.cast(
|
371
|
-
ContainerImageRead,
|
372
|
-
parse_obj_as(
|
373
|
-
type_=ContainerImageRead, # type: ignore
|
374
|
-
object_=_response.json(),
|
375
|
-
),
|
376
|
-
)
|
377
|
-
_response_json = _response.json()
|
378
|
-
except JSONDecodeError:
|
379
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
380
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
306
|
+
return response.data
|
381
307
|
|
382
308
|
async def docker_service_token(
|
383
309
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
@@ -411,25 +337,10 @@ class AsyncContainerImagesClient:
|
|
411
337
|
|
412
338
|
asyncio.run(main())
|
413
339
|
"""
|
414
|
-
|
415
|
-
"v1/container-images/docker-service-token",
|
416
|
-
base_url=self._client_wrapper.get_environment().default,
|
417
|
-
method="GET",
|
340
|
+
response = await self._raw_client.docker_service_token(
|
418
341
|
request_options=request_options,
|
419
342
|
)
|
420
|
-
|
421
|
-
if 200 <= _response.status_code < 300:
|
422
|
-
return typing.cast(
|
423
|
-
DockerServiceToken,
|
424
|
-
parse_obj_as(
|
425
|
-
type_=DockerServiceToken, # type: ignore
|
426
|
-
object_=_response.json(),
|
427
|
-
),
|
428
|
-
)
|
429
|
-
_response_json = _response.json()
|
430
|
-
except JSONDecodeError:
|
431
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
432
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
343
|
+
return response.data
|
433
344
|
|
434
345
|
async def push_container_image(
|
435
346
|
self,
|
@@ -478,31 +389,10 @@ class AsyncContainerImagesClient:
|
|
478
389
|
|
479
390
|
asyncio.run(main())
|
480
391
|
"""
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
json={
|
486
|
-
"name": name,
|
487
|
-
"sha": sha,
|
488
|
-
"tags": tags,
|
489
|
-
},
|
490
|
-
headers={
|
491
|
-
"content-type": "application/json",
|
492
|
-
},
|
392
|
+
response = await self._raw_client.push_container_image(
|
393
|
+
name=name,
|
394
|
+
sha=sha,
|
395
|
+
tags=tags,
|
493
396
|
request_options=request_options,
|
494
|
-
omit=OMIT,
|
495
397
|
)
|
496
|
-
|
497
|
-
if 200 <= _response.status_code < 300:
|
498
|
-
return typing.cast(
|
499
|
-
ContainerImageRead,
|
500
|
-
parse_obj_as(
|
501
|
-
type_=ContainerImageRead, # type: ignore
|
502
|
-
object_=_response.json(),
|
503
|
-
),
|
504
|
-
)
|
505
|
-
_response_json = _response.json()
|
506
|
-
except JSONDecodeError:
|
507
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
508
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
398
|
+
return response.data
|