vellum-ai 1.1.0__py3-none-any.whl → 1.1.2__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/README.md +0 -55
- vellum/client/__init__.py +159 -873
- 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/core/pydantic_utilities.py +10 -3
- vellum/client/raw_client.py +1561 -0
- vellum/client/reference.md +20 -693
- 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 +118 -362
- 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/core/http_response.py +3 -0
- vellum/raw_client.py +3 -0
- 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_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/METADATA +1 -1
- {vellum_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/RECORD +76 -33
- 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/workflows/base_workflow_display.py +2 -1
- {vellum_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/LICENSE +0 -0
- {vellum_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/WHEEL +0 -0
- {vellum_ai-1.1.0.dist-info → vellum_ai-1.1.2.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,400 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
from ...core.client_wrapper import SyncClientWrapper
|
5
|
+
from ...core.request_options import RequestOptions
|
6
|
+
from ...core.http_response import HttpResponse
|
7
|
+
from ...types.paginated_container_image_read_list import PaginatedContainerImageReadList
|
8
|
+
from ...core.pydantic_utilities import parse_obj_as
|
9
|
+
from json.decoder import JSONDecodeError
|
10
|
+
from ...core.api_error import ApiError
|
11
|
+
from ...types.container_image_read import ContainerImageRead
|
12
|
+
from ...core.jsonable_encoder import jsonable_encoder
|
13
|
+
from ...types.docker_service_token import DockerServiceToken
|
14
|
+
from ...core.client_wrapper import AsyncClientWrapper
|
15
|
+
from ...core.http_response import AsyncHttpResponse
|
16
|
+
|
17
|
+
# this is used as the default value for optional parameters
|
18
|
+
OMIT = typing.cast(typing.Any, ...)
|
19
|
+
|
20
|
+
|
21
|
+
class RawContainerImagesClient:
|
22
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
23
|
+
self._client_wrapper = client_wrapper
|
24
|
+
|
25
|
+
def list(
|
26
|
+
self,
|
27
|
+
*,
|
28
|
+
limit: typing.Optional[int] = None,
|
29
|
+
offset: typing.Optional[int] = None,
|
30
|
+
ordering: typing.Optional[str] = None,
|
31
|
+
request_options: typing.Optional[RequestOptions] = None,
|
32
|
+
) -> HttpResponse[PaginatedContainerImageReadList]:
|
33
|
+
"""
|
34
|
+
Retrieve a list of container images for the organization.
|
35
|
+
|
36
|
+
Parameters
|
37
|
+
----------
|
38
|
+
limit : typing.Optional[int]
|
39
|
+
Number of results to return per page.
|
40
|
+
|
41
|
+
offset : typing.Optional[int]
|
42
|
+
The initial index from which to return the results.
|
43
|
+
|
44
|
+
ordering : typing.Optional[str]
|
45
|
+
Which field to use when ordering the results.
|
46
|
+
|
47
|
+
request_options : typing.Optional[RequestOptions]
|
48
|
+
Request-specific configuration.
|
49
|
+
|
50
|
+
Returns
|
51
|
+
-------
|
52
|
+
HttpResponse[PaginatedContainerImageReadList]
|
53
|
+
|
54
|
+
"""
|
55
|
+
_response = self._client_wrapper.httpx_client.request(
|
56
|
+
"v1/container-images",
|
57
|
+
base_url=self._client_wrapper.get_environment().default,
|
58
|
+
method="GET",
|
59
|
+
params={
|
60
|
+
"limit": limit,
|
61
|
+
"offset": offset,
|
62
|
+
"ordering": ordering,
|
63
|
+
},
|
64
|
+
request_options=request_options,
|
65
|
+
)
|
66
|
+
try:
|
67
|
+
if 200 <= _response.status_code < 300:
|
68
|
+
_data = typing.cast(
|
69
|
+
PaginatedContainerImageReadList,
|
70
|
+
parse_obj_as(
|
71
|
+
type_=PaginatedContainerImageReadList, # type: ignore
|
72
|
+
object_=_response.json(),
|
73
|
+
),
|
74
|
+
)
|
75
|
+
return HttpResponse(response=_response, data=_data)
|
76
|
+
_response_json = _response.json()
|
77
|
+
except JSONDecodeError:
|
78
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
79
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
80
|
+
|
81
|
+
def retrieve(
|
82
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
83
|
+
) -> HttpResponse[ContainerImageRead]:
|
84
|
+
"""
|
85
|
+
Retrieve a Container Image by its ID or name.
|
86
|
+
|
87
|
+
Parameters
|
88
|
+
----------
|
89
|
+
id : str
|
90
|
+
Either the Container Image's ID or its unique name
|
91
|
+
|
92
|
+
request_options : typing.Optional[RequestOptions]
|
93
|
+
Request-specific configuration.
|
94
|
+
|
95
|
+
Returns
|
96
|
+
-------
|
97
|
+
HttpResponse[ContainerImageRead]
|
98
|
+
|
99
|
+
"""
|
100
|
+
_response = self._client_wrapper.httpx_client.request(
|
101
|
+
f"v1/container-images/{jsonable_encoder(id)}",
|
102
|
+
base_url=self._client_wrapper.get_environment().default,
|
103
|
+
method="GET",
|
104
|
+
request_options=request_options,
|
105
|
+
)
|
106
|
+
try:
|
107
|
+
if 200 <= _response.status_code < 300:
|
108
|
+
_data = typing.cast(
|
109
|
+
ContainerImageRead,
|
110
|
+
parse_obj_as(
|
111
|
+
type_=ContainerImageRead, # type: ignore
|
112
|
+
object_=_response.json(),
|
113
|
+
),
|
114
|
+
)
|
115
|
+
return HttpResponse(response=_response, data=_data)
|
116
|
+
_response_json = _response.json()
|
117
|
+
except JSONDecodeError:
|
118
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
119
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
120
|
+
|
121
|
+
def docker_service_token(
|
122
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
123
|
+
) -> HttpResponse[DockerServiceToken]:
|
124
|
+
"""
|
125
|
+
Parameters
|
126
|
+
----------
|
127
|
+
request_options : typing.Optional[RequestOptions]
|
128
|
+
Request-specific configuration.
|
129
|
+
|
130
|
+
Returns
|
131
|
+
-------
|
132
|
+
HttpResponse[DockerServiceToken]
|
133
|
+
|
134
|
+
"""
|
135
|
+
_response = self._client_wrapper.httpx_client.request(
|
136
|
+
"v1/container-images/docker-service-token",
|
137
|
+
base_url=self._client_wrapper.get_environment().default,
|
138
|
+
method="GET",
|
139
|
+
request_options=request_options,
|
140
|
+
)
|
141
|
+
try:
|
142
|
+
if 200 <= _response.status_code < 300:
|
143
|
+
_data = typing.cast(
|
144
|
+
DockerServiceToken,
|
145
|
+
parse_obj_as(
|
146
|
+
type_=DockerServiceToken, # type: ignore
|
147
|
+
object_=_response.json(),
|
148
|
+
),
|
149
|
+
)
|
150
|
+
return HttpResponse(response=_response, data=_data)
|
151
|
+
_response_json = _response.json()
|
152
|
+
except JSONDecodeError:
|
153
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
154
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
155
|
+
|
156
|
+
def push_container_image(
|
157
|
+
self,
|
158
|
+
*,
|
159
|
+
name: str,
|
160
|
+
sha: str,
|
161
|
+
tags: typing.Sequence[str],
|
162
|
+
request_options: typing.Optional[RequestOptions] = None,
|
163
|
+
) -> HttpResponse[ContainerImageRead]:
|
164
|
+
"""
|
165
|
+
Parameters
|
166
|
+
----------
|
167
|
+
name : str
|
168
|
+
|
169
|
+
sha : str
|
170
|
+
|
171
|
+
tags : typing.Sequence[str]
|
172
|
+
|
173
|
+
request_options : typing.Optional[RequestOptions]
|
174
|
+
Request-specific configuration.
|
175
|
+
|
176
|
+
Returns
|
177
|
+
-------
|
178
|
+
HttpResponse[ContainerImageRead]
|
179
|
+
|
180
|
+
"""
|
181
|
+
_response = self._client_wrapper.httpx_client.request(
|
182
|
+
"v1/container-images/push",
|
183
|
+
base_url=self._client_wrapper.get_environment().default,
|
184
|
+
method="POST",
|
185
|
+
json={
|
186
|
+
"name": name,
|
187
|
+
"sha": sha,
|
188
|
+
"tags": tags,
|
189
|
+
},
|
190
|
+
headers={
|
191
|
+
"content-type": "application/json",
|
192
|
+
},
|
193
|
+
request_options=request_options,
|
194
|
+
omit=OMIT,
|
195
|
+
)
|
196
|
+
try:
|
197
|
+
if 200 <= _response.status_code < 300:
|
198
|
+
_data = typing.cast(
|
199
|
+
ContainerImageRead,
|
200
|
+
parse_obj_as(
|
201
|
+
type_=ContainerImageRead, # type: ignore
|
202
|
+
object_=_response.json(),
|
203
|
+
),
|
204
|
+
)
|
205
|
+
return HttpResponse(response=_response, data=_data)
|
206
|
+
_response_json = _response.json()
|
207
|
+
except JSONDecodeError:
|
208
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
209
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
210
|
+
|
211
|
+
|
212
|
+
class AsyncRawContainerImagesClient:
|
213
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
214
|
+
self._client_wrapper = client_wrapper
|
215
|
+
|
216
|
+
async def list(
|
217
|
+
self,
|
218
|
+
*,
|
219
|
+
limit: typing.Optional[int] = None,
|
220
|
+
offset: typing.Optional[int] = None,
|
221
|
+
ordering: typing.Optional[str] = None,
|
222
|
+
request_options: typing.Optional[RequestOptions] = None,
|
223
|
+
) -> AsyncHttpResponse[PaginatedContainerImageReadList]:
|
224
|
+
"""
|
225
|
+
Retrieve a list of container images for the organization.
|
226
|
+
|
227
|
+
Parameters
|
228
|
+
----------
|
229
|
+
limit : typing.Optional[int]
|
230
|
+
Number of results to return per page.
|
231
|
+
|
232
|
+
offset : typing.Optional[int]
|
233
|
+
The initial index from which to return the results.
|
234
|
+
|
235
|
+
ordering : typing.Optional[str]
|
236
|
+
Which field to use when ordering the results.
|
237
|
+
|
238
|
+
request_options : typing.Optional[RequestOptions]
|
239
|
+
Request-specific configuration.
|
240
|
+
|
241
|
+
Returns
|
242
|
+
-------
|
243
|
+
AsyncHttpResponse[PaginatedContainerImageReadList]
|
244
|
+
|
245
|
+
"""
|
246
|
+
_response = await self._client_wrapper.httpx_client.request(
|
247
|
+
"v1/container-images",
|
248
|
+
base_url=self._client_wrapper.get_environment().default,
|
249
|
+
method="GET",
|
250
|
+
params={
|
251
|
+
"limit": limit,
|
252
|
+
"offset": offset,
|
253
|
+
"ordering": ordering,
|
254
|
+
},
|
255
|
+
request_options=request_options,
|
256
|
+
)
|
257
|
+
try:
|
258
|
+
if 200 <= _response.status_code < 300:
|
259
|
+
_data = typing.cast(
|
260
|
+
PaginatedContainerImageReadList,
|
261
|
+
parse_obj_as(
|
262
|
+
type_=PaginatedContainerImageReadList, # type: ignore
|
263
|
+
object_=_response.json(),
|
264
|
+
),
|
265
|
+
)
|
266
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
267
|
+
_response_json = _response.json()
|
268
|
+
except JSONDecodeError:
|
269
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
270
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
271
|
+
|
272
|
+
async def retrieve(
|
273
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
274
|
+
) -> AsyncHttpResponse[ContainerImageRead]:
|
275
|
+
"""
|
276
|
+
Retrieve a Container Image by its ID or name.
|
277
|
+
|
278
|
+
Parameters
|
279
|
+
----------
|
280
|
+
id : str
|
281
|
+
Either the Container Image's ID or its unique name
|
282
|
+
|
283
|
+
request_options : typing.Optional[RequestOptions]
|
284
|
+
Request-specific configuration.
|
285
|
+
|
286
|
+
Returns
|
287
|
+
-------
|
288
|
+
AsyncHttpResponse[ContainerImageRead]
|
289
|
+
|
290
|
+
"""
|
291
|
+
_response = await self._client_wrapper.httpx_client.request(
|
292
|
+
f"v1/container-images/{jsonable_encoder(id)}",
|
293
|
+
base_url=self._client_wrapper.get_environment().default,
|
294
|
+
method="GET",
|
295
|
+
request_options=request_options,
|
296
|
+
)
|
297
|
+
try:
|
298
|
+
if 200 <= _response.status_code < 300:
|
299
|
+
_data = typing.cast(
|
300
|
+
ContainerImageRead,
|
301
|
+
parse_obj_as(
|
302
|
+
type_=ContainerImageRead, # type: ignore
|
303
|
+
object_=_response.json(),
|
304
|
+
),
|
305
|
+
)
|
306
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
307
|
+
_response_json = _response.json()
|
308
|
+
except JSONDecodeError:
|
309
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
310
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
311
|
+
|
312
|
+
async def docker_service_token(
|
313
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
314
|
+
) -> AsyncHttpResponse[DockerServiceToken]:
|
315
|
+
"""
|
316
|
+
Parameters
|
317
|
+
----------
|
318
|
+
request_options : typing.Optional[RequestOptions]
|
319
|
+
Request-specific configuration.
|
320
|
+
|
321
|
+
Returns
|
322
|
+
-------
|
323
|
+
AsyncHttpResponse[DockerServiceToken]
|
324
|
+
|
325
|
+
"""
|
326
|
+
_response = await self._client_wrapper.httpx_client.request(
|
327
|
+
"v1/container-images/docker-service-token",
|
328
|
+
base_url=self._client_wrapper.get_environment().default,
|
329
|
+
method="GET",
|
330
|
+
request_options=request_options,
|
331
|
+
)
|
332
|
+
try:
|
333
|
+
if 200 <= _response.status_code < 300:
|
334
|
+
_data = typing.cast(
|
335
|
+
DockerServiceToken,
|
336
|
+
parse_obj_as(
|
337
|
+
type_=DockerServiceToken, # type: ignore
|
338
|
+
object_=_response.json(),
|
339
|
+
),
|
340
|
+
)
|
341
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
342
|
+
_response_json = _response.json()
|
343
|
+
except JSONDecodeError:
|
344
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
345
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
346
|
+
|
347
|
+
async def push_container_image(
|
348
|
+
self,
|
349
|
+
*,
|
350
|
+
name: str,
|
351
|
+
sha: str,
|
352
|
+
tags: typing.Sequence[str],
|
353
|
+
request_options: typing.Optional[RequestOptions] = None,
|
354
|
+
) -> AsyncHttpResponse[ContainerImageRead]:
|
355
|
+
"""
|
356
|
+
Parameters
|
357
|
+
----------
|
358
|
+
name : str
|
359
|
+
|
360
|
+
sha : str
|
361
|
+
|
362
|
+
tags : typing.Sequence[str]
|
363
|
+
|
364
|
+
request_options : typing.Optional[RequestOptions]
|
365
|
+
Request-specific configuration.
|
366
|
+
|
367
|
+
Returns
|
368
|
+
-------
|
369
|
+
AsyncHttpResponse[ContainerImageRead]
|
370
|
+
|
371
|
+
"""
|
372
|
+
_response = await self._client_wrapper.httpx_client.request(
|
373
|
+
"v1/container-images/push",
|
374
|
+
base_url=self._client_wrapper.get_environment().default,
|
375
|
+
method="POST",
|
376
|
+
json={
|
377
|
+
"name": name,
|
378
|
+
"sha": sha,
|
379
|
+
"tags": tags,
|
380
|
+
},
|
381
|
+
headers={
|
382
|
+
"content-type": "application/json",
|
383
|
+
},
|
384
|
+
request_options=request_options,
|
385
|
+
omit=OMIT,
|
386
|
+
)
|
387
|
+
try:
|
388
|
+
if 200 <= _response.status_code < 300:
|
389
|
+
_data = typing.cast(
|
390
|
+
ContainerImageRead,
|
391
|
+
parse_obj_as(
|
392
|
+
type_=ContainerImageRead, # type: ignore
|
393
|
+
object_=_response.json(),
|
394
|
+
),
|
395
|
+
)
|
396
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
397
|
+
_response_json = _response.json()
|
398
|
+
except JSONDecodeError:
|
399
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
400
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|