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.
Files changed (125) hide show
  1. vellum/__init__.py +2 -2
  2. vellum/client/README.md +0 -55
  3. vellum/client/__init__.py +159 -877
  4. vellum/client/core/__init__.py +3 -0
  5. vellum/client/core/client_wrapper.py +2 -2
  6. vellum/client/core/http_response.py +47 -0
  7. vellum/client/raw_client.py +1561 -0
  8. vellum/client/reference.md +22 -696
  9. vellum/client/resources/__init__.py +0 -2
  10. vellum/client/resources/ad_hoc/client.py +55 -161
  11. vellum/client/resources/ad_hoc/raw_client.py +278 -0
  12. vellum/client/resources/container_images/client.py +62 -172
  13. vellum/client/resources/container_images/raw_client.py +400 -0
  14. vellum/client/resources/deployments/client.py +112 -437
  15. vellum/client/resources/deployments/raw_client.py +995 -0
  16. vellum/client/resources/document_indexes/client.py +108 -317
  17. vellum/client/resources/document_indexes/raw_client.py +847 -0
  18. vellum/client/resources/documents/client.py +88 -285
  19. vellum/client/resources/documents/raw_client.py +655 -0
  20. vellum/client/resources/folder_entities/client.py +54 -92
  21. vellum/client/resources/folder_entities/raw_client.py +277 -0
  22. vellum/client/resources/metric_definitions/client.py +48 -95
  23. vellum/client/resources/metric_definitions/raw_client.py +225 -0
  24. vellum/client/resources/ml_models/client.py +36 -40
  25. vellum/client/resources/ml_models/raw_client.py +103 -0
  26. vellum/client/resources/organizations/client.py +34 -39
  27. vellum/client/resources/organizations/raw_client.py +96 -0
  28. vellum/client/resources/prompts/client.py +50 -193
  29. vellum/client/resources/prompts/raw_client.py +346 -0
  30. vellum/client/resources/sandboxes/client.py +68 -141
  31. vellum/client/resources/sandboxes/raw_client.py +393 -0
  32. vellum/client/resources/test_suite_runs/client.py +58 -141
  33. vellum/client/resources/test_suite_runs/raw_client.py +355 -0
  34. vellum/client/resources/test_suites/client.py +73 -141
  35. vellum/client/resources/test_suites/raw_client.py +379 -0
  36. vellum/client/resources/workflow_deployments/client.py +203 -328
  37. vellum/client/resources/workflow_deployments/raw_client.py +931 -0
  38. vellum/client/resources/workflow_executions/client.py +36 -40
  39. vellum/client/resources/workflow_executions/raw_client.py +97 -0
  40. vellum/client/resources/workflow_sandboxes/client.py +60 -108
  41. vellum/client/resources/workflow_sandboxes/raw_client.py +300 -0
  42. vellum/client/resources/workflows/client.py +68 -133
  43. vellum/client/resources/workflows/raw_client.py +307 -0
  44. vellum/client/resources/workspace_secrets/client.py +46 -90
  45. vellum/client/resources/workspace_secrets/raw_client.py +220 -0
  46. vellum/client/resources/workspaces/client.py +34 -39
  47. vellum/client/resources/workspaces/raw_client.py +96 -0
  48. vellum/client/types/__init__.py +2 -0
  49. vellum/client/types/api_request_parent_context.py +1 -0
  50. vellum/client/types/external_parent_context.py +36 -0
  51. vellum/client/types/node_execution_fulfilled_event.py +1 -0
  52. vellum/client/types/node_execution_initiated_event.py +1 -0
  53. vellum/client/types/node_execution_paused_event.py +1 -0
  54. vellum/client/types/node_execution_rejected_event.py +1 -0
  55. vellum/client/types/node_execution_resumed_event.py +1 -0
  56. vellum/client/types/node_execution_span.py +1 -0
  57. vellum/client/types/node_execution_span_attributes.py +1 -0
  58. vellum/client/types/node_execution_streaming_event.py +1 -0
  59. vellum/client/types/node_parent_context.py +1 -0
  60. vellum/client/types/parent_context.py +2 -0
  61. vellum/client/types/prompt_deployment_parent_context.py +1 -0
  62. vellum/client/types/slim_workflow_execution_read.py +1 -0
  63. vellum/client/types/span_link.py +1 -0
  64. vellum/client/types/workflow_deployment_event_executions_response.py +1 -0
  65. vellum/client/types/workflow_deployment_parent_context.py +1 -0
  66. vellum/client/types/workflow_event_execution_read.py +1 -0
  67. vellum/client/types/workflow_execution_detail.py +1 -0
  68. vellum/client/types/workflow_execution_fulfilled_event.py +1 -0
  69. vellum/client/types/workflow_execution_initiated_event.py +1 -0
  70. vellum/client/types/workflow_execution_paused_event.py +1 -0
  71. vellum/client/types/workflow_execution_rejected_event.py +1 -0
  72. vellum/client/types/workflow_execution_resumed_event.py +1 -0
  73. vellum/client/types/workflow_execution_snapshotted_event.py +1 -0
  74. vellum/client/types/workflow_execution_span.py +1 -0
  75. vellum/client/types/workflow_execution_span_attributes.py +1 -0
  76. vellum/client/types/workflow_execution_streaming_event.py +1 -0
  77. vellum/client/types/workflow_parent_context.py +1 -0
  78. vellum/client/types/workflow_sandbox_parent_context.py +1 -0
  79. vellum/{resources/release_reviews/__init__.py → core/http_response.py} +1 -1
  80. vellum/{resources/release_reviews/client.py → raw_client.py} +1 -1
  81. vellum/resources/ad_hoc/raw_client.py +3 -0
  82. vellum/resources/container_images/raw_client.py +3 -0
  83. vellum/resources/deployments/raw_client.py +3 -0
  84. vellum/resources/document_indexes/raw_client.py +3 -0
  85. vellum/resources/documents/raw_client.py +3 -0
  86. vellum/resources/folder_entities/raw_client.py +3 -0
  87. vellum/resources/metric_definitions/raw_client.py +3 -0
  88. vellum/resources/ml_models/raw_client.py +3 -0
  89. vellum/resources/organizations/raw_client.py +3 -0
  90. vellum/resources/prompts/raw_client.py +3 -0
  91. vellum/resources/sandboxes/raw_client.py +3 -0
  92. vellum/resources/test_suite_runs/raw_client.py +3 -0
  93. vellum/resources/test_suites/raw_client.py +3 -0
  94. vellum/resources/workflow_deployments/raw_client.py +3 -0
  95. vellum/resources/workflow_executions/raw_client.py +3 -0
  96. vellum/resources/workflow_sandboxes/raw_client.py +3 -0
  97. vellum/resources/workflows/raw_client.py +3 -0
  98. vellum/resources/workspace_secrets/raw_client.py +3 -0
  99. vellum/resources/workspaces/raw_client.py +3 -0
  100. vellum/types/external_parent_context.py +3 -0
  101. vellum/workflows/emitters/vellum_emitter.py +3 -2
  102. vellum/workflows/events/types.py +6 -0
  103. vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +5 -15
  104. vellum/workflows/nodes/displayable/tool_calling_node/node.py +6 -0
  105. vellum/workflows/nodes/displayable/tool_calling_node/utils.py +75 -0
  106. vellum/workflows/state/context.py +13 -2
  107. vellum/workflows/types/definition.py +2 -2
  108. vellum/workflows/types/tests/test_definition.py +2 -3
  109. vellum/workflows/utils/functions.py +1 -1
  110. vellum/workflows/utils/tests/test_functions.py +3 -3
  111. {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/METADATA +1 -1
  112. {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/RECORD +123 -81
  113. vellum_ee/workflows/display/exceptions.py +7 -0
  114. vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +2 -1
  115. vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +53 -2
  116. vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +93 -0
  117. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +98 -0
  118. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_workflow_deployment_serialization.py +1 -1
  119. vellum_ee/workflows/display/utils/expressions.py +1 -1
  120. vellum_ee/workflows/display/workflows/base_workflow_display.py +2 -1
  121. vellum/client/resources/release_reviews/__init__.py +0 -2
  122. vellum/client/resources/release_reviews/client.py +0 -139
  123. {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/LICENSE +0 -0
  124. {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.dist-info}/WHEEL +0 -0
  125. {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.1.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)