vellum-ai 0.6.9__py3-none-any.whl → 0.7.2__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. vellum/__init__.py +56 -0
  2. vellum/client.py +73 -40
  3. vellum/core/client_wrapper.py +1 -1
  4. vellum/lib/test_suites/resources.py +5 -5
  5. vellum/resources/document_indexes/client.py +114 -0
  6. vellum/resources/test_suites/client.py +19 -51
  7. vellum/types/__init__.py +58 -0
  8. vellum/types/array_vellum_value_item_request.py +82 -0
  9. vellum/types/code_execution_node_json_result.py +1 -1
  10. vellum/types/error_vellum_value_request.py +30 -0
  11. vellum/types/execution_json_vellum_value.py +1 -1
  12. vellum/types/function_call_vellum_value_request.py +30 -0
  13. vellum/types/image_vellum_value_request.py +30 -0
  14. vellum/types/json_variable_value.py +1 -1
  15. vellum/types/json_vellum_value.py +1 -1
  16. vellum/types/json_vellum_value_request.py +29 -0
  17. vellum/types/merge_node_result.py +3 -0
  18. vellum/types/merge_node_result_data.py +25 -0
  19. vellum/types/named_test_case_array_variable_value.py +31 -0
  20. vellum/types/named_test_case_array_variable_value_request.py +31 -0
  21. vellum/types/named_test_case_json_variable_value.py +1 -1
  22. vellum/types/named_test_case_json_variable_value_request.py +1 -1
  23. vellum/types/named_test_case_variable_value.py +12 -0
  24. vellum/types/named_test_case_variable_value_request.py +12 -0
  25. vellum/types/node_input_compiled_json_value.py +1 -1
  26. vellum/types/node_output_compiled_json_value.py +1 -1
  27. vellum/types/number_vellum_value_request.py +29 -0
  28. vellum/types/prompt_deployment_expand_meta_request_request.py +11 -11
  29. vellum/types/prompt_execution_meta.py +1 -1
  30. vellum/types/prompt_node_execution_meta.py +30 -0
  31. vellum/types/prompt_node_result_data.py +3 -0
  32. vellum/types/string_vellum_value_request.py +29 -0
  33. vellum/types/templating_node_json_result.py +1 -1
  34. vellum/types/terminal_node_json_result.py +1 -1
  35. vellum/types/test_case_array_variable_value.py +32 -0
  36. vellum/types/test_case_variable_value.py +12 -0
  37. vellum/types/test_suite_run_execution_array_output.py +32 -0
  38. vellum/types/test_suite_run_execution_json_output.py +1 -1
  39. vellum/types/test_suite_run_execution_output.py +12 -0
  40. vellum/types/test_suite_run_metric_number_output.py +1 -1
  41. vellum/types/test_suite_run_metric_string_output.py +1 -1
  42. vellum/types/test_suite_test_case_bulk_operation_request.py +12 -0
  43. vellum/types/test_suite_test_case_rejected_bulk_result.py +1 -1
  44. vellum/types/test_suite_test_case_upsert_bulk_operation_request.py +35 -0
  45. vellum/types/upsert_enum.py +5 -0
  46. vellum/types/upsert_test_suite_test_case_request.py +49 -0
  47. vellum/types/workflow_expand_meta_request.py +28 -0
  48. vellum/types/workflow_output_json.py +1 -1
  49. vellum/types/workflow_request_json_input_request.py +1 -1
  50. vellum/types/workflow_result_event_output_data_json.py +1 -1
  51. {vellum_ai-0.6.9.dist-info → vellum_ai-0.7.2.dist-info}/METADATA +1 -1
  52. {vellum_ai-0.6.9.dist-info → vellum_ai-0.7.2.dist-info}/RECORD +54 -37
  53. {vellum_ai-0.6.9.dist-info → vellum_ai-0.7.2.dist-info}/LICENSE +0 -0
  54. {vellum_ai-0.6.9.dist-info → vellum_ai-0.7.2.dist-info}/WHEEL +0 -0
@@ -12,7 +12,7 @@ class JsonVellumValue(pydantic_v1.BaseModel):
12
12
  A value representing a JSON object.
