vellum-ai 0.6.9__py3-none-any.whl → 0.7.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +14 -0
- vellum/client.py +28 -28
- vellum/core/client_wrapper.py +1 -1
- vellum/lib/test_suites/resources.py +5 -5
- vellum/resources/document_indexes/client.py +114 -0
- vellum/resources/test_suites/client.py +19 -51
- vellum/types/__init__.py +14 -0
- vellum/types/code_execution_node_json_result.py +1 -1
- vellum/types/execution_json_vellum_value.py +1 -1
- vellum/types/json_variable_value.py +1 -1
- vellum/types/json_vellum_value.py +1 -1
- vellum/types/merge_node_result.py +3 -0
- vellum/types/merge_node_result_data.py +25 -0
- vellum/types/named_test_case_json_variable_value.py +1 -1
- vellum/types/named_test_case_json_variable_value_request.py +1 -1
- vellum/types/node_input_compiled_json_value.py +1 -1
- vellum/types/node_output_compiled_json_value.py +1 -1
- vellum/types/prompt_node_result_data.py +1 -0
- vellum/types/templating_node_json_result.py +1 -1
- vellum/types/terminal_node_json_result.py +1 -1
- vellum/types/test_suite_run_execution_array_output.py +32 -0
- vellum/types/test_suite_run_execution_json_output.py +1 -1
- vellum/types/test_suite_run_execution_output.py +12 -0
- vellum/types/test_suite_run_metric_number_output.py +1 -1
- vellum/types/test_suite_run_metric_string_output.py +1 -1
- vellum/types/test_suite_test_case_bulk_operation_request.py +12 -0
- vellum/types/test_suite_test_case_rejected_bulk_result.py +1 -1
- vellum/types/test_suite_test_case_upsert_bulk_operation_request.py +35 -0
- vellum/types/upsert_enum.py +5 -0
- vellum/types/upsert_test_suite_test_case_request.py +49 -0
- vellum/types/workflow_output_json.py +1 -1
- vellum/types/workflow_request_json_input_request.py +1 -1
- vellum/types/workflow_result_event_output_data_json.py +1 -1
- {vellum_ai-0.6.9.dist-info → vellum_ai-0.7.1.dist-info}/METADATA +1 -1
- {vellum_ai-0.6.9.dist-info → vellum_ai-0.7.1.dist-info}/RECORD +37 -32
- {vellum_ai-0.6.9.dist-info → vellum_ai-0.7.1.dist-info}/LICENSE +0 -0
- {vellum_ai-0.6.9.dist-info → vellum_ai-0.7.1.dist-info}/WHEEL +0 -0
@@ -9,7 +9,7 @@ from ..core.pydantic_utilities import pydantic_v1
|
|
9
9
|
|
10
10
|
class CodeExecutionNodeJsonResult(pydantic_v1.BaseModel):
|
11
11
|
id: str
|
12
|
-
value: typing.
|
12
|
+
value: typing.Any
|
13
13
|
|
14
14
|
def json(self, **kwargs: typing.Any) -> str:
|
15
15
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -18,7 +18,7 @@ class ExecutionJsonVellumValue(pydantic_v1.BaseModel):
|
|
18
18
|
"""
|
19
19
|
|
20
20
|
name: str
|
21
|
-
value: typing.
|
21
|
+
value: typing.Any
|
22
22
|
|
23
23
|
def json(self, **kwargs: typing.Any) -> str:
|
24
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -8,7 +8,7 @@ from ..core.pydantic_utilities import pydantic_v1
|
|
8
8
|
|
9
9
|
|
10
10
|
class JsonVariableValue(pydantic_v1.BaseModel):
|
11
|
-
value: typing.
|
11
|
+
value: typing.Any
|
12
12
|
|
13
13
|
def json(self, **kwargs: typing.Any) -> str:
|
14
14
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -12,7 +12,7 @@ class JsonVellumValue(pydantic_v1.BaseModel):
|
|
12
12
|
A value representing a JSON object.
|
13
13
|
"""
|
14
14
|
|
15
|
-
value: typing.
|
15
|
+
value: typing.Any
|
16
16
|
|
17
17
|
def json(self, **kwargs: typing.Any) -> str:
|
18
18
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -5,6 +5,7 @@ import typing
|
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
7
|
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
from .merge_node_result_data import MergeNodeResultData
|
8
9
|
|
9
10
|
|
10
11
|
class MergeNodeResult(pydantic_v1.BaseModel):
|
@@ -12,6 +13,8 @@ class MergeNodeResult(pydantic_v1.BaseModel):
|
|
12
13
|
A Node Result Event emitted from a Merge Node.
|
13
14
|
"""
|
14
15
|
|
16
|
+
data: MergeNodeResultData
|
17
|
+
|
15
18
|
def json(self, **kwargs: typing.Any) -> str:
|
16
19
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
17
20
|
return super().json(**kwargs_with_defaults)
|
@@ -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 MergeNodeResultData(pydantic_v1.BaseModel):
|
11
|
+
paused_node_data: typing.Optional[typing.Dict[str, typing.Any]] = None
|
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}
|
@@ -12,7 +12,7 @@ class NamedTestCaseJsonVariableValue(pydantic_v1.BaseModel):
|
|
12
12
|
Named Test Case value that is of type JSON
|
13
13
|
"""
|
14
14
|
|
15
|
-
value: typing.
|
15
|
+
value: typing.Any
|
16
16
|
name: str
|
17
17
|
|
18
18
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -12,7 +12,7 @@ class NamedTestCaseJsonVariableValueRequest(pydantic_v1.BaseModel):
|
|
12
12
|
Named Test Case value that is of type JSON
|
13
13
|
"""
|
14
14
|
|
15
|
-
value: typing.
|
15
|
+
value: typing.Any
|
16
16
|
name: str
|
17
17
|
|
18
18
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -10,7 +10,7 @@ from ..core.pydantic_utilities import pydantic_v1
|
|
10
10
|
class NodeInputCompiledJsonValue(pydantic_v1.BaseModel):
|
11
11
|
node_input_id: str
|
12
12
|
key: str
|
13
|
-
value: typing.
|
13
|
+
value: typing.Any
|
14
14
|
|
15
15
|
def json(self, **kwargs: typing.Any) -> str:
|
16
16
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -13,7 +13,7 @@ class NodeOutputCompiledJsonValue(pydantic_v1.BaseModel):
|
|
13
13
|
An output returned by a node that is of type JSON.
|
14
14
|
"""
|
15
15
|
|
16
|
-
value: typing.
|
16
|
+
value: typing.Any
|
17
17
|
node_output_id: str
|
18
18
|
state: typing.Optional[WorkflowNodeResultEventState] = None
|
19
19
|
|
@@ -10,6 +10,7 @@ from ..core.pydantic_utilities import pydantic_v1
|
|
10
10
|
class PromptNodeResultData(pydantic_v1.BaseModel):
|
11
11
|
output_id: str
|
12
12
|
array_output_id: typing.Optional[str] = None
|
13
|
+
execution_id: typing.Optional[str] = None
|
13
14
|
text: typing.Optional[str] = None
|
14
15
|
delta: typing.Optional[str] = None
|
15
16
|
|
@@ -9,7 +9,7 @@ from ..core.pydantic_utilities import pydantic_v1
|
|
9
9
|
|
10
10
|
class TemplatingNodeJsonResult(pydantic_v1.BaseModel):
|
11
11
|
id: str
|
12
|
-
value: typing.
|
12
|
+
value: typing.Any
|
13
13
|
|
14
14
|
def json(self, **kwargs: typing.Any) -> str:
|
15
15
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -14,7 +14,7 @@ class TerminalNodeJsonResult(pydantic_v1.BaseModel):
|
|
14
14
|
The unique name given to the terminal node that produced this output.
|
15
15
|
"""
|
16
16
|
|
17
|
-
value: typing.
|
17
|
+
value: typing.Any
|
18
18
|
|
19
19
|
def json(self, **kwargs: typing.Any) -> str:
|
20
20
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -0,0 +1,32 @@
|
|
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 .array_vellum_value_item import ArrayVellumValueItem
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteRunExecutionArrayOutput(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
Execution output of an entity evaluated during a Test Suite Run that is of type ARRAY
|
14
|
+
"""
|
15
|
+
|
16
|
+
name: str
|
17
|
+
value: typing.Optional[typing.List[ArrayVellumValueItem]] = None
|
18
|
+
output_variable_id: str
|
19
|
+
|
20
|
+
def json(self, **kwargs: typing.Any) -> str:
|
21
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
return super().json(**kwargs_with_defaults)
|
23
|
+
|
24
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
25
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
26
|
+
return super().dict(**kwargs_with_defaults)
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
extra = pydantic_v1.Extra.allow
|
32
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
4
4
|
|
5
5
|
import typing
|
6
6
|
|
7
|
+
from .test_suite_run_execution_array_output import TestSuiteRunExecutionArrayOutput
|
7
8
|
from .test_suite_run_execution_chat_history_output import TestSuiteRunExecutionChatHistoryOutput
|
8
9
|
from .test_suite_run_execution_error_output import TestSuiteRunExecutionErrorOutput
|
9
10
|
from .test_suite_run_execution_function_call_output import TestSuiteRunExecutionFunctionCallOutput
|
@@ -83,6 +84,16 @@ class TestSuiteRunExecutionOutput_FunctionCall(TestSuiteRunExecutionFunctionCall
|
|
83
84
|
populate_by_name = True
|
84
85
|
|
85
86
|
|
87
|
+
class TestSuiteRunExecutionOutput_Array(TestSuiteRunExecutionArrayOutput):
|
88
|
+
type: typing.Literal["ARRAY"] = "ARRAY"
|
89
|
+
|
90
|
+
class Config:
|
91
|
+
frozen = True
|
92
|
+
smart_union = True
|
93
|
+
allow_population_by_field_name = True
|
94
|
+
populate_by_name = True
|
95
|
+
|
96
|
+
|
86
97
|
TestSuiteRunExecutionOutput = typing.Union[
|
87
98
|
TestSuiteRunExecutionOutput_String,
|
88
99
|
TestSuiteRunExecutionOutput_Number,
|
@@ -91,4 +102,5 @@ TestSuiteRunExecutionOutput = typing.Union[
|
|
91
102
|
TestSuiteRunExecutionOutput_SearchResults,
|
92
103
|
TestSuiteRunExecutionOutput_Error,
|
93
104
|
TestSuiteRunExecutionOutput_FunctionCall,
|
105
|
+
TestSuiteRunExecutionOutput_Array,
|
94
106
|
]
|
@@ -7,6 +7,7 @@ import typing
|
|
7
7
|
from .test_suite_test_case_create_bulk_operation_request import TestSuiteTestCaseCreateBulkOperationRequest
|
8
8
|
from .test_suite_test_case_delete_bulk_operation_request import TestSuiteTestCaseDeleteBulkOperationRequest
|
9
9
|
from .test_suite_test_case_replace_bulk_operation_request import TestSuiteTestCaseReplaceBulkOperationRequest
|
10
|
+
from .test_suite_test_case_upsert_bulk_operation_request import TestSuiteTestCaseUpsertBulkOperationRequest
|
10
11
|
|
11
12
|
|
12
13
|
class TestSuiteTestCaseBulkOperationRequest_Create(TestSuiteTestCaseCreateBulkOperationRequest):
|
@@ -29,6 +30,16 @@ class TestSuiteTestCaseBulkOperationRequest_Replace(TestSuiteTestCaseReplaceBulk
|
|
29
30
|
populate_by_name = True
|
30
31
|
|
31
32
|
|
33
|
+
class TestSuiteTestCaseBulkOperationRequest_Upsert(TestSuiteTestCaseUpsertBulkOperationRequest):
|
34
|
+
type: typing.Literal["UPSERT"] = "UPSERT"
|
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
|
+
|
32
43
|
class TestSuiteTestCaseBulkOperationRequest_Delete(TestSuiteTestCaseDeleteBulkOperationRequest):
|
33
44
|
type: typing.Literal["DELETE"] = "DELETE"
|
34
45
|
|
@@ -42,5 +53,6 @@ class TestSuiteTestCaseBulkOperationRequest_Delete(TestSuiteTestCaseDeleteBulkOp
|
|
42
53
|
TestSuiteTestCaseBulkOperationRequest = typing.Union[
|
43
54
|
TestSuiteTestCaseBulkOperationRequest_Create,
|
44
55
|
TestSuiteTestCaseBulkOperationRequest_Replace,
|
56
|
+
TestSuiteTestCaseBulkOperationRequest_Upsert,
|
45
57
|
TestSuiteTestCaseBulkOperationRequest_Delete,
|
46
58
|
]
|
@@ -12,7 +12,7 @@ class TestSuiteTestCaseRejectedBulkResult(pydantic_v1.BaseModel):
|
|
12
12
|
The result of a bulk operation that failed to operate on a Test Case.
|
13
13
|
"""
|
14
14
|
|
15
|
-
id: str = pydantic_v1.Field()
|
15
|
+
id: typing.Optional[str] = pydantic_v1.Field(default=None)
|
16
16
|
"""
|
17
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
18
|
"""
|
@@ -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 .upsert_test_suite_test_case_request import UpsertTestSuiteTestCaseRequest
|
9
|
+
|
10
|
+
|
11
|
+
class TestSuiteTestCaseUpsertBulkOperationRequest(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
A bulk operation that represents the upserting 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: UpsertTestSuiteTestCaseRequest
|
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,49 @@
|
|
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 UpsertTestSuiteTestCaseRequest(pydantic_v1.BaseModel):
|
12
|
+
id: typing.Optional[str] = pydantic_v1.Field(default=None)
|
13
|
+
"""
|
14
|
+
The Vellum-generated ID of an existing Test Case whose data you'd like to replace. If specified and no Test Case exists with this ID, a 404 will be returned.
|
15
|
+
"""
|
16
|
+
|
17
|
+
external_id: typing.Optional[str] = pydantic_v1.Field(default=None)
|
18
|
+
"""
|
19
|
+
An ID external to Vellum that uniquely identifies the Test Case that you'd like to create/update. If there's a match on a Test Case that was previously created with the same external_id, it will be updated. Otherwise, a new Test Case will be created with this value as its external_id. If no external_id is specified, then a new Test Case will always be created.
|
20
|
+
"""
|
21
|
+
|
22
|
+
label: typing.Optional[str] = pydantic_v1.Field(default=None)
|
23
|
+
"""
|
24
|
+
A human-readable label used to convey the intention of this Test Case
|
25
|
+
"""
|
26
|
+
|
27
|
+
input_values: typing.List[NamedTestCaseVariableValueRequest] = pydantic_v1.Field()
|
28
|
+
"""
|
29
|
+
Values for each of the Test Case's input variables
|
30
|
+
"""
|
31
|
+
|
32
|
+
evaluation_values: typing.List[NamedTestCaseVariableValueRequest] = pydantic_v1.Field()
|
33
|
+
"""
|
34
|
+
Values for each of the Test Case's evaluation variables
|
35
|
+
"""
|
36
|
+
|
37
|
+
def json(self, **kwargs: typing.Any) -> str:
|
38
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
39
|
+
return super().json(**kwargs_with_defaults)
|
40
|
+
|
41
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
42
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
43
|
+
return super().dict(**kwargs_with_defaults)
|
44
|
+
|
45
|
+
class Config:
|
46
|
+
frozen = True
|
47
|
+
smart_union = True
|
48
|
+
extra = pydantic_v1.Extra.allow
|
49
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -18,7 +18,7 @@ class WorkflowOutputJson(pydantic_v1.BaseModel):
|
|
18
18
|
The output's name, as defined in the workflow
|
19
19
|
"""
|
20
20
|
|
21
|
-
value: typing.
|
21
|
+
value: typing.Any
|
22
22
|
|
23
23
|
def json(self, **kwargs: typing.Any) -> str:
|
24
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -17,7 +17,7 @@ class WorkflowRequestJsonInputRequest(pydantic_v1.BaseModel):
|
|
17
17
|
The variable's name, as defined in the Workflow.
|
18
18
|
"""
|
19
19
|
|
20
|
-
value: typing.
|
20
|
+
value: typing.Any
|
21
21
|
|
22
22
|
def json(self, **kwargs: typing.Any) -> str:
|
23
23
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -22,7 +22,7 @@ class WorkflowResultEventOutputDataJson(pydantic_v1.BaseModel):
|
|
22
22
|
The newly output string value. Only relevant for string outputs with a state of STREAMING.
|
23
23
|
"""
|
24
24
|
|
25
|
-
value: typing.
|
25
|
+
value: typing.Any
|
26
26
|
|
27
27
|
def json(self, **kwargs: typing.Any) -> str:
|
28
28
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|