vellum-ai 0.6.2__py3-none-any.whl → 0.6.4__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 +58 -2
- vellum/client.py +11 -15
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/__init__.py +2 -2
- vellum/resources/deployments/client.py +0 -167
- vellum/resources/sandboxes/client.py +167 -0
- vellum/resources/test_suites/client.py +175 -6
- vellum/resources/{prompt_versions → workflow_sandboxes}/client.py +39 -39
- vellum/types/__init__.py +60 -0
- vellum/types/bulk_create_test_suite_test_case_data_request.py +39 -0
- vellum/types/bulk_replace_test_suite_test_case_data_request.py +44 -0
- vellum/types/create_enum.py +5 -0
- vellum/types/created_enum.py +5 -0
- vellum/types/delete_enum.py +5 -0
- vellum/types/deleted_enum.py +5 -0
- vellum/types/replace_enum.py +5 -0
- vellum/types/replaced_enum.py +5 -0
- vellum/types/test_suite_test_case_bulk_operation_request.py +46 -0
- vellum/types/test_suite_test_case_bulk_result.py +58 -0
- vellum/types/test_suite_test_case_create_bulk_operation_request.py +35 -0
- vellum/types/test_suite_test_case_created_bulk_result.py +31 -0
- vellum/types/test_suite_test_case_created_bulk_result_data.py +29 -0
- vellum/types/test_suite_test_case_delete_bulk_operation_data_request.py +25 -0
- vellum/types/test_suite_test_case_delete_bulk_operation_request.py +38 -0
- vellum/types/test_suite_test_case_deleted_bulk_result.py +35 -0
- vellum/types/test_suite_test_case_deleted_bulk_result_data.py +29 -0
- vellum/types/test_suite_test_case_rejected_bulk_result.py +37 -0
- vellum/types/test_suite_test_case_replace_bulk_operation_request.py +35 -0
- vellum/types/test_suite_test_case_replaced_bulk_result.py +35 -0
- vellum/types/test_suite_test_case_replaced_bulk_result_data.py +29 -0
- {vellum_ai-0.6.2.dist-info → vellum_ai-0.6.4.dist-info}/METADATA +1 -1
- {vellum_ai-0.6.2.dist-info → vellum_ai-0.6.4.dist-info}/RECORD +35 -14
- /vellum/resources/{prompt_versions → workflow_sandboxes}/__init__.py +0 -0
- {vellum_ai-0.6.2.dist-info → vellum_ai-0.6.4.dist-info}/LICENSE +0 -0
- {vellum_ai-0.6.2.dist-info → vellum_ai-0.6.4.dist-info}/WHEEL +0 -0
@@ -1,5 +1,6 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
+
import json
|
3
4
|
import typing
|
4
5
|
import urllib.parse
|
5
6
|
from json.decoder import JSONDecodeError
|
@@ -13,6 +14,8 @@ from ...core.request_options import RequestOptions
|
|
13
14
|
from ...types.named_test_case_variable_value_request import NamedTestCaseVariableValueRequest
|
14
15
|
from ...types.paginated_test_suite_test_case_list import PaginatedTestSuiteTestCaseList
|
15
16
|
from ...types.test_suite_test_case import TestSuiteTestCase
|
17
|
+
from ...types.test_suite_test_case_bulk_operation_request import TestSuiteTestCaseBulkOperationRequest
|
18
|
+
from ...types.test_suite_test_case_bulk_result import TestSuiteTestCaseBulkResult
|
16
19
|
|
17
20
|
# this is used as the default value for optional parameters
|
18
21
|
OMIT = typing.cast(typing.Any, ...)
|
@@ -114,13 +117,13 @@ class TestSuitesClient:
|
|
114
117
|
Parameters:
|
115
118
|
- id: str. A UUID string identifying this test suite.
|
116
119
|
|
117
|
-
- upsert_test_suite_test_case_request_id: typing.Optional[str].
|
120
|
+
- upsert_test_suite_test_case_request_id: typing.Optional[str]. The ID of the Test Case to upsert. If specified and a match is found, the existing Test Case will be updated. If specified and no match is found, a Test Case will be created with the provided ID. If not provided, a new Test Case will be created with an auto-generated ID.
|
118
121
|
|
119
122
|
- label: typing.Optional[str].
|
120
123
|
|
121
|
-
- input_values: typing.Sequence[NamedTestCaseVariableValueRequest].
|
124
|
+
- input_values: typing.Sequence[NamedTestCaseVariableValueRequest]. Values for each of the Test Case's input variables
|
122
125
|
|
123
|
-
- evaluation_values: typing.Sequence[NamedTestCaseVariableValueRequest].
|
126
|
+
- evaluation_values: typing.Sequence[NamedTestCaseVariableValueRequest]. Values for each of the Test Case's evaluation variables
|
124
127
|
|
125
128
|
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
126
129
|
---
|
@@ -177,6 +180,89 @@ class TestSuitesClient:
|
|
177
180
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
178
181
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
179
182
|
|
183
|
+
def test_suite_test_cases_bulk(
|
184
|
+
self,
|
185
|
+
id: str,
|
186
|
+
*,
|
187
|
+
request: typing.Sequence[TestSuiteTestCaseBulkOperationRequest],
|
188
|
+
request_options: typing.Optional[RequestOptions] = None,
|
189
|
+
) -> typing.Iterator[typing.List[TestSuiteTestCaseBulkResult]]:
|
190
|
+
"""
|
191
|
+
Created, replace, and delete Test Cases within the specified Test Suite in bulk
|
192
|
+
|
193
|
+
Parameters:
|
194
|
+
- id: str. A UUID string identifying this test suite.
|
195
|
+
|
196
|
+
- request: typing.Sequence[TestSuiteTestCaseBulkOperationRequest].
|
197
|
+
|
198
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
199
|
+
---
|
200
|
+
from vellum import (
|
201
|
+
BulkCreateTestSuiteTestCaseDataRequest,
|
202
|
+
NamedTestCaseVariableValueRequest_String,
|
203
|
+
TestSuiteTestCaseBulkOperationRequest_Create,
|
204
|
+
)
|
205
|
+
from vellum.client import Vellum
|
206
|
+
|
207
|
+
client = Vellum(
|
208
|
+
api_key="YOUR_API_KEY",
|
209
|
+
)
|
210
|
+
client.test_suites.test_suite_test_cases_bulk(
|
211
|
+
id="string",
|
212
|
+
request=[
|
213
|
+
TestSuiteTestCaseBulkOperationRequest_Create(
|
214
|
+
id="string",
|
215
|
+
data=BulkCreateTestSuiteTestCaseDataRequest(
|
216
|
+
label="string",
|
217
|
+
input_values=[NamedTestCaseVariableValueRequest_String()],
|
218
|
+
evaluation_values=[NamedTestCaseVariableValueRequest_String()],
|
219
|
+
),
|
220
|
+
)
|
221
|
+
],
|
222
|
+
)
|
223
|
+
"""
|
224
|
+
with self._client_wrapper.httpx_client.stream(
|
225
|
+
method="POST",
|
226
|
+
url=urllib.parse.urljoin(
|
227
|
+
f"{self._client_wrapper.get_environment().default}/",
|
228
|
+
f"v1/test-suites/{jsonable_encoder(id)}/test-cases-bulk",
|
229
|
+
),
|
230
|
+
params=jsonable_encoder(
|
231
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
232
|
+
),
|
233
|
+
json=jsonable_encoder(request)
|
234
|
+
if request_options is None or request_options.get("additional_body_parameters") is None
|
235
|
+
else {
|
236
|
+
**jsonable_encoder(request),
|
237
|
+
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
238
|
+
},
|
239
|
+
headers=jsonable_encoder(
|
240
|
+
remove_none_from_dict(
|
241
|
+
{
|
242
|
+
**self._client_wrapper.get_headers(),
|
243
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
244
|
+
}
|
245
|
+
)
|
246
|
+
),
|
247
|
+
timeout=request_options.get("timeout_in_seconds")
|
248
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
249
|
+
else self._client_wrapper.get_timeout(),
|
250
|
+
retries=0,
|
251
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
252
|
+
) as _response:
|
253
|
+
if 200 <= _response.status_code < 300:
|
254
|
+
for _text in _response.iter_lines():
|
255
|
+
if len(_text) == 0:
|
256
|
+
continue
|
257
|
+
yield pydantic_v1.parse_obj_as(typing.List[TestSuiteTestCaseBulkResult], json.loads(_text)) # type: ignore
|
258
|
+
return
|
259
|
+
_response.read()
|
260
|
+
try:
|
261
|
+
_response_json = _response.json()
|
262
|
+
except JSONDecodeError:
|
263
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
264
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
265
|
+
|
180
266
|
def delete_test_suite_test_case(
|
181
267
|
self, id: str, test_case_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
182
268
|
) -> None:
|
@@ -328,13 +414,13 @@ class AsyncTestSuitesClient:
|
|
328
414
|
Parameters:
|
329
415
|
- id: str. A UUID string identifying this test suite.
|
330
416
|
|
331
|
-
- upsert_test_suite_test_case_request_id: typing.Optional[str].
|
417
|
+
- upsert_test_suite_test_case_request_id: typing.Optional[str]. The ID of the Test Case to upsert. If specified and a match is found, the existing Test Case will be updated. If specified and no match is found, a Test Case will be created with the provided ID. If not provided, a new Test Case will be created with an auto-generated ID.
|
332
418
|
|
333
419
|
- label: typing.Optional[str].
|
334
420
|
|
335
|
-
- input_values: typing.Sequence[NamedTestCaseVariableValueRequest].
|
421
|
+
- input_values: typing.Sequence[NamedTestCaseVariableValueRequest]. Values for each of the Test Case's input variables
|
336
422
|
|
337
|
-
- evaluation_values: typing.Sequence[NamedTestCaseVariableValueRequest].
|
423
|
+
- evaluation_values: typing.Sequence[NamedTestCaseVariableValueRequest]. Values for each of the Test Case's evaluation variables
|
338
424
|
|
339
425
|
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
340
426
|
---
|
@@ -391,6 +477,89 @@ class AsyncTestSuitesClient:
|
|
391
477
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
392
478
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
393
479
|
|
480
|
+
async def test_suite_test_cases_bulk(
|
481
|
+
self,
|
482
|
+
id: str,
|
483
|
+
*,
|
484
|
+
request: typing.Sequence[TestSuiteTestCaseBulkOperationRequest],
|
485
|
+
request_options: typing.Optional[RequestOptions] = None,
|
486
|
+
) -> typing.AsyncIterator[typing.List[TestSuiteTestCaseBulkResult]]:
|
487
|
+
"""
|
488
|
+
Created, replace, and delete Test Cases within the specified Test Suite in bulk
|
489
|
+
|
490
|
+
Parameters:
|
491
|
+
- id: str. A UUID string identifying this test suite.
|
492
|
+
|
493
|
+
- request: typing.Sequence[TestSuiteTestCaseBulkOperationRequest].
|
494
|
+
|
495
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
496
|
+
---
|
497
|
+
from vellum import (
|
498
|
+
BulkCreateTestSuiteTestCaseDataRequest,
|
499
|
+
NamedTestCaseVariableValueRequest_String,
|
500
|
+
TestSuiteTestCaseBulkOperationRequest_Create,
|
501
|
+
)
|
502
|
+
from vellum.client import AsyncVellum
|
503
|
+
|
504
|
+
client = AsyncVellum(
|
505
|
+
api_key="YOUR_API_KEY",
|
506
|
+
)
|
507
|
+
await client.test_suites.test_suite_test_cases_bulk(
|
508
|
+
id="string",
|
509
|
+
request=[
|
510
|
+
TestSuiteTestCaseBulkOperationRequest_Create(
|
511
|
+
id="string",
|
512
|
+
data=BulkCreateTestSuiteTestCaseDataRequest(
|
513
|
+
label="string",
|
514
|
+
input_values=[NamedTestCaseVariableValueRequest_String()],
|
515
|
+
evaluation_values=[NamedTestCaseVariableValueRequest_String()],
|
516
|
+
),
|
517
|
+
)
|
518
|
+
],
|
519
|
+
)
|
520
|
+
"""
|
521
|
+
async with self._client_wrapper.httpx_client.stream(
|
522
|
+
method="POST",
|
523
|
+
url=urllib.parse.urljoin(
|
524
|
+
f"{self._client_wrapper.get_environment().default}/",
|
525
|
+
f"v1/test-suites/{jsonable_encoder(id)}/test-cases-bulk",
|
526
|
+
),
|
527
|
+
params=jsonable_encoder(
|
528
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
529
|
+
),
|
530
|
+
json=jsonable_encoder(request)
|
531
|
+
if request_options is None or request_options.get("additional_body_parameters") is None
|
532
|
+
else {
|
533
|
+
**jsonable_encoder(request),
|
534
|
+
**(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
|
535
|
+
},
|
536
|
+
headers=jsonable_encoder(
|
537
|
+
remove_none_from_dict(
|
538
|
+
{
|
539
|
+
**self._client_wrapper.get_headers(),
|
540
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
541
|
+
}
|
542
|
+
)
|
543
|
+
),
|
544
|
+
timeout=request_options.get("timeout_in_seconds")
|
545
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
546
|
+
else self._client_wrapper.get_timeout(),
|
547
|
+
retries=0,
|
548
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
549
|
+
) as _response:
|
550
|
+
if 200 <= _response.status_code < 300:
|
551
|
+
async for _text in _response.aiter_lines():
|
552
|
+
if len(_text) == 0:
|
553
|
+
continue
|
554
|
+
yield pydantic_v1.parse_obj_as(typing.List[TestSuiteTestCaseBulkResult], json.loads(_text)) # type: ignore
|
555
|
+
return
|
556
|
+
await _response.aread()
|
557
|
+
try:
|
558
|
+
_response_json = _response.json()
|
559
|
+
except JSONDecodeError:
|
560
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
561
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
562
|
+
|
394
563
|
async def delete_test_suite_test_case(
|
395
564
|
self, id: str, test_case_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
396
565
|
) -> None:
|
@@ -10,38 +10,38 @@ from ...core.jsonable_encoder import jsonable_encoder
|
|
10
10
|
from ...core.pydantic_utilities import pydantic_v1
|
11
11
|
from ...core.remove_none_from_dict import remove_none_from_dict
|
12
12
|
from ...core.request_options import RequestOptions
|
13
|
-
from ...types.
|
13
|
+
from ...types.workflow_deployment_read import WorkflowDeploymentRead
|
14
14
|
|
15
15
|
# this is used as the default value for optional parameters
|
16
16
|
OMIT = typing.cast(typing.Any, ...)
|
17
17
|
|
18
18
|
|
19
|
-
class
|
19
|
+
class WorkflowSandboxesClient:
|
20
20
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
21
21
|
self._client_wrapper = client_wrapper
|
22
22
|
|
23
|
-
def
|
23
|
+
def deploy_workflow(
|
24
24
|
self,
|
25
25
|
id: str,
|
26
|
-
|
26
|
+
workflow_id: str,
|
27
27
|
*,
|
28
|
-
|
29
|
-
|
28
|
+
workflow_deployment_id: typing.Optional[str] = OMIT,
|
29
|
+
workflow_deployment_name: typing.Optional[str] = OMIT,
|
30
30
|
label: typing.Optional[str] = OMIT,
|
31
31
|
release_tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
32
32
|
request_options: typing.Optional[RequestOptions] = None,
|
33
|
-
) ->
|
33
|
+
) -> WorkflowDeploymentRead:
|
34
34
|
"""
|
35
35
|
Parameters:
|
36
|
-
- id: str. A UUID string identifying this sandbox.
|
36
|
+
- id: str. A UUID string identifying this workflow sandbox.
|
37
37
|
|
38
|
-
-
|
38
|
+
- workflow_id: str. An ID identifying the Workflow you'd like to deploy.
|
39
39
|
|
40
|
-
-
|
40
|
+
- workflow_deployment_id: typing.Optional[str]. The Vellum-generated ID of the Workflow Deployment you'd like to update. Cannot specify both this and workflow_deployment_name. Leave null to create a new Workflow Deployment.
|
41
41
|
|
42
|
-
-
|
42
|
+
- workflow_deployment_name: typing.Optional[str]. The unique name of the Workflow Deployment you'd like to either create or update. Cannot specify both this and workflow_deployment_id. If provided and matches an existing Workflow Deployment, that Workflow Deployment will be updated. Otherwise, a new Prompt Deployment will be created.
|
43
43
|
|
44
|
-
- label: typing.Optional[str]. In the event that a new
|
44
|
+
- label: typing.Optional[str]. In the event that a new Workflow Deployment is created, this will be the label it's given.
|
45
45
|
|
46
46
|
- release_tags: typing.Optional[typing.Sequence[str]]. Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment.
|
47
47
|
|
@@ -52,16 +52,16 @@ class PromptVersionsClient:
|
|
52
52
|
client = Vellum(
|
53
53
|
api_key="YOUR_API_KEY",
|
54
54
|
)
|
55
|
-
client.
|
55
|
+
client.workflow_sandboxes.deploy_workflow(
|
56
56
|
id="id",
|
57
|
-
|
57
|
+
workflow_id="workflow_id",
|
58
58
|
)
|
59
59
|
"""
|
60
60
|
_request: typing.Dict[str, typing.Any] = {}
|
61
|
-
if
|
62
|
-
_request["
|
63
|
-
if
|
64
|
-
_request["
|
61
|
+
if workflow_deployment_id is not OMIT:
|
62
|
+
_request["workflow_deployment_id"] = workflow_deployment_id
|
63
|
+
if workflow_deployment_name is not OMIT:
|
64
|
+
_request["workflow_deployment_name"] = workflow_deployment_name
|
65
65
|
if label is not OMIT:
|
66
66
|
_request["label"] = label
|
67
67
|
if release_tags is not OMIT:
|
@@ -70,7 +70,7 @@ class PromptVersionsClient:
|
|
70
70
|
method="POST",
|
71
71
|
url=urllib.parse.urljoin(
|
72
72
|
f"{self._client_wrapper.get_environment().default}/",
|
73
|
-
f"v1/sandboxes/{jsonable_encoder(id)}/
|
73
|
+
f"v1/workflow-sandboxes/{jsonable_encoder(id)}/workflows/{jsonable_encoder(workflow_id)}/deploy",
|
74
74
|
),
|
75
75
|
params=jsonable_encoder(
|
76
76
|
request_options.get("additional_query_parameters") if request_options is not None else None
|
@@ -96,7 +96,7 @@ class PromptVersionsClient:
|
|
96
96
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
97
97
|
)
|
98
98
|
if 200 <= _response.status_code < 300:
|
99
|
-
return pydantic_v1.parse_obj_as(
|
99
|
+
return pydantic_v1.parse_obj_as(WorkflowDeploymentRead, _response.json()) # type: ignore
|
100
100
|
try:
|
101
101
|
_response_json = _response.json()
|
102
102
|
except JSONDecodeError:
|
@@ -104,32 +104,32 @@ class PromptVersionsClient:
|
|
104
104
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
105
105
|
|
106
106
|
|
107
|
-
class
|
107
|
+
class AsyncWorkflowSandboxesClient:
|
108
108
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
109
109
|
self._client_wrapper = client_wrapper
|
110
110
|
|
111
|
-
async def
|
111
|
+
async def deploy_workflow(
|
112
112
|
self,
|
113
113
|
id: str,
|
114
|
-
|
114
|
+
workflow_id: str,
|
115
115
|
*,
|
116
|
-
|
117
|
-
|
116
|
+
workflow_deployment_id: typing.Optional[str] = OMIT,
|
117
|
+
workflow_deployment_name: typing.Optional[str] = OMIT,
|
118
118
|
label: typing.Optional[str] = OMIT,
|
119
119
|
release_tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
120
120
|
request_options: typing.Optional[RequestOptions] = None,
|
121
|
-
) ->
|
121
|
+
) -> WorkflowDeploymentRead:
|
122
122
|
"""
|
123
123
|
Parameters:
|
124
|
-
- id: str. A UUID string identifying this sandbox.
|
124
|
+
- id: str. A UUID string identifying this workflow sandbox.
|
125
125
|
|
126
|
-
-
|
126
|
+
- workflow_id: str. An ID identifying the Workflow you'd like to deploy.
|
127
127
|
|
128
|
-
-
|
128
|
+
- workflow_deployment_id: typing.Optional[str]. The Vellum-generated ID of the Workflow Deployment you'd like to update. Cannot specify both this and workflow_deployment_name. Leave null to create a new Workflow Deployment.
|
129
129
|
|
130
|
-
-
|
130
|
+
- workflow_deployment_name: typing.Optional[str]. The unique name of the Workflow Deployment you'd like to either create or update. Cannot specify both this and workflow_deployment_id. If provided and matches an existing Workflow Deployment, that Workflow Deployment will be updated. Otherwise, a new Prompt Deployment will be created.
|
131
131
|
|
132
|
-
- label: typing.Optional[str]. In the event that a new
|
132
|
+
- label: typing.Optional[str]. In the event that a new Workflow Deployment is created, this will be the label it's given.
|
133
133
|
|
134
134
|
- release_tags: typing.Optional[typing.Sequence[str]]. Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment.
|
135
135
|
|
@@ -140,16 +140,16 @@ class AsyncPromptVersionsClient:
|
|
140
140
|
client = AsyncVellum(
|
141
141
|
api_key="YOUR_API_KEY",
|
142
142
|
)
|
143
|
-
await client.
|
143
|
+
await client.workflow_sandboxes.deploy_workflow(
|
144
144
|
id="id",
|
145
|
-
|
145
|
+
workflow_id="workflow_id",
|
146
146
|
)
|
147
147
|
"""
|
148
148
|
_request: typing.Dict[str, typing.Any] = {}
|
149
|
-
if
|
150
|
-
_request["
|
151
|
-
if
|
152
|
-
_request["
|
149
|
+
if workflow_deployment_id is not OMIT:
|
150
|
+
_request["workflow_deployment_id"] = workflow_deployment_id
|
151
|
+
if workflow_deployment_name is not OMIT:
|
152
|
+
_request["workflow_deployment_name"] = workflow_deployment_name
|
153
153
|
if label is not OMIT:
|
154
154
|
_request["label"] = label
|
155
155
|
if release_tags is not OMIT:
|
@@ -158,7 +158,7 @@ class AsyncPromptVersionsClient:
|
|
158
158
|
method="POST",
|
159
159
|
url=urllib.parse.urljoin(
|
160
160
|
f"{self._client_wrapper.get_environment().default}/",
|
161
|
-
f"v1/sandboxes/{jsonable_encoder(id)}/
|
161
|
+
f"v1/workflow-sandboxes/{jsonable_encoder(id)}/workflows/{jsonable_encoder(workflow_id)}/deploy",
|
162
162
|
),
|
163
163
|
params=jsonable_encoder(
|
164
164
|
request_options.get("additional_query_parameters") if request_options is not None else None
|
@@ -184,7 +184,7 @@ class AsyncPromptVersionsClient:
|
|
184
184
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
185
185
|
)
|
186
186
|
if 200 <= _response.status_code < 300:
|
187
|
-
return pydantic_v1.parse_obj_as(
|
187
|
+
return pydantic_v1.parse_obj_as(WorkflowDeploymentRead, _response.json()) # type: ignore
|
188
188
|
try:
|
189
189
|
_response_json = _response.json()
|
190
190
|
except JSONDecodeError:
|
vellum/types/__init__.py
CHANGED
@@ -50,6 +50,8 @@ from .basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1 import
|
|
50
50
|
from .basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_dot_v_1_request import (
|
51
51
|
BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1Request,
|
52
52
|
)
|
53
|
+
from .bulk_create_test_suite_test_case_data_request import BulkCreateTestSuiteTestCaseDataRequest
|
54
|
+
from .bulk_replace_test_suite_test_case_data_request import BulkReplaceTestSuiteTestCaseDataRequest
|
53
55
|
from .chat_history_enum import ChatHistoryEnum
|
54
56
|
from .chat_history_input_request import ChatHistoryInputRequest
|
55
57
|
from .chat_message import ChatMessage
|
@@ -92,6 +94,10 @@ from .code_execution_node_search_results_result import CodeExecutionNodeSearchRe
|
|
92
94
|
from .code_execution_node_string_result import CodeExecutionNodeStringResult
|
93
95
|
from .conditional_node_result import ConditionalNodeResult
|
94
96
|
from .conditional_node_result_data import ConditionalNodeResultData
|
97
|
+
from .create_enum import CreateEnum
|
98
|
+
from .created_enum import CreatedEnum
|
99
|
+
from .delete_enum import DeleteEnum
|
100
|
+
from .deleted_enum import DeletedEnum
|
95
101
|
from .deployment_provider_payload_response import DeploymentProviderPayloadResponse
|
96
102
|
from .deployment_read import DeploymentRead
|
97
103
|
from .deployment_release_tag_deployment_history_item import DeploymentReleaseTagDeploymentHistoryItem
|
@@ -368,6 +374,8 @@ from .rejected_execute_workflow_workflow_result_event import RejectedExecuteWork
|
|
368
374
|
from .rejected_prompt_execution_meta import RejectedPromptExecutionMeta
|
369
375
|
from .rejected_workflow_node_result_event import RejectedWorkflowNodeResultEvent
|
370
376
|
from .release_tag_source import ReleaseTagSource
|
377
|
+
from .replace_enum import ReplaceEnum
|
378
|
+
from .replaced_enum import ReplacedEnum
|
371
379
|
from .sandbox_scenario import SandboxScenario
|
372
380
|
from .scenario_input import ScenarioInput, ScenarioInput_ChatHistory, ScenarioInput_String
|
373
381
|
from .scenario_input_chat_history_variable_value import ScenarioInputChatHistoryVariableValue
|
@@ -544,6 +552,30 @@ from .test_suite_run_workflow_release_tag_exec_config_data_request import (
|
|
544
552
|
from .test_suite_run_workflow_release_tag_exec_config_request import TestSuiteRunWorkflowReleaseTagExecConfigRequest
|
545
553
|
from .test_suite_run_workflow_release_tag_exec_config_type_enum import TestSuiteRunWorkflowReleaseTagExecConfigTypeEnum
|
546
554
|
from .test_suite_test_case import TestSuiteTestCase
|
555
|
+
from .test_suite_test_case_bulk_operation_request import (
|
556
|
+
TestSuiteTestCaseBulkOperationRequest,
|
557
|
+
TestSuiteTestCaseBulkOperationRequest_Create,
|
558
|
+
TestSuiteTestCaseBulkOperationRequest_Delete,
|
559
|
+
TestSuiteTestCaseBulkOperationRequest_Replace,
|
560
|
+
)
|
561
|
+
from .test_suite_test_case_bulk_result import (
|
562
|
+
TestSuiteTestCaseBulkResult,
|
563
|
+
TestSuiteTestCaseBulkResult_Created,
|
564
|
+
TestSuiteTestCaseBulkResult_Deleted,
|
565
|
+
TestSuiteTestCaseBulkResult_Rejected,
|
566
|
+
TestSuiteTestCaseBulkResult_Replaced,
|
567
|
+
)
|
568
|
+
from .test_suite_test_case_create_bulk_operation_request import TestSuiteTestCaseCreateBulkOperationRequest
|
569
|
+
from .test_suite_test_case_created_bulk_result import TestSuiteTestCaseCreatedBulkResult
|
570
|
+
from .test_suite_test_case_created_bulk_result_data import TestSuiteTestCaseCreatedBulkResultData
|
571
|
+
from .test_suite_test_case_delete_bulk_operation_data_request import TestSuiteTestCaseDeleteBulkOperationDataRequest
|
572
|
+
from .test_suite_test_case_delete_bulk_operation_request import TestSuiteTestCaseDeleteBulkOperationRequest
|
573
|
+
from .test_suite_test_case_deleted_bulk_result import TestSuiteTestCaseDeletedBulkResult
|
574
|
+
from .test_suite_test_case_deleted_bulk_result_data import TestSuiteTestCaseDeletedBulkResultData
|
575
|
+
from .test_suite_test_case_rejected_bulk_result import TestSuiteTestCaseRejectedBulkResult
|
576
|
+
from .test_suite_test_case_replace_bulk_operation_request import TestSuiteTestCaseReplaceBulkOperationRequest
|
577
|
+
from .test_suite_test_case_replaced_bulk_result import TestSuiteTestCaseReplacedBulkResult
|
578
|
+
from .test_suite_test_case_replaced_bulk_result_data import TestSuiteTestCaseReplacedBulkResultData
|
547
579
|
from .text_embedding_3_large_enum import TextEmbedding3LargeEnum
|
548
580
|
from .text_embedding_3_small_enum import TextEmbedding3SmallEnum
|
549
581
|
from .text_embedding_ada_002_enum import TextEmbeddingAda002Enum
|
@@ -682,6 +714,8 @@ __all__ = [
|
|
682
714
|
"BasicVectorizerSentenceTransformersMultiQaMpnetBaseCosV1Request",
|
683
715
|
"BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1",
|
684
716
|
"BasicVectorizerSentenceTransformersMultiQaMpnetBaseDotV1Request",
|
717
|
+
"BulkCreateTestSuiteTestCaseDataRequest",
|
718
|
+
"BulkReplaceTestSuiteTestCaseDataRequest",
|
685
719
|
"ChatHistoryEnum",
|
686
720
|
"ChatHistoryInputRequest",
|
687
721
|
"ChatMessage",
|
@@ -718,6 +752,10 @@ __all__ = [
|
|
718
752
|
"CodeExecutionNodeStringResult",
|
719
753
|
"ConditionalNodeResult",
|
720
754
|
"ConditionalNodeResultData",
|
755
|
+
"CreateEnum",
|
756
|
+
"CreatedEnum",
|
757
|
+
"DeleteEnum",
|
758
|
+
"DeletedEnum",
|
721
759
|
"DeploymentProviderPayloadResponse",
|
722
760
|
"DeploymentRead",
|
723
761
|
"DeploymentReleaseTagDeploymentHistoryItem",
|
@@ -964,6 +1002,8 @@ __all__ = [
|
|
964
1002
|
"RejectedPromptExecutionMeta",
|
965
1003
|
"RejectedWorkflowNodeResultEvent",
|
966
1004
|
"ReleaseTagSource",
|
1005
|
+
"ReplaceEnum",
|
1006
|
+
"ReplacedEnum",
|
967
1007
|
"SandboxScenario",
|
968
1008
|
"ScenarioInput",
|
969
1009
|
"ScenarioInputChatHistoryVariableValue",
|
@@ -1120,6 +1160,26 @@ __all__ = [
|
|
1120
1160
|
"TestSuiteRunWorkflowReleaseTagExecConfigRequest",
|
1121
1161
|
"TestSuiteRunWorkflowReleaseTagExecConfigTypeEnum",
|
1122
1162
|
"TestSuiteTestCase",
|
1163
|
+
"TestSuiteTestCaseBulkOperationRequest",
|
1164
|
+
"TestSuiteTestCaseBulkOperationRequest_Create",
|
1165
|
+
"TestSuiteTestCaseBulkOperationRequest_Delete",
|
1166
|
+
"TestSuiteTestCaseBulkOperationRequest_Replace",
|
1167
|
+
"TestSuiteTestCaseBulkResult",
|
1168
|
+
"TestSuiteTestCaseBulkResult_Created",
|
1169
|
+
"TestSuiteTestCaseBulkResult_Deleted",
|
1170
|
+
"TestSuiteTestCaseBulkResult_Rejected",
|
1171
|
+
"TestSuiteTestCaseBulkResult_Replaced",
|
1172
|
+
"TestSuiteTestCaseCreateBulkOperationRequest",
|
1173
|
+
"TestSuiteTestCaseCreatedBulkResult",
|
1174
|
+
"TestSuiteTestCaseCreatedBulkResultData",
|
1175
|
+
"TestSuiteTestCaseDeleteBulkOperationDataRequest",
|
1176
|
+
"TestSuiteTestCaseDeleteBulkOperationRequest",
|
1177
|
+
"TestSuiteTestCaseDeletedBulkResult",
|
1178
|
+
"TestSuiteTestCaseDeletedBulkResultData",
|
1179
|
+
"TestSuiteTestCaseRejectedBulkResult",
|
1180
|
+
"TestSuiteTestCaseReplaceBulkOperationRequest",
|
1181
|
+
"TestSuiteTestCaseReplacedBulkResult",
|
1182
|
+
"TestSuiteTestCaseReplacedBulkResultData",
|
1123
1183
|
"TextEmbedding3LargeEnum",
|
1124
1184
|
"TextEmbedding3SmallEnum",
|
1125
1185
|
"TextEmbeddingAda002Enum",
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
from .named_test_case_variable_value_request import NamedTestCaseVariableValueRequest
|
9
|
+
|
10
|
+
|
11
|
+
class BulkCreateTestSuiteTestCaseDataRequest(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
Information about the Test Case to create
|
14
|
+
"""
|
15
|
+
|
16
|
+
label: typing.Optional[str] = None
|
17
|
+
input_values: typing.List[NamedTestCaseVariableValueRequest] = pydantic_v1.Field()
|
18
|
+
"""
|
19
|
+
Values for each of the Test Case's input variables
|
20
|
+
"""
|
21
|
+
|
22
|
+
evaluation_values: typing.List[NamedTestCaseVariableValueRequest] = pydantic_v1.Field()
|
23
|
+
"""
|
24
|
+
Values for each of the Test Case's evaluation variables
|
25
|
+
"""
|
26
|
+
|
27
|
+
def json(self, **kwargs: typing.Any) -> str:
|
28
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
29
|
+
return super().json(**kwargs_with_defaults)
|
30
|
+
|
31
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
32
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
33
|
+
return super().dict(**kwargs_with_defaults)
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
frozen = True
|
37
|
+
smart_union = True
|
38
|
+
extra = pydantic_v1.Extra.allow
|
39
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
from .named_test_case_variable_value_request import NamedTestCaseVariableValueRequest
|
9
|
+
|
10
|
+
|
11
|
+
class BulkReplaceTestSuiteTestCaseDataRequest(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
Information about the Test Case to replace
|
14
|
+
"""
|
15
|
+
|
16
|
+
id: str = pydantic_v1.Field()
|
17
|
+
"""
|
18
|
+
The ID of the Test Case to replace.
|
19
|
+
"""
|
20
|
+
|
21
|
+
label: typing.Optional[str] = None
|
22
|
+
input_values: typing.List[NamedTestCaseVariableValueRequest] = pydantic_v1.Field()
|
23
|
+
"""
|
24
|
+
Values for each of the Test Case's input variables
|
25
|
+
"""
|
26
|
+
|
27
|
+
evaluation_values: typing.List[NamedTestCaseVariableValueRequest] = pydantic_v1.Field()
|
28
|
+
"""
|
29
|
+
Values for each of the Test Case's evaluation variables
|
30
|
+
"""
|
31
|
+
|
32
|
+
def json(self, **kwargs: typing.Any) -> str:
|
33
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
34
|
+
return super().json(**kwargs_with_defaults)
|
35
|
+
|
36
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
37
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
38
|
+
return super().dict(**kwargs_with_defaults)
|
39
|
+
|
40
|
+
class Config:
|
41
|
+
frozen = True
|
42
|
+
smart_union = True
|
43
|
+
extra = pydantic_v1.Extra.allow
|
44
|
+
json_encoders = {dt.datetime: serialize_datetime}
|