13
13
  """
14
14
 
15
- value: typing.Optional[typing.Dict[str, typing.Any]] = None
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}
@@ -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 JsonVellumValueRequest(pydantic_v1.BaseModel):
11
+ """
12
+ A value representing a JSON object.
13
+ """
14
+
15
+ value: typing.Any
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}
@@ -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}
@@ -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 .array_vellum_value_item import ArrayVellumValueItem
9
+
10
+
11
+ class NamedTestCaseArrayVariableValue(pydantic_v1.BaseModel):
12
+ """
13
+ Named Test Case value that is of type ARRAY
14
+ """
15
+
16
+ value: typing.Optional[typing.List[ArrayVellumValueItem]] = None
17
+ name: str
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,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 .array_vellum_value_item_request import ArrayVellumValueItemRequest
9
+
10
+
11
+ class NamedTestCaseArrayVariableValueRequest(pydantic_v1.BaseModel):
12
+ """
13
+ Named Test Case value that is of type ARRAY
14
+ """
15
+
16
+ value: typing.Optional[typing.List[ArrayVellumValueItemRequest]] = None
17
+ name: str
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}
@@ -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.Optional[typing.Dict[str, typing.Any]] = None
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.Optional[typing.Dict[str, typing.Any]] = None
15
+ value: typing.Any
16
16
  name: str
17
17
 
18
18
  def json(self, **kwargs: typing.Any) -> str:
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  import typing
6
6
 
7
+ from .named_test_case_array_variable_value import NamedTestCaseArrayVariableValue
7
8
  from .named_test_case_chat_history_variable_value import NamedTestCaseChatHistoryVariableValue
8
9
  from .named_test_case_error_variable_value import NamedTestCaseErrorVariableValue
9
10
  from .named_test_case_function_call_variable_value import NamedTestCaseFunctionCallVariableValue
@@ -83,6 +84,16 @@ class NamedTestCaseVariableValue_FunctionCall(NamedTestCaseFunctionCallVariableV
83
84
  populate_by_name = True
84
85
 
85
86
 
87
+ class NamedTestCaseVariableValue_Array(NamedTestCaseArrayVariableValue):
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
  NamedTestCaseVariableValue = typing.Union[
87
98
  NamedTestCaseVariableValue_String,
88
99
  NamedTestCaseVariableValue_Number,
@@ -91,4 +102,5 @@ NamedTestCaseVariableValue = typing.Union[
91
102
  NamedTestCaseVariableValue_SearchResults,
92
103
  NamedTestCaseVariableValue_Error,
93
104
  NamedTestCaseVariableValue_FunctionCall,
105
+ NamedTestCaseVariableValue_Array,
94
106
  ]
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  import typing
6
6
 
7
+ from .named_test_case_array_variable_value_request import NamedTestCaseArrayVariableValueRequest
7
8
  from .named_test_case_chat_history_variable_value_request import NamedTestCaseChatHistoryVariableValueRequest
8
9
  from .named_test_case_error_variable_value_request import NamedTestCaseErrorVariableValueRequest
9
10
  from .named_test_case_function_call_variable_value_request import NamedTestCaseFunctionCallVariableValueRequest
@@ -83,6 +84,16 @@ class NamedTestCaseVariableValueRequest_FunctionCall(NamedTestCaseFunctionCallVa
83
84
  populate_by_name = True
84
85
 
85
86
 
87
+ class NamedTestCaseVariableValueRequest_Array(NamedTestCaseArrayVariableValueRequest):
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
  NamedTestCaseVariableValueRequest = typing.Union[
87
98
  NamedTestCaseVariableValueRequest_String,
88
99
  NamedTestCaseVariableValueRequest_Number,
@@ -91,4 +102,5 @@ NamedTestCaseVariableValueRequest = typing.Union[
91
102
  NamedTestCaseVariableValueRequest_SearchResults,
92
103
  NamedTestCaseVariableValueRequest_Error,
93
104
  NamedTestCaseVariableValueRequest_FunctionCall,
105
+ NamedTestCaseVariableValueRequest_Array,
94
106
  ]
@@ -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.Optional[typing.Dict[str, typing.Any]] = None
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.Optional[typing.Dict[str, typing.Any]] = None
16
+ value: typing.Any
17
17
  node_output_id: str
18
18
  state: typing.Optional[WorkflowNodeResultEventState] = None
19
19
 
@@ -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 NumberVellumValueRequest(pydantic_v1.BaseModel):
11
+ """
12
+ A value representing a number.
13
+ """
14
+
15
+ value: typing.Optional[float] = None
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}
@@ -10,32 +10,32 @@ from ..core.pydantic_utilities import pydantic_v1
10
10
  class PromptDeploymentExpandMetaRequestRequest(pydantic_v1.BaseModel):
11
11
  model_name: typing.Optional[bool] = pydantic_v1.Field(default=None)
12
12
  """
