vellum-ai 0.3.19__py3-none-any.whl → 0.3.21__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 +10 -0
- vellum/client.py +4 -0
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/test_suites/client.py +141 -0
- vellum/types/__init__.py +10 -0
- vellum/types/fulfilled_prompt_execution_meta.py +2 -0
- vellum/types/ml_model_usage.py +33 -0
- vellum/types/paginated_test_suite_test_case_list.py +33 -0
- vellum/types/prompt_deployment_expand_meta_request_request.py +5 -0
- vellum/types/prompt_execution_meta.py +2 -0
- vellum/types/test_suite_run_metric_output.py +14 -1
- vellum/types/test_suite_run_metric_string_output.py +34 -0
- vellum/types/test_suite_run_metric_string_output_type_enum.py +5 -0
- {vellum_ai-0.3.19.dist-info → vellum_ai-0.3.21.dist-info}/METADATA +1 -1
- {vellum_ai-0.3.19.dist-info → vellum_ai-0.3.21.dist-info}/RECORD +17 -13
- {vellum_ai-0.3.19.dist-info → vellum_ai-0.3.21.dist-info}/LICENSE +0 -0
- {vellum_ai-0.3.19.dist-info → vellum_ai-0.3.21.dist-info}/WHEEL +0 -0
vellum/__init__.py
CHANGED
@@ -148,6 +148,7 @@ from .types import (
|
|
148
148
|
MetadataFilterConfigRequest,
|
149
149
|
MetadataFilterRuleCombinator,
|
150
150
|
MetadataFilterRuleRequest,
|
151
|
+
MlModelUsage,
|
151
152
|
ModelVersionBuildConfig,
|
152
153
|
ModelVersionExecConfig,
|
153
154
|
ModelVersionExecConfigParameters,
|
@@ -210,6 +211,7 @@ from .types import (
|
|
210
211
|
PaginatedSlimDocumentList,
|
211
212
|
PaginatedSlimWorkflowDeploymentList,
|
212
213
|
PaginatedTestSuiteRunExecutionList,
|
214
|
+
PaginatedTestSuiteTestCaseList,
|
213
215
|
ProcessingFailureReasonEnum,
|
214
216
|
ProcessingStateEnum,
|
215
217
|
PromptDeploymentExpandMetaRequestRequest,
|
@@ -372,6 +374,9 @@ from .types import (
|
|
372
374
|
TestSuiteRunMetricOutput,
|
373
375
|
TestSuiteRunMetricOutput_Error,
|
374
376
|
TestSuiteRunMetricOutput_Number,
|
377
|
+
TestSuiteRunMetricOutput_String,
|
378
|
+
TestSuiteRunMetricStringOutput,
|
379
|
+
TestSuiteRunMetricStringOutputTypeEnum,
|
375
380
|
TestSuiteRunRead,
|
376
381
|
TestSuiteRunState,
|
377
382
|
TestSuiteRunTestSuite,
|
@@ -637,6 +642,7 @@ __all__ = [
|
|
637
642
|
"MetadataFilterConfigRequest",
|
638
643
|
"MetadataFilterRuleCombinator",
|
639
644
|
"MetadataFilterRuleRequest",
|
645
|
+
"MlModelUsage",
|
640
646
|
"ModelVersionBuildConfig",
|
641
647
|
"ModelVersionExecConfig",
|
642
648
|
"ModelVersionExecConfigParameters",
|
@@ -700,6 +706,7 @@ __all__ = [
|
|
700
706
|
"PaginatedSlimDocumentList",
|
701
707
|
"PaginatedSlimWorkflowDeploymentList",
|
702
708
|
"PaginatedTestSuiteRunExecutionList",
|
709
|
+
"PaginatedTestSuiteTestCaseList",
|
703
710
|
"ProcessingFailureReasonEnum",
|
704
711
|
"ProcessingStateEnum",
|
705
712
|
"PromptDeploymentExpandMetaRequestRequest",
|
@@ -862,6 +869,9 @@ __all__ = [
|
|
862
869
|
"TestSuiteRunMetricOutput",
|
863
870
|
"TestSuiteRunMetricOutput_Error",
|
864
871
|
"TestSuiteRunMetricOutput_Number",
|
872
|
+
"TestSuiteRunMetricOutput_String",
|
873
|
+
"TestSuiteRunMetricStringOutput",
|
874
|
+
"TestSuiteRunMetricStringOutputTypeEnum",
|
865
875
|
"TestSuiteRunRead",
|
866
876
|
"TestSuiteRunState",
|
867
877
|
"TestSuiteRunTestSuite",
|
vellum/client.py
CHANGED
@@ -167,6 +167,7 @@ class Vellum:
|
|
167
167
|
deployment_release_tag=True,
|
168
168
|
prompt_version_id=True,
|
169
169
|
finish_reason=True,
|
170
|
+
usage=True,
|
170
171
|
),
|
171
172
|
raw_overrides=RawPromptExecutionOverridesRequest(
|
172
173
|
body={"string": {"key": "value"}},
|
@@ -301,6 +302,7 @@ class Vellum:
|
|
301
302
|
deployment_release_tag=True,
|
302
303
|
prompt_version_id=True,
|
303
304
|
finish_reason=True,
|
305
|
+
usage=True,
|
304
306
|
),
|
305
307
|
raw_overrides=RawPromptExecutionOverridesRequest(
|
306
308
|
body={"string": {"key": "value"}},
|
@@ -1123,6 +1125,7 @@ class AsyncVellum:
|
|
1123
1125
|
deployment_release_tag=True,
|
1124
1126
|
prompt_version_id=True,
|
1125
1127
|
finish_reason=True,
|
1128
|
+
usage=True,
|
1126
1129
|
),
|
1127
1130
|
raw_overrides=RawPromptExecutionOverridesRequest(
|
1128
1131
|
body={"string": {"key": "value"}},
|
@@ -1257,6 +1260,7 @@ class AsyncVellum:
|
|
1257
1260
|
deployment_release_tag=True,
|
1258
1261
|
prompt_version_id=True,
|
1259
1262
|
finish_reason=True,
|
1263
|
+
usage=True,
|
1260
1264
|
),
|
1261
1265
|
raw_overrides=RawPromptExecutionOverridesRequest(
|
1262
1266
|
body={"string": {"key": "value"}},
|
vellum/core/client_wrapper.py
CHANGED
@@ -18,7 +18,7 @@ class BaseClientWrapper:
|
|
18
18
|
headers: typing.Dict[str, str] = {
|
19
19
|
"X-Fern-Language": "Python",
|
20
20
|
"X-Fern-SDK-Name": "vellum-ai",
|
21
|
-
"X-Fern-SDK-Version": "0.3.
|
21
|
+
"X-Fern-SDK-Version": "0.3.21",
|
22
22
|
}
|
23
23
|
headers["X_API_KEY"] = self.api_key
|
24
24
|
return headers
|
@@ -10,6 +10,7 @@ from ...core.jsonable_encoder import jsonable_encoder
|
|
10
10
|
from ...core.remove_none_from_dict import remove_none_from_dict
|
11
11
|
from ...core.request_options import RequestOptions
|
12
12
|
from ...types.named_test_case_variable_value_request import NamedTestCaseVariableValueRequest
|
13
|
+
from ...types.paginated_test_suite_test_case_list import PaginatedTestSuiteTestCaseList
|
13
14
|
from ...types.test_suite_test_case import TestSuiteTestCase
|
14
15
|
|
15
16
|
try:
|
@@ -25,6 +26,76 @@ class TestSuitesClient:
|
|
25
26
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
26
27
|
self._client_wrapper = client_wrapper
|
27
28
|
|
29
|
+
def list_test_suite_test_cases(
|
30
|
+
self,
|
31
|
+
id: str,
|
32
|
+
*,
|
33
|
+
limit: typing.Optional[int] = None,
|
34
|
+
offset: typing.Optional[int] = None,
|
35
|
+
request_options: typing.Optional[RequestOptions] = None,
|
36
|
+
) -> PaginatedTestSuiteTestCaseList:
|
37
|
+
"""
|
38
|
+
List the Test Cases associated with a Test Suite
|
39
|
+
|
40
|
+
Parameters:
|
41
|
+
- id: str. A UUID string identifying this test suite.
|
42
|
+
|
43
|
+
- limit: typing.Optional[int]. Number of results to return per page.
|
44
|
+
|
45
|
+
- offset: typing.Optional[int]. The initial index from which to return the results.
|
46
|
+
|
47
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
48
|
+
---
|
49
|
+
from vellum.client import Vellum
|
50
|
+
|
51
|
+
client = Vellum(
|
52
|
+
api_key="YOUR_API_KEY",
|
53
|
+
)
|
54
|
+
client.test_suites.list_test_suite_test_cases(
|
55
|
+
id="id",
|
56
|
+
)
|
57
|
+
"""
|
58
|
+
_response = self._client_wrapper.httpx_client.request(
|
59
|
+
"GET",
|
60
|
+
urllib.parse.urljoin(
|
61
|
+
f"{self._client_wrapper.get_environment().default}/",
|
62
|
+
f"v1/test-suites/{jsonable_encoder(id)}/test-cases",
|
63
|
+
),
|
64
|
+
params=jsonable_encoder(
|
65
|
+
remove_none_from_dict(
|
66
|
+
{
|
67
|
+
"limit": limit,
|
68
|
+
"offset": offset,
|
69
|
+
**(
|
70
|
+
request_options.get("additional_query_parameters", {})
|
71
|
+
if request_options is not None
|
72
|
+
else {}
|
73
|
+
),
|
74
|
+
}
|
75
|
+
)
|
76
|
+
),
|
77
|
+
headers=jsonable_encoder(
|
78
|
+
remove_none_from_dict(
|
79
|
+
{
|
80
|
+
**self._client_wrapper.get_headers(),
|
81
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
82
|
+
}
|
83
|
+
)
|
84
|
+
),
|
85
|
+
timeout=request_options.get("timeout_in_seconds")
|
86
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
87
|
+
else self._client_wrapper.get_timeout(),
|
88
|
+
retries=0,
|
89
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
90
|
+
)
|
91
|
+
if 200 <= _response.status_code < 300:
|
92
|
+
return pydantic.parse_obj_as(PaginatedTestSuiteTestCaseList, _response.json()) # type: ignore
|
93
|
+
try:
|
94
|
+
_response_json = _response.json()
|
95
|
+
except JSONDecodeError:
|
96
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
97
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
98
|
+
|
28
99
|
def upsert_test_suite_test_case(
|
29
100
|
self,
|
30
101
|
id: str,
|
@@ -169,6 +240,76 @@ class AsyncTestSuitesClient:
|
|
169
240
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
170
241
|
self._client_wrapper = client_wrapper
|
171
242
|
|
243
|
+
async def list_test_suite_test_cases(
|
244
|
+
self,
|
245
|
+
id: str,
|
246
|
+
*,
|
247
|
+
limit: typing.Optional[int] = None,
|
248
|
+
offset: typing.Optional[int] = None,
|
249
|
+
request_options: typing.Optional[RequestOptions] = None,
|
250
|
+
) -> PaginatedTestSuiteTestCaseList:
|
251
|
+
"""
|
252
|
+
List the Test Cases associated with a Test Suite
|
253
|
+
|
254
|
+
Parameters:
|
255
|
+
- id: str. A UUID string identifying this test suite.
|
256
|
+
|
257
|
+
- limit: typing.Optional[int]. Number of results to return per page.
|
258
|
+
|
259
|
+
- offset: typing.Optional[int]. The initial index from which to return the results.
|
260
|
+
|
261
|
+
- request_options: typing.Optional[RequestOptions]. Request-specific configuration.
|
262
|
+
---
|
263
|
+
from vellum.client import AsyncVellum
|
264
|
+
|
265
|
+
client = AsyncVellum(
|
266
|
+
api_key="YOUR_API_KEY",
|
267
|
+
)
|
268
|
+
await client.test_suites.list_test_suite_test_cases(
|
269
|
+
id="id",
|
270
|
+
)
|
271
|
+
"""
|
272
|
+
_response = await self._client_wrapper.httpx_client.request(
|
273
|
+
"GET",
|
274
|
+
urllib.parse.urljoin(
|
275
|
+
f"{self._client_wrapper.get_environment().default}/",
|
276
|
+
f"v1/test-suites/{jsonable_encoder(id)}/test-cases",
|
277
|
+
),
|
278
|
+
params=jsonable_encoder(
|
279
|
+
remove_none_from_dict(
|
280
|
+
{
|
281
|
+
"limit": limit,
|
282
|
+
"offset": offset,
|
283
|
+
**(
|
284
|
+
request_options.get("additional_query_parameters", {})
|
285
|
+
if request_options is not None
|
286
|
+
else {}
|
287
|
+
),
|
288
|
+
}
|
289
|
+
)
|
290
|
+
),
|
291
|
+
headers=jsonable_encoder(
|
292
|
+
remove_none_from_dict(
|
293
|
+
{
|
294
|
+
**self._client_wrapper.get_headers(),
|
295
|
+
**(request_options.get("additional_headers", {}) if request_options is not None else {}),
|
296
|
+
}
|
297
|
+
)
|
298
|
+
),
|
299
|
+
timeout=request_options.get("timeout_in_seconds")
|
300
|
+
if request_options is not None and request_options.get("timeout_in_seconds") is not None
|
301
|
+
else self._client_wrapper.get_timeout(),
|
302
|
+
retries=0,
|
303
|
+
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
304
|
+
)
|
305
|
+
if 200 <= _response.status_code < 300:
|
306
|
+
return pydantic.parse_obj_as(PaginatedTestSuiteTestCaseList, _response.json()) # type: ignore
|
307
|
+
try:
|
308
|
+
_response_json = _response.json()
|
309
|
+
except JSONDecodeError:
|
310
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
311
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
312
|
+
|
172
313
|
async def upsert_test_suite_test_case(
|
173
314
|
self,
|
174
315
|
id: str,
|
vellum/types/__init__.py
CHANGED
@@ -165,6 +165,7 @@ from .logprobs_enum import LogprobsEnum
|
|
165
165
|
from .metadata_filter_config_request import MetadataFilterConfigRequest
|
166
166
|
from .metadata_filter_rule_combinator import MetadataFilterRuleCombinator
|
167
167
|
from .metadata_filter_rule_request import MetadataFilterRuleRequest
|
168
|
+
from .ml_model_usage import MlModelUsage
|
168
169
|
from .model_version_build_config import ModelVersionBuildConfig
|
169
170
|
from .model_version_exec_config import ModelVersionExecConfig
|
170
171
|
from .model_version_exec_config_parameters import ModelVersionExecConfigParameters
|
@@ -233,6 +234,7 @@ from .paginated_slim_deployment_read_list import PaginatedSlimDeploymentReadList
|
|
233
234
|
from .paginated_slim_document_list import PaginatedSlimDocumentList
|
234
235
|
from .paginated_slim_workflow_deployment_list import PaginatedSlimWorkflowDeploymentList
|
235
236
|
from .paginated_test_suite_run_execution_list import PaginatedTestSuiteRunExecutionList
|
237
|
+
from .paginated_test_suite_test_case_list import PaginatedTestSuiteTestCaseList
|
236
238
|
from .processing_failure_reason_enum import ProcessingFailureReasonEnum
|
237
239
|
from .processing_state_enum import ProcessingStateEnum
|
238
240
|
from .prompt_deployment_expand_meta_request_request import PromptDeploymentExpandMetaRequestRequest
|
@@ -418,7 +420,10 @@ from .test_suite_run_metric_output import (
|
|
418
420
|
TestSuiteRunMetricOutput,
|
419
421
|
TestSuiteRunMetricOutput_Error,
|
420
422
|
TestSuiteRunMetricOutput_Number,
|
423
|
+
TestSuiteRunMetricOutput_String,
|
421
424
|
)
|
425
|
+
from .test_suite_run_metric_string_output import TestSuiteRunMetricStringOutput
|
426
|
+
from .test_suite_run_metric_string_output_type_enum import TestSuiteRunMetricStringOutputTypeEnum
|
422
427
|
from .test_suite_run_read import TestSuiteRunRead
|
423
428
|
from .test_suite_run_state import TestSuiteRunState
|
424
429
|
from .test_suite_run_test_suite import TestSuiteRunTestSuite
|
@@ -669,6 +674,7 @@ __all__ = [
|
|
669
674
|
"MetadataFilterConfigRequest",
|
670
675
|
"MetadataFilterRuleCombinator",
|
671
676
|
"MetadataFilterRuleRequest",
|
677
|
+
"MlModelUsage",
|
672
678
|
"ModelVersionBuildConfig",
|
673
679
|
"ModelVersionExecConfig",
|
674
680
|
"ModelVersionExecConfigParameters",
|
@@ -731,6 +737,7 @@ __all__ = [
|
|
731
737
|
"PaginatedSlimDocumentList",
|
732
738
|
"PaginatedSlimWorkflowDeploymentList",
|
733
739
|
"PaginatedTestSuiteRunExecutionList",
|
740
|
+
"PaginatedTestSuiteTestCaseList",
|
734
741
|
"ProcessingFailureReasonEnum",
|
735
742
|
"ProcessingStateEnum",
|
736
743
|
"PromptDeploymentExpandMetaRequestRequest",
|
@@ -893,6 +900,9 @@ __all__ = [
|
|
893
900
|
"TestSuiteRunMetricOutput",
|
894
901
|
"TestSuiteRunMetricOutput_Error",
|
895
902
|
"TestSuiteRunMetricOutput_Number",
|
903
|
+
"TestSuiteRunMetricOutput_String",
|
904
|
+
"TestSuiteRunMetricStringOutput",
|
905
|
+
"TestSuiteRunMetricStringOutputTypeEnum",
|
896
906
|
"TestSuiteRunRead",
|
897
907
|
"TestSuiteRunState",
|
898
908
|
"TestSuiteRunTestSuite",
|
@@ -5,6 +5,7 @@ import typing
|
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
7
|
from .finish_reason_enum import FinishReasonEnum
|
8
|
+
from .ml_model_usage import MlModelUsage
|
8
9
|
|
9
10
|
try:
|
10
11
|
import pydantic.v1 as pydantic # type: ignore
|
@@ -19,6 +20,7 @@ class FulfilledPromptExecutionMeta(pydantic.BaseModel):
|
|
19
20
|
|
20
21
|
latency: typing.Optional[int] = None
|
21
22
|
finish_reason: typing.Optional[FinishReasonEnum] = None
|
23
|
+
usage: typing.Optional[MlModelUsage] = None
|
22
24
|
|
23
25
|
def json(self, **kwargs: typing.Any) -> str:
|
24
26
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -0,0 +1,33 @@
|
|
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
|
+
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
13
|
+
|
14
|
+
class MlModelUsage(pydantic.BaseModel):
|
15
|
+
output_token_count: typing.Optional[int] = None
|
16
|
+
input_token_count: typing.Optional[int] = None
|
17
|
+
input_char_count: typing.Optional[int] = None
|
18
|
+
output_char_count: typing.Optional[int] = None
|
19
|
+
compute_nanos: typing.Optional[int] = None
|
20
|
+
|
21
|
+
def json(self, **kwargs: typing.Any) -> str:
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
return super().json(**kwargs_with_defaults)
|
24
|
+
|
25
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
26
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
27
|
+
return super().dict(**kwargs_with_defaults)
|
28
|
+
|
29
|
+
class Config:
|
30
|
+
frozen = True
|
31
|
+
smart_union = True
|
32
|
+
extra = pydantic.Extra.allow
|
33
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,33 @@
|
|
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 .test_suite_test_case import TestSuiteTestCase
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class PaginatedTestSuiteTestCaseList(pydantic.BaseModel):
|
16
|
+
count: int
|
17
|
+
next: typing.Optional[str] = None
|
18
|
+
previous: typing.Optional[str] = None
|
19
|
+
results: typing.List[TestSuiteTestCase]
|
20
|
+
|
21
|
+
def json(self, **kwargs: typing.Any) -> str:
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
return super().json(**kwargs_with_defaults)
|
24
|
+
|
25
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
26
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
27
|
+
return super().dict(**kwargs_with_defaults)
|
28
|
+
|
29
|
+
class Config:
|
30
|
+
frozen = True
|
31
|
+
smart_union = True
|
32
|
+
extra = pydantic.Extra.allow
|
33
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -37,6 +37,11 @@ class PromptDeploymentExpandMetaRequestRequest(pydantic.BaseModel):
|
|
37
37
|
If enabled, the response will include the reason provided by the model for why the execution finished.
|
38
38
|
"""
|
39
39
|
|
40
|
+
usage: typing.Optional[bool] = pydantic.Field(default=None)
|
41
|
+
"""
|
42
|
+
If enabled, the response will include model host usage tracking. This may increase latency for some model hosts.
|
43
|
+
"""
|
44
|
+
|
40
45
|
def json(self, **kwargs: typing.Any) -> str:
|
41
46
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
42
47
|
return super().json(**kwargs_with_defaults)
|
@@ -5,6 +5,7 @@ import typing
|
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
7
|
from .finish_reason_enum import FinishReasonEnum
|
8
|
+
from .ml_model_usage import MlModelUsage
|
8
9
|
|
9
10
|
try:
|
10
11
|
import pydantic.v1 as pydantic # type: ignore
|
@@ -17,6 +18,7 @@ class PromptExecutionMeta(pydantic.BaseModel):
|
|
17
18
|
The subset of the metadata tracked by Vellum during prompt execution that the request opted into with `expand_meta`.
|
18
19
|
"""
|
19
20
|
|
21
|
+
usage: typing.Optional[MlModelUsage] = None
|
20
22
|
model_name: typing.Optional[str] = None
|
21
23
|
latency: typing.Optional[int] = None
|
22
24
|
deployment_release_tag: typing.Optional[str] = None
|
@@ -6,6 +6,17 @@ import typing
|
|
6
6
|
|
7
7
|
from .test_suite_run_metric_error_output import TestSuiteRunMetricErrorOutput
|
8
8
|
from .test_suite_run_metric_number_output import TestSuiteRunMetricNumberOutput
|
9
|
+
from .test_suite_run_metric_string_output import TestSuiteRunMetricStringOutput
|
10
|
+
|
11
|
+
|
12
|
+
class TestSuiteRunMetricOutput_String(TestSuiteRunMetricStringOutput):
|
13
|
+
type: typing.Literal["STRING"] = "STRING"
|
14
|
+
|
15
|
+
class Config:
|
16
|
+
frozen = True
|
17
|
+
smart_union = True
|
18
|
+
allow_population_by_field_name = True
|
19
|
+
populate_by_name = True
|
9
20
|
|
10
21
|
|
11
22
|
class TestSuiteRunMetricOutput_Number(TestSuiteRunMetricNumberOutput):
|
@@ -28,4 +39,6 @@ class TestSuiteRunMetricOutput_Error(TestSuiteRunMetricErrorOutput):
|
|
28
39
|
populate_by_name = True
|
29
40
|
|
30
41
|
|
31
|
-
TestSuiteRunMetricOutput = typing.Union[
|
42
|
+
TestSuiteRunMetricOutput = typing.Union[
|
43
|
+
TestSuiteRunMetricOutput_String, TestSuiteRunMetricOutput_Number, TestSuiteRunMetricOutput_Error
|
44
|
+
]
|
@@ -0,0 +1,34 @@
|
|
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
|
+
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
13
|
+
|
14
|
+
class TestSuiteRunMetricStringOutput(pydantic.BaseModel):
|
15
|
+
"""
|
16
|
+
Output for a test suite run metric that is of type STRING
|
17
|
+
"""
|
18
|
+
|
19
|
+
value: str
|
20
|
+
name: str
|
21
|
+
|
22
|
+
def json(self, **kwargs: typing.Any) -> str:
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
+
return super().json(**kwargs_with_defaults)
|
25
|
+
|
26
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
28
|
+
return super().dict(**kwargs_with_defaults)
|
29
|
+
|
30
|
+
class Config:
|
31
|
+
frozen = True
|
32
|
+
smart_union = True
|
33
|
+
extra = pydantic.Extra.allow
|
34
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
vellum/__init__.py,sha256=
|
2
|
-
vellum/client.py,sha256=
|
1
|
+
vellum/__init__.py,sha256=h2QBLHkAs9OTsNI_W0fYfaUrQUmLd37wNbkK63TQcGY,33979
|
2
|
+
vellum/client.py,sha256=ViOMnbiP_kKm3ayXW6DY1wC7Ge8tnI389qC8XVffyB8,96748
|
3
3
|
vellum/core/__init__.py,sha256=RWfyDqkzWsf8e3VGc3NV60MovfJbg5XWzNFGB2DZ0hA,790
|
4
4
|
vellum/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
5
|
-
vellum/core/client_wrapper.py,sha256=
|
5
|
+
vellum/core/client_wrapper.py,sha256=zOXh9ZnRKMmvfCIpadlblmkfFSVgnNdLnEaRVillKps,1698
|
6
6
|
vellum/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
7
7
|
vellum/core/file.py,sha256=sy1RUGZ3aJYuw998bZytxxo6QdgKmlnlgBaMvwEKCGg,1480
|
8
8
|
vellum/core/http_client.py,sha256=5ok6hqgZDJhg57EHvMnr0BBaHdG50QxFPKaCZ9aVWTc,5059
|
@@ -39,12 +39,12 @@ vellum/resources/sandboxes/client.py,sha256=gW_DTrJ3w6BfaSATZxB0Z-bxVUXQ0JtPAjL6
|
|
39
39
|
vellum/resources/test_suite_runs/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
40
40
|
vellum/resources/test_suite_runs/client.py,sha256=T5vF1S5jDfQLxKOg-2Q2XYCF9g5W-dos6Ff6Av21gr8,17120
|
41
41
|
vellum/resources/test_suites/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
42
|
-
vellum/resources/test_suites/client.py,sha256=
|
42
|
+
vellum/resources/test_suites/client.py,sha256=7PmEjJ_2TlvqJoP3C4XkdA8SyYMHVQwREB4T8LowZbM,18966
|
43
43
|
vellum/resources/workflow_deployments/__init__.py,sha256=-5BCA0kSmW6WUh4gqLuQtHv4zFdt9lccuDwMU5YvEu4,173
|
44
44
|
vellum/resources/workflow_deployments/client.py,sha256=DUY1h8mvXqwP-zilmwoek_XbLNTFeeVbxgd7M-k2IzA,11164
|
45
45
|
vellum/resources/workflow_deployments/types/__init__.py,sha256=rmS_4dtbgLHGNQJ_pOloygrjl4sNbKZjTEKBxbMyz6E,208
|
46
46
|
vellum/resources/workflow_deployments/types/workflow_deployments_list_request_status.py,sha256=8-G1SalBR6-AfRnb6POOR9M3tvZa3CGwFIs1ArZb6uw,542
|
47
|
-
vellum/types/__init__.py,sha256=
|
47
|
+
vellum/types/__init__.py,sha256=aXYiDbcBGEypul3Ae4DcgwNT55UtGftQsVxTPRpVAZU,45312
|
48
48
|
vellum/types/api_node_result.py,sha256=aLOooryBCfglTeZwOuyyqRoHz5oPTja2mYYY7Gj8XxA,1040
|
49
49
|
vellum/types/api_node_result_data.py,sha256=cQcZiwI1hjRvQFlkVEGxyaD360vEklIfjBmhBAeI75U,1215
|
50
50
|
vellum/types/array_chat_message_content.py,sha256=Z7nKH8RNgot0i4-159w95OHywLjc-376gBPOovbw2hk,1087
|
@@ -108,7 +108,7 @@ vellum/types/fulfilled_execute_prompt_event.py,sha256=2_jNUOaSg12WKggFiczulVoHFM
|
|
108
108
|
vellum/types/fulfilled_execute_prompt_response.py,sha256=LyVpUlphfBrqSWzo1QyIzdTjAJ8cgW60U98VnMd83ws,1508
|
109
109
|
vellum/types/fulfilled_execute_workflow_workflow_result_event.py,sha256=ROLCpeU2FoqyisPDvgumUlYFDUbwOr93pEfII-ST3NI,1146
|
110
110
|
vellum/types/fulfilled_function_call.py,sha256=wIk8JVy9HyjSbY7rPOhrXPh3OuKy3mtpUvPSOx2FcUc,1056
|
111
|
-
vellum/types/fulfilled_prompt_execution_meta.py,sha256=
|
111
|
+
vellum/types/fulfilled_prompt_execution_meta.py,sha256=FHivWXQbtMMoud9vMC4rc_ik1JWPZG6HfJOkuevCnCs,1285
|
112
112
|
vellum/types/fulfilled_workflow_node_result_event.py,sha256=MGxts5L-VBaYP7xbL5ojjtKWEXUv45XSPqT7Y2RtvjI,1454
|
113
113
|
vellum/types/function_call.py,sha256=U1_fLhZ_VGnHYPX8rb7iqyyUhBzzbRAGR-ai4wLDrs4,813
|
114
114
|
vellum/types/function_call_chat_message_content.py,sha256=z9bTybrPXuhztOUw65PXGws-obJkCJWhc0Zfv1ZwA-k,1122
|
@@ -144,6 +144,7 @@ vellum/types/logprobs_enum.py,sha256=cw9yroKgrZzpPHniPV4hg7_21PM9_FSX1GArHHC_-_o
|
|
144
144
|
vellum/types/metadata_filter_config_request.py,sha256=JH5EBNES30DuRIhgad6IYwXZcuAW6bRajSnWUqs4hG4,1412
|
145
145
|
vellum/types/metadata_filter_rule_combinator.py,sha256=hmfQ3drGlGYqRA78iZr7ek8qZTFN-WENrwL3_OlexMM,528
|
146
146
|
vellum/types/metadata_filter_rule_request.py,sha256=JGPkjXzMS9I3dlEQUAJ0HllJ3F-Znp-0x-4hp06miPs,1428
|
147
|
+
vellum/types/ml_model_usage.py,sha256=2o6Yy9lMDTqRHQNpUzQSoQMfA5_my79LA1pBZDcGLV0,1143
|
147
148
|
vellum/types/model_version_build_config.py,sha256=0dOGfizN30eYJtjs-fJc32TUBGdpYuMFo57a_tEutSg,1400
|
148
149
|
vellum/types/model_version_exec_config.py,sha256=tJJ1Kb8rBdbkD4z9fVwP94bjR9gee4I9N-i9o9w8vVs,1677
|
149
150
|
vellum/types/model_version_exec_config_parameters.py,sha256=jF4wm_GIeITFavMNGSvBd-fa5v9fEjWxoHaZhVFx0CI,1326
|
@@ -184,11 +185,12 @@ vellum/types/paginated_slim_deployment_read_list.py,sha256=4pMZYAVl7pLI8d9-CE3NY
|
|
184
185
|
vellum/types/paginated_slim_document_list.py,sha256=Zvr_VzHcUEEiqAXEitoaM5YcPcaTKgEx8fziy3SH1CU,1127
|
185
186
|
vellum/types/paginated_slim_workflow_deployment_list.py,sha256=dCew3Xy72Mo5MHIBdCbcuDaH0v2yeCRNBDt4m-8tb0A,1168
|
186
187
|
vellum/types/paginated_test_suite_run_execution_list.py,sha256=pwT-FeIxOBnP_S3kpqlAUOtlXEYfFgfViRGxeFTebRI,1117
|
188
|
+
vellum/types/paginated_test_suite_test_case_list.py,sha256=0XlghGkiSubI41oR1UGSdYOKDUM4XLCgmcElKaYFdkA,1101
|
187
189
|
vellum/types/processing_failure_reason_enum.py,sha256=MDj2vNyO1Y-2WHuolkrGez8F1cZqS6ultfsqvGI4Fg8,752
|
188
190
|
vellum/types/processing_state_enum.py,sha256=rMhw5oLZNfhR4QkIgFfLMWRSLXgHt9qhiguEqWQNz5k,962
|
189
|
-
vellum/types/prompt_deployment_expand_meta_request_request.py,sha256=
|
191
|
+
vellum/types/prompt_deployment_expand_meta_request_request.py,sha256=bpA4eO3wIwg5fZK89eoC8B8QsRrKFddIN69o04YEBPk,2083
|
190
192
|
vellum/types/prompt_deployment_input_request.py,sha256=o8PCi7TsitddNxiAfDblxaXkJ1-WjuDTAW0LnKbMDY4,1233
|
191
|
-
vellum/types/prompt_execution_meta.py,sha256=
|
193
|
+
vellum/types/prompt_execution_meta.py,sha256=4RNkaZ2QjUtZwGUc9574Y4KuoZnzW2UCWj2RNiNiGKQ,1427
|
192
194
|
vellum/types/prompt_node_result.py,sha256=s6jusFXMD1calmDVdL0lWO0NIqILWpdLP8xFRqf-5-k,1054
|
193
195
|
vellum/types/prompt_node_result_data.py,sha256=q6y32EyaaAoIxM1od6-5RQAmPTitBQ-Hlkw5QNdeo6g,1045
|
194
196
|
vellum/types/prompt_output.py,sha256=Df5UnLyBRf79_oUnYiMl9vi_h41yKEDLw1KgkgiX1Uk,1442
|
@@ -301,7 +303,9 @@ vellum/types/test_suite_run_metric_error_output.py,sha256=N0ZRTO1QV4Bobrh9u1-k5q
|
|
301
303
|
vellum/types/test_suite_run_metric_error_output_type_enum.py,sha256=ZPKy0jkcgfuMhI2hG_3UUcw2sYH1BlV_ze8Axlq5nIU,144
|
302
304
|
vellum/types/test_suite_run_metric_number_output.py,sha256=vedeqnSpDl7Y23DdgAlcl16Gxd1WlNo4m4PQ2SGI8Tk,1020
|
303
305
|
vellum/types/test_suite_run_metric_number_output_type_enum.py,sha256=sXoES0zoliicpd66SwlF6xsVUjWSezGNkuxp6CthO2s,146
|
304
|
-
vellum/types/test_suite_run_metric_output.py,sha256=
|
306
|
+
vellum/types/test_suite_run_metric_output.py,sha256=QkHRKO1tnQWoeCq7xc7TfSiAjC927Ha2hdePBJeEn0A,1291
|
307
|
+
vellum/types/test_suite_run_metric_string_output.py,sha256=FxScPpKm8kj6pGTTQ9slJgkb1PQZn5LBa0ZFOnCUxJw,1018
|
308
|
+
vellum/types/test_suite_run_metric_string_output_type_enum.py,sha256=6OKwFyk0SUq4IKp6yg_FAc3ADM0jVCK-chq5JR9iwqo,146
|
305
309
|
vellum/types/test_suite_run_read.py,sha256=bb6kgQaMQpkshETe_dXiMNVCx3r05t12ajaiqTAnvHg,1551
|
306
310
|
vellum/types/test_suite_run_state.py,sha256=myD2yLYpEiTUK4AyRZwl3MrXOKYkDA8k4fpqnDnALAY,1111
|
307
311
|
vellum/types/test_suite_run_test_suite.py,sha256=jsSjV803xCQ4zQ29MCvCM06rH1PCviCZ7G8KzR-LiOA,953
|
@@ -359,7 +363,7 @@ vellum/types/workflow_result_event_output_data_search_results.py,sha256=wYc76-DW
|
|
359
363
|
vellum/types/workflow_result_event_output_data_string.py,sha256=7SR46tKt-I_cGd_eVeKU8ymQ7R3vKkA_dFHCgAU1GcQ,1533
|
360
364
|
vellum/types/workflow_stream_event.py,sha256=KA6Bkk_XA6AIPWR-1vKnwF1A8l_Bm5y0arQCWWWRpsk,911
|
361
365
|
vellum/version.py,sha256=neLt8HBHHUtDF9M5fsyUzHT-pKooEPvceaLDqqIGb0s,77
|
362
|
-
vellum_ai-0.3.
|
363
|
-
vellum_ai-0.3.
|
364
|
-
vellum_ai-0.3.
|
365
|
-
vellum_ai-0.3.
|
366
|
+
vellum_ai-0.3.21.dist-info/LICENSE,sha256=CcaljEIoOBaU-wItPH4PmM_mDCGpyuUY0Er1BGu5Ti8,1073
|
367
|
+
vellum_ai-0.3.21.dist-info/METADATA,sha256=BPMxESrgGDvdc1CRhBOdYCRugknRd_NwOR5D5NzmRI4,3550
|
368
|
+
vellum_ai-0.3.21.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
369
|
+
vellum_ai-0.3.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|