vellum-ai 0.6.3__py3-none-any.whl → 0.6.5__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +56 -0
- vellum/client.py +8 -12
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/test_suites/client.py +175 -6
- 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/deployment_read.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/types/workflow_deployment_read.py +5 -0
- vellum_ai-0.6.5.dist-info/METADATA +126 -0
- {vellum_ai-0.6.3.dist-info → vellum_ai-0.6.5.dist-info}/RECORD +32 -11
- vellum_ai-0.6.3.dist-info/METADATA +0 -109
- {vellum_ai-0.6.3.dist-info → vellum_ai-0.6.5.dist-info}/LICENSE +0 -0
- {vellum_ai-0.6.3.dist-info → vellum_ai-0.6.5.dist-info}/WHEEL +0 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import typing
|
6
|
+
|
7
|
+
from .test_suite_test_case_create_bulk_operation_request import TestSuiteTestCaseCreateBulkOperationRequest
|
8
|
+
from .test_suite_test_case_delete_bulk_operation_request import TestSuiteTestCaseDeleteBulkOperationRequest
|
9
|
+
from .test_suite_test_case_replace_bulk_operation_request import TestSuiteTestCaseReplaceBulkOperationRequest
|
10
|
+
|
11
|
+
|
12
|
+
class TestSuiteTestCaseBulkOperationRequest_Create(TestSuiteTestCaseCreateBulkOperationRequest):
|
13
|
+
type: typing.Literal["CREATE"] = "CREATE"
|
14
|
+
|
15
|
+
class Config:
|
16
|
+
frozen = True
|
17
|
+
smart_union = True
|
18
|
+
allow_population_by_field_name = True
|
19
|
+
populate_by_name = True
|
20
|
+
|
21
|
+
|
22
|
+
class TestSuiteTestCaseBulkOperationRequest_Replace(TestSuiteTestCaseReplaceBulkOperationRequest):
|
23
|
+
type: typing.Literal["REPLACE"] = "REPLACE"
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
allow_population_by_field_name = True
|
29
|
+
populate_by_name = True
|
30
|
+
|
31
|
+
|
32
|
+
class TestSuiteTestCaseBulkOperationRequest_Delete(TestSuiteTestCaseDeleteBulkOperationRequest):
|
33
|
+
type: typing.Literal["DELETE"] = "DELETE"
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
frozen = True
|
37
|
+
smart_union = True
|
38
|
+
allow_population_by_field_name = True
|
39
|
+
populate_by_name = True
|
40
|
+
|
41
|
+
|
42
|
+
TestSuiteTestCaseBulkOperationRequest = typing.Union[
|
43
|
+
TestSuiteTestCaseBulkOperationRequest_Create,
|
44
|
+
TestSuiteTestCaseBulkOperationRequest_Replace,
|
45
|
+
TestSuiteTestCaseBulkOperationRequest_Delete,
|
46
|
+
]
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import typing
|
6
|
+
|
7
|
+
from .test_suite_test_case_created_bulk_result import TestSuiteTestCaseCreatedBulkResult
|
8
|
+
from .test_suite_test_case_deleted_bulk_result import TestSuiteTestCaseDeletedBulkResult
|
9
|
+
from .test_suite_test_case_rejected_bulk_result import TestSuiteTestCaseRejectedBulkResult
|
10
|
+
from .test_suite_test_case_replaced_bulk_result import TestSuiteTestCaseReplacedBulkResult
|
11
|
+
|
12
|
+
|
13
|
+
class TestSuiteTestCaseBulkResult_Created(TestSuiteTestCaseCreatedBulkResult):
|
14
|
+
type: typing.Literal["CREATED"] = "CREATED"
|
15
|
+
|
16
|
+
class Config:
|
17
|
+
frozen = True
|
18
|
+
smart_union = True
|
19
|
+
allow_population_by_field_name = True
|
20
|
+
populate_by_name = True
|
21
|
+
|
22
|
+
|
23
|
+
class TestSuiteTestCaseBulkResult_Replaced(TestSuiteTestCaseReplacedBulkResult):
|
24
|
+
type: typing.Literal["REPLACED"] = "REPLACED"
|
25
|
+
|
26
|
+
class Config:
|
27
|
+
frozen = True
|
28
|
+
smart_union = True
|
29
|
+
allow_population_by_field_name = True
|
30
|
+
populate_by_name = True
|
31
|
+
|
32
|
+
|
33
|
+
class TestSuiteTestCaseBulkResult_Deleted(TestSuiteTestCaseDeletedBulkResult):
|
34
|
+
type: typing.Literal["DELETED"] = "DELETED"
|
35
|
+
|
36
|
+
class Config:
|
37
|
+
frozen = True
|
38
|
+
smart_union = True
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
populate_by_name = True
|
41
|
+
|
42
|
+
|
43
|
+
class TestSuiteTestCaseBulkResult_Rejected(TestSuiteTestCaseRejectedBulkResult):
|
44
|
+
type: typing.Literal["REJECTED"] = "REJECTED"
|
45
|
+
|
46
|
+
class Config:
|
47
|
+
frozen = True
|
48
|
+
smart_union = True
|
49
|
+
allow_population_by_field_name = True
|
50
|
+
populate_by_name = True
|
51
|
+
|
52
|
+
|
53
|
+
TestSuiteTestCaseBulkResult = typing.Union[
|
54
|
+
TestSuiteTestCaseBulkResult_Created,
|
55
|
+
TestSuiteTestCaseBulkResult_Replaced,
|
56
|
+
TestSuiteTestCaseBulkResult_Deleted,
|
57
|
+
TestSuiteTestCaseBulkResult_Rejected,
|
58
|
+
]
|
@@ -0,0 +1,35 @@
|
|
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 .bulk_create_test_suite_test_case_data_request import BulkCreateTestSuiteTestCaseDataRequest
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteTestCaseCreateBulkOperationRequest(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
A bulk operation that represents the creation of a Test Case.
|
14
|
+
"""
|
15
|
+
|
16
|
+
id: str = pydantic_v1.Field()
|
17
|
+
"""
|
18
|
+
An ID representing this specific operation. Can later be used to look up information about the operation's success in the response.
|
19
|
+
"""
|
20
|
+
|
21
|
+
data: BulkCreateTestSuiteTestCaseDataRequest
|
22
|
+
|
23
|
+
def json(self, **kwargs: typing.Any) -> str:
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
+
return super().json(**kwargs_with_defaults)
|
26
|
+
|
27
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
28
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
29
|
+
return super().dict(**kwargs_with_defaults)
|
30
|
+
|
31
|
+
class Config:
|
32
|
+
frozen = True
|
33
|
+
smart_union = True
|
34
|
+
extra = pydantic_v1.Extra.allow
|
35
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,31 @@
|
|
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 .test_suite_test_case_created_bulk_result_data import TestSuiteTestCaseCreatedBulkResultData
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteTestCaseCreatedBulkResult(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
The result of a bulk operation that created a Test Case.
|
14
|
+
"""
|
15
|
+
|
16
|
+
id: str
|
17
|
+
data: TestSuiteTestCaseCreatedBulkResultData
|
18
|
+
|
19
|
+
def json(self, **kwargs: typing.Any) -> str:
|
20
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
21
|
+
return super().json(**kwargs_with_defaults)
|
22
|
+
|
23
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
+
return super().dict(**kwargs_with_defaults)
|
26
|
+
|
27
|
+
class Config:
|
28
|
+
frozen = True
|
29
|
+
smart_union = True
|
30
|
+
extra = pydantic_v1.Extra.allow
|
31
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,29 @@
|
|
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
|
+
|
9
|
+
|
10
|
+
class TestSuiteTestCaseCreatedBulkResultData(pydantic_v1.BaseModel):
|
11
|
+
"""
|
12
|
+
Information about the Test Case that was created.
|
13
|
+
"""
|
14
|
+
|
15
|
+
id: str
|
16
|
+
|
17
|
+
def json(self, **kwargs: typing.Any) -> str:
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
return super().json(**kwargs_with_defaults)
|
20
|
+
|
21
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
return super().dict(**kwargs_with_defaults)
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
extra = pydantic_v1.Extra.allow
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,25 @@
|
|
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
|
+
|
9
|
+
|
10
|
+
class TestSuiteTestCaseDeleteBulkOperationDataRequest(pydantic_v1.BaseModel):
|
11
|
+
id: str
|
12
|
+
|
13
|
+
def json(self, **kwargs: typing.Any) -> str:
|
14
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
15
|
+
return super().json(**kwargs_with_defaults)
|
16
|
+
|
17
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
return super().dict(**kwargs_with_defaults)
|
20
|
+
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic_v1.Extra.allow
|
25
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,38 @@
|
|
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 .test_suite_test_case_delete_bulk_operation_data_request import TestSuiteTestCaseDeleteBulkOperationDataRequest
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteTestCaseDeleteBulkOperationRequest(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
A bulk operation that represents the deletion of a Test Case.
|
14
|
+
"""
|
15
|
+
|
16
|
+
id: str = pydantic_v1.Field()
|
17
|
+
"""
|
18
|
+
An ID representing this specific operation. Can later be used to look up information about the operation's success in the response.
|
19
|
+
"""
|
20
|
+
|
21
|
+
data: TestSuiteTestCaseDeleteBulkOperationDataRequest = pydantic_v1.Field()
|
22
|
+
"""
|
23
|
+
Information about the Test Case to delete
|
24
|
+
"""
|
25
|
+
|
26
|
+
def json(self, **kwargs: typing.Any) -> str:
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
28
|
+
return super().json(**kwargs_with_defaults)
|
29
|
+
|
30
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
31
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
32
|
+
return super().dict(**kwargs_with_defaults)
|
33
|
+
|
34
|
+
class Config:
|
35
|
+
frozen = True
|
36
|
+
smart_union = True
|
37
|
+
extra = pydantic_v1.Extra.allow
|
38
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,35 @@
|
|
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 .test_suite_test_case_deleted_bulk_result_data import TestSuiteTestCaseDeletedBulkResultData
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteTestCaseDeletedBulkResult(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
The result of a bulk operation that deleted a Test Case.
|
14
|
+
"""
|
15
|
+
|
16
|
+
id: str = pydantic_v1.Field()
|
17
|
+
"""
|
18
|
+
An ID that maps back to one of the initially supplied operations. Can be used to determine the result of a given operation.
|
19
|
+
"""
|
20
|
+
|
21
|
+
data: TestSuiteTestCaseDeletedBulkResultData
|
22
|
+
|
23
|
+
def json(self, **kwargs: typing.Any) -> str:
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
+
return super().json(**kwargs_with_defaults)
|
26
|
+
|
27
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
28
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
29
|
+
return super().dict(**kwargs_with_defaults)
|
30
|
+
|
31
|
+
class Config:
|
32
|
+
frozen = True
|
33
|
+
smart_union = True
|
34
|
+
extra = pydantic_v1.Extra.allow
|
35
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,29 @@
|
|
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
|
+
|
9
|
+
|
10
|
+
class TestSuiteTestCaseDeletedBulkResultData(pydantic_v1.BaseModel):
|
11
|
+
"""
|
12
|
+
Information about the Test Case that was deleted
|
13
|
+
"""
|
14
|
+
|
15
|
+
id: str
|
16
|
+
|
17
|
+
def json(self, **kwargs: typing.Any) -> str:
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
return super().json(**kwargs_with_defaults)
|
20
|
+
|
21
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
return super().dict(**kwargs_with_defaults)
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
extra = pydantic_v1.Extra.allow
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,37 @@
|
|
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
|
+
|
9
|
+
|
10
|
+
class TestSuiteTestCaseRejectedBulkResult(pydantic_v1.BaseModel):
|
11
|
+
"""
|
12
|
+
The result of a bulk operation that failed to operate on a Test Case.
|
13
|
+
"""
|
14
|
+
|
15
|
+
id: str = pydantic_v1.Field()
|
16
|
+
"""
|
17
|
+
An ID that maps back to one of the initially supplied operations. Can be used to determine the result of a given operation.
|
18
|
+
"""
|
19
|
+
|
20
|
+
data: typing.Dict[str, typing.Any] = pydantic_v1.Field()
|
21
|
+
"""
|
22
|
+
Details about the error that occurred
|
23
|
+
"""
|
24
|
+
|
25
|
+
def json(self, **kwargs: typing.Any) -> str:
|
26
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
27
|
+
return super().json(**kwargs_with_defaults)
|
28
|
+
|
29
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
30
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
31
|
+
return super().dict(**kwargs_with_defaults)
|
32
|
+
|
33
|
+
class Config:
|
34
|
+
frozen = True
|
35
|
+
smart_union = True
|
36
|
+
extra = pydantic_v1.Extra.allow
|
37
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,35 @@
|
|
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 .bulk_replace_test_suite_test_case_data_request import BulkReplaceTestSuiteTestCaseDataRequest
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteTestCaseReplaceBulkOperationRequest(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
A bulk operation that represents the replacing of a Test Case.
|
14
|
+
"""
|
15
|
+
|
16
|
+
id: str = pydantic_v1.Field()
|
17
|
+
"""
|
18
|
+
An ID representing this specific operation. Can later be used to look up information about the operation's success in the response.
|
19
|
+
"""
|
20
|
+
|
21
|
+
data: BulkReplaceTestSuiteTestCaseDataRequest
|
22
|
+
|
23
|
+
def json(self, **kwargs: typing.Any) -> str:
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
+
return super().json(**kwargs_with_defaults)
|
26
|
+
|
27
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
28
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
29
|
+
return super().dict(**kwargs_with_defaults)
|
30
|
+
|
31
|
+
class Config:
|
32
|
+
frozen = True
|
33
|
+
smart_union = True
|
34
|
+
extra = pydantic_v1.Extra.allow
|
35
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,35 @@
|
|
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 .test_suite_test_case_replaced_bulk_result_data import TestSuiteTestCaseReplacedBulkResultData
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteTestCaseReplacedBulkResult(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
The result of a bulk operation that replaced a Test Case.
|
14
|
+
"""
|
15
|
+
|
16
|
+
id: str = pydantic_v1.Field()
|
17
|
+
"""
|
18
|
+
An ID that maps back to one of the initially supplied operations. Can be used to determine the result of a given operation.
|
19
|
+
"""
|
20
|
+
|
21
|
+
data: TestSuiteTestCaseReplacedBulkResultData
|
22
|
+
|
23
|
+
def json(self, **kwargs: typing.Any) -> str:
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
+
return super().json(**kwargs_with_defaults)
|
26
|
+
|
27
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
28
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
29
|
+
return super().dict(**kwargs_with_defaults)
|
30
|
+
|
31
|
+
class Config:
|
32
|
+
frozen = True
|
33
|
+
smart_union = True
|
34
|
+
extra = pydantic_v1.Extra.allow
|
35
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,29 @@
|
|
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
|
+
|
9
|
+
|
10
|
+
class TestSuiteTestCaseReplacedBulkResultData(pydantic_v1.BaseModel):
|
11
|
+
"""
|
12
|
+
Information about the Test Case that was replaced
|
13
|
+
"""
|
14
|
+
|
15
|
+
id: str
|
16
|
+
|
17
|
+
def json(self, **kwargs: typing.Any) -> str:
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
return super().json(**kwargs_with_defaults)
|
20
|
+
|
21
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
return super().dict(**kwargs_with_defaults)
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
extra = pydantic_v1.Extra.allow
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -41,6 +41,11 @@ class WorkflowDeploymentRead(pydantic_v1.BaseModel):
|
|
41
41
|
|
42
42
|
created: dt.datetime
|
43
43
|
last_deployed_on: dt.datetime
|
44
|
+
last_deployed_history_item_id: str = pydantic_v1.Field()
|
45
|
+
"""
|
46
|
+
The ID of the history item associated with this Workflow Deployment's LATEST Release Tag
|
47
|
+
"""
|
48
|
+
|
44
49
|
input_variables: typing.List[VellumVariable] = pydantic_v1.Field()
|
45
50
|
"""
|
46
51
|
The input variables this Workflow Deployment expects to receive values for when it is executed.
|
@@ -0,0 +1,126 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: vellum-ai
|
3
|
+
Version: 0.6.5
|
4
|
+
Summary:
|
5
|
+
Requires-Python: >=3.8,<4.0
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
7
|
+
Classifier: Programming Language :: Python :: 3.8
|
8
|
+
Classifier: Programming Language :: Python :: 3.9
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
11
|
+
Requires-Dist: cdktf (>=0.20.5,<0.21.0)
|
12
|
+
Requires-Dist: httpx (>=0.21.2)
|
13
|
+
Requires-Dist: publication (==0.0.3)
|
14
|
+
Requires-Dist: pydantic (>=1.9.2)
|
15
|
+
Requires-Dist: typing_extensions (>=4.0.0)
|
16
|
+
Description-Content-Type: text/markdown
|
17
|
+
|
18
|
+
# Vellum Python Library
|
19
|
+
|
20
|
+
[![pypi](https://img.shields.io/pypi/v/vellum-ai.svg)](https://pypi.python.org/pypi/vellum-ai)
|
21
|
+
![license badge](https://img.shields.io/github/license/vellum-ai/vellum-client-python)
|
22
|
+
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://buildwithfern.com/?utm_source=vellum-ai/vellum-client-python/readme)
|
23
|
+
|
24
|
+
The Vellum Python SDK provides access to the Vellum API from python.
|
25
|
+
|
26
|
+
|
27
|
+
## API Docs
|
28
|
+
You can find Vellum's complete API docs at [docs.vellum.ai](https://docs.vellum.ai/api-reference/introduction/getting-started).
|
29
|
+
|
30
|
+
## Installation
|
31
|
+
|
32
|
+
```sh
|
33
|
+
pip install --upgrade vellum-ai
|
34
|
+
```
|
35
|
+
|
36
|
+
## Usage
|
37
|
+
Below is how you would invoke a deployed Prompt from the Vellum API. For a complete list of all APIs
|
38
|
+
that Vellum supports, check out our [API Reference](https://docs.vellum.ai/api-reference/introduction/getting-started).
|
39
|
+
|
40
|
+
```python
|
41
|
+
from vellum import (
|
42
|
+
PromptDeploymentInputRequest_String,
|
43
|
+
)
|
44
|
+
from vellum.client import Vellum
|
45
|
+
|
46
|
+
client = Vellum(
|
47
|
+
api_key="YOUR_API_KEY",
|
48
|
+
)
|
49
|
+
|
50
|
+
def execute() -> str:
|
51
|
+
result = client.execute_prompt(
|
52
|
+
prompt_deployment_name="<example-deployment-name>>",
|
53
|
+
release_tag="LATEST",
|
54
|
+
inputs=[
|
55
|
+
PromptDeploymentInputRequest_String(
|
56
|
+
name="input_a",
|
57
|
+
type="STRING",
|
58
|
+
value="Hello, world!",
|
59
|
+
)
|
60
|
+
],
|
61
|
+
)
|
62
|
+
|
63
|
+
if result.state == "REJECTED":
|
64
|
+
raise Exception(result.error.message)
|
65
|
+
|
66
|
+
return result.outputs[0].value
|
67
|
+
|
68
|
+
if __name__ == "__main__":
|
69
|
+
print(execute())
|
70
|
+
```
|
71
|
+
|
72
|
+
> [!TIP]
|
73
|
+
> You can set a system environment variable `VELLUM_API_KEY` to avoid writing your api key within your code. To do so, add `export VELLUM_API_KEY=<your-api-token>`
|
74
|
+
> to your ~/.zshrc or ~/.bashrc, open a new terminal, and then any code calling `vellum.Vellum()` will read this key.
|
75
|
+
|
76
|
+
## Async Client
|
77
|
+
This SDK has an async version. Here's how to use it:
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
```python
|
82
|
+
import asyncio
|
83
|
+
|
84
|
+
import vellum
|
85
|
+
from vellum.client import AsyncVellum
|
86
|
+
|
87
|
+
client = AsyncVellum(api_key="YOUR_API_KEY")
|
88
|
+
|
89
|
+
async def execute() -> str:
|
90
|
+
result = await client.execute_prompt(
|
91
|
+
prompt_deployment_name="<example-deployment-name>>",
|
92
|
+
release_tag="LATEST",
|
93
|
+
inputs=[
|
94
|
+
vellum.PromptDeploymentInputRequest_String(
|
95
|
+
name="input_a",
|
96
|
+
value="Hello, world!",
|
97
|
+
)
|
98
|
+
],
|
99
|
+
)
|
100
|
+
|
101
|
+
if result.state == "REJECTED":
|
102
|
+
raise Exception(result.error.message)
|
103
|
+
|
104
|
+
return result.outputs[0].value
|
105
|
+
|
106
|
+
if __name__ == "__main__":
|
107
|
+
print(asyncio.run(execute()))
|
108
|
+
```
|
109
|
+
|
110
|
+
## Contributing
|
111
|
+
|
112
|
+
While we value open-source contributions to this SDK, most of this library is generated programmatically.
|
113
|
+
|
114
|
+
Please feel free to make contributions to any of the directories or files below:
|
115
|
+
```plaintext
|
116
|
+
examples/*
|
117
|
+
src/vellum/lib/*
|
118
|
+
tests/*
|
119
|
+
README.md
|
120
|
+
```
|
121
|
+
|
122
|
+
Any additions made to files beyond those directories and files above would have to be moved over to our generation code
|
123
|
+
(found in the separate [vellum-client-generator](https://github.com/vellum-ai/vellum-client-generator) repo),
|
124
|
+
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept,
|
125
|
+
but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!
|
126
|
+
|