13
- If enabled, the response will include the model identifier representing the ML Model invoked by the Prompt Deployment.
13
+ If enabled, the response will include the model identifier representing the ML Model invoked by the Prompt.
14
14
  """
15
15
 
16
- latency: typing.Optional[bool] = pydantic_v1.Field(default=None)
16
+ usage: typing.Optional[bool] = pydantic_v1.Field(default=None)
17
17
  """
18
- If enabled, the response will include the time in nanoseconds it took to execute the Prompt Deployment.
18
+ If enabled, the response will include model host usage tracking. This may increase latency for some model hosts.
19
19
  """
20
20
 
21
- deployment_release_tag: typing.Optional[bool] = pydantic_v1.Field(default=None)
21
+ finish_reason: typing.Optional[bool] = pydantic_v1.Field(default=None)
22
22
  """
23
- If enabled, the response will include the release tag of the Prompt Deployment.
23
+ If enabled, the response will include the reason provided by the model for why the execution finished.
24
24
  """
25
25
 
26
- prompt_version_id: typing.Optional[bool] = pydantic_v1.Field(default=None)
26
+ latency: typing.Optional[bool] = pydantic_v1.Field(default=None)
27
27
  """
28
- If enabled, the response will include the ID of the Prompt Version backing the deployment.
28
+ If enabled, the response will include the time in nanoseconds it took to execute the Prompt Deployment.
29
29
  """
30
30
 
31
- finish_reason: typing.Optional[bool] = pydantic_v1.Field(default=None)
31
+ deployment_release_tag: typing.Optional[bool] = pydantic_v1.Field(default=None)
32
32
  """
33
- If enabled, the response will include the reason provided by the model for why the execution finished.
33
+ If enabled, the response will include the release tag of the Prompt Deployment.
34
34
  """
35
35
 
36
- usage: typing.Optional[bool] = pydantic_v1.Field(default=None)
36
+ prompt_version_id: typing.Optional[bool] = pydantic_v1.Field(default=None)
37
37
  """
38
- If enabled, the response will include model host usage tracking. This may increase latency for some model hosts.
38
+ If enabled, the response will include the ID of the Prompt Version backing the deployment.
39
39
  """
40
40
 
41
41
  def json(self, **kwargs: typing.Any) -> str:
@@ -14,12 +14,12 @@ class PromptExecutionMeta(pydantic_v1.BaseModel):
14
14
  The subset of the metadata tracked by Vellum during prompt execution that the request opted into with `expand_meta`.
15
15
  """
16
16
 
17
- usage: typing.Optional[MlModelUsage] = None
18
17
  model_name: typing.Optional[str] = None
19
18
  latency: typing.Optional[int] = None
20
19
  deployment_release_tag: typing.Optional[str] = None
21
20
  prompt_version_id: typing.Optional[str] = None
22
21
  finish_reason: typing.Optional[FinishReasonEnum] = None
22
+ usage: typing.Optional[MlModelUsage] = None
23
23
 
24
24
  def json(self, **kwargs: typing.Any) -> str:
25
25
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -0,0 +1,30 @@
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 .ml_model_usage import MlModelUsage
9
+
10
+
11
+ class PromptNodeExecutionMeta(pydantic_v1.BaseModel):
12
+ """
13
+ The subset of the metadata tracked by Vellum during prompt execution that the request opted into with `expand_meta`.
14
+ """
15
+
16
+ usage: typing.Optional[MlModelUsage] = None
17
+
18
+ def json(self, **kwargs: typing.Any) -> str:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().json(**kwargs_with_defaults)
21
+
22
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
+ return super().dict(**kwargs_with_defaults)
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic_v1.Extra.allow
30
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -5,11 +5,14 @@ import typing
5
5
 
6
6
  from ..core.datetime_utils import serialize_datetime
7
7
  from ..core.pydantic_utilities import pydantic_v1
8
+ from .prompt_node_execution_meta import PromptNodeExecutionMeta
8
9
 
9
10
 
10
11
  class PromptNodeResultData(pydantic_v1.BaseModel):
12
+ execution_meta: typing.Optional[PromptNodeExecutionMeta] = None
11
13
  output_id: str
12
14
  array_output_id: typing.Optional[str] = None
15
+ execution_id: typing.Optional[str] = None
13
16
  text: typing.Optional[str] = None
14
17
  delta: typing.Optional[str] = None
15
18
 
@@ -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 StringVellumValueRequest(pydantic_v1.BaseModel):
11
+ """
12
+ A value representing a string.
13
+ """
14
+
15
+ value: typing.Optional[str] = None
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}
@@ -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.Optional[typing.Dict[str, typing.Any]] = None
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.Optional[typing.Dict[str, typing.Any]] = None
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 TestCaseArrayVariableValue(pydantic_v1.BaseModel):
12
+ """
13
+ An Array value for a variable in a Test Case.
14
+ """
15
+
16
+ variable_id: str
17
+ name: str
18
+ value: typing.Optional[typing.List[ArrayVellumValueItem]] = None
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_case_array_variable_value import TestCaseArrayVariableValue
7
8
  from .test_case_chat_history_variable_value import TestCaseChatHistoryVariableValue
8
9
  from .test_case_error_variable_value import TestCaseErrorVariableValue
9
10
  from .test_case_function_call_variable_value import TestCaseFunctionCallVariableValue
@@ -83,6 +84,16 @@ class TestCaseVariableValue_FunctionCall(TestCaseFunctionCallVariableValue):
83
84
  populate_by_name = True
84
85
 
85
86
 
87
+ class TestCaseVariableValue_Array(TestCaseArrayVariableValue):
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
  TestCaseVariableValue = typing.Union[
87
98
  TestCaseVariableValue_String,
88
99
  TestCaseVariableValue_Number,
@@ -91,4 +102,5 @@ TestCaseVariableValue = typing.Union[
91
102
  TestCaseVariableValue_SearchResults,
92
103
  TestCaseVariableValue_Error,
93
104
  TestCaseVariableValue_FunctionCall,
105
+ TestCaseVariableValue_Array,
94
106
  ]
@@ -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}
@@ -13,7 +13,7 @@ class TestSuiteRunExecutionJsonOutput(pydantic_v1.BaseModel):
13
13
  """
14
14
 
15
15
  name: str
16
- value: typing.Optional[typing.Dict[str, typing.Any]] = None
16
+ value: typing.Any
17
17
  output_variable_id: str
18
18
 
19
19
  def json(self, **kwargs: typing.Any) -> str:
@@ -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
  ]
@@ -12,7 +12,7 @@ class TestSuiteRunMetricNumberOutput(pydantic_v1.BaseModel):
12
12
  Output for a test suite run metric that is of type NUMBER
13
13
  """
14
14
 
15
- value: float
15
+ value: typing.Optional[float] = None
16
16
  name: str
17
17
 
18
18
  def json(self, **kwargs: typing.Any) -> str:
@@ -12,7 +12,7 @@ class TestSuiteRunMetricStringOutput(pydantic_v1.BaseModel):
12
12
  Output for a test suite run metric that is of type STRING
13
13
  """
14
14
 
15
- value: str
15
+ value: typing.Optional[str] = None
16
16
  name: str
17
17
 
18
18
  def json(self, **kwargs: typing.Any) -> str:
@@ -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
  """