vellum-ai 0.3.21__py3-none-any.whl → 0.3.22__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 +4 -0
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/test_suite_runs/client.py +14 -0
- vellum/terraform/__init__.py +26 -0
- vellum/terraform/_jsii/__init__.py +27 -0
- vellum/terraform/_jsii/vellum-ai_vellum@0.0.0.jsii.tgz +0 -0
- vellum/terraform/constraints.json +4 -0
- vellum/terraform/data_vellum_document_index/__init__.py +409 -0
- vellum/terraform/document_index/__init__.py +490 -0
- vellum/terraform/provider/__init__.py +237 -0
- vellum/terraform/py.typed +1 -0
- vellum/terraform/versions.json +3 -0
- vellum/types/__init__.py +4 -0
- vellum/types/fulfilled_workflow_node_result_event.py +1 -1
- vellum/types/named_test_case_chat_history_variable_value_request.py +5 -1
- vellum/types/named_test_case_error_variable_value_request.py +5 -1
- vellum/types/named_test_case_json_variable_value_request.py +5 -1
- vellum/types/named_test_case_number_variable_value_request.py +5 -1
- vellum/types/named_test_case_search_results_variable_value_request.py +5 -1
- vellum/types/named_test_case_string_variable_value_request.py +5 -1
- vellum/types/prompt_template_block.py +2 -0
- vellum/types/prompt_template_block_request.py +2 -0
- vellum/types/prompt_template_block_state.py +22 -0
- vellum/types/test_suite_run_execution_chat_history_output.py +6 -1
- vellum/types/test_suite_run_execution_error_output.py +6 -1
- vellum/types/test_suite_run_execution_json_output.py +6 -1
- vellum/types/test_suite_run_execution_metric_definition.py +31 -0
- vellum/types/test_suite_run_execution_metric_result.py +3 -0
- vellum/types/test_suite_run_execution_number_output.py +6 -1
- vellum/types/test_suite_run_execution_search_results_output.py +6 -1
- vellum/types/test_suite_run_execution_string_output.py +6 -1
- {vellum_ai-0.3.21.dist-info → vellum_ai-0.3.22.dist-info}/METADATA +1 -1
- {vellum_ai-0.3.21.dist-info → vellum_ai-0.3.22.dist-info}/RECORD +35 -24
- {vellum_ai-0.3.21.dist-info → vellum_ai-0.3.22.dist-info}/LICENSE +0 -0
- {vellum_ai-0.3.21.dist-info → vellum_ai-0.3.22.dist-info}/WHEEL +0 -0
@@ -0,0 +1,237 @@
|
|
1
|
+
'''
|
2
|
+
# `provider`
|
3
|
+
|
4
|
+
Refer to the Terraform Registry for docs: [`vellum`](https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs).
|
5
|
+
'''
|
6
|
+
from pkgutil import extend_path
|
7
|
+
__path__ = extend_path(__path__, __name__)
|
8
|
+
|
9
|
+
import abc
|
10
|
+
import builtins
|
11
|
+
import datetime
|
12
|
+
import enum
|
13
|
+
import typing
|
14
|
+
|
15
|
+
import jsii
|
16
|
+
import publication
|
17
|
+
import typing_extensions
|
18
|
+
|
19
|
+
from typeguard import check_type
|
20
|
+
|
21
|
+
from .._jsii import *
|
22
|
+
|
23
|
+
import cdktf as _cdktf_9a9027ec
|
24
|
+
import constructs as _constructs_77d1e7e8
|
25
|
+
|
26
|
+
|
27
|
+
class VellumProvider(
|
28
|
+
_cdktf_9a9027ec.TerraformProvider,
|
29
|
+
metaclass=jsii.JSIIMeta,
|
30
|
+
jsii_type="vellum-ai_vellum.provider.VellumProvider",
|
31
|
+
):
|
32
|
+
'''Represents a {@link https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs vellum}.'''
|
33
|
+
|
34
|
+
def __init__(
|
35
|
+
self,
|
36
|
+
scope: _constructs_77d1e7e8.Construct,
|
37
|
+
id: builtins.str,
|
38
|
+
*,
|
39
|
+
alias: typing.Optional[builtins.str] = None,
|
40
|
+
api_key: typing.Optional[builtins.str] = None,
|
41
|
+
) -> None:
|
42
|
+
'''Create a new {@link https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs vellum} Resource.
|
43
|
+
|
44
|
+
:param scope: The scope in which to define this construct.
|
45
|
+
:param id: The scoped construct ID. Must be unique amongst siblings in the same scope
|
46
|
+
:param alias: Alias name. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs#alias VellumProvider#alias}
|
47
|
+
:param api_key: API Key to authenticate with the Vellum API. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs#api_key VellumProvider#api_key}
|
48
|
+
'''
|
49
|
+
if __debug__:
|
50
|
+
type_hints = typing.get_type_hints(_typecheckingstub__8f332a1b6664893e57a3554abbbfd334296d68a0c02222521351772fec263177)
|
51
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
52
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
53
|
+
config = VellumProviderConfig(alias=alias, api_key=api_key)
|
54
|
+
|
55
|
+
jsii.create(self.__class__, self, [scope, id, config])
|
56
|
+
|
57
|
+
@jsii.member(jsii_name="generateConfigForImport")
|
58
|
+
@builtins.classmethod
|
59
|
+
def generate_config_for_import(
|
60
|
+
cls,
|
61
|
+
scope: _constructs_77d1e7e8.Construct,
|
62
|
+
import_to_id: builtins.str,
|
63
|
+
import_from_id: builtins.str,
|
64
|
+
provider: typing.Optional[_cdktf_9a9027ec.TerraformProvider] = None,
|
65
|
+
) -> _cdktf_9a9027ec.ImportableResource:
|
66
|
+
'''Generates CDKTF code for importing a VellumProvider resource upon running "cdktf plan ".
|
67
|
+
|
68
|
+
:param scope: The scope in which to define this construct.
|
69
|
+
:param import_to_id: The construct id used in the generated config for the VellumProvider to import.
|
70
|
+
:param import_from_id: The id of the existing VellumProvider that should be imported. Refer to the {@link https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs#import import section} in the documentation of this resource for the id to use
|
71
|
+
:param provider: ? Optional instance of the provider where the VellumProvider to import is found.
|
72
|
+
'''
|
73
|
+
if __debug__:
|
74
|
+
type_hints = typing.get_type_hints(_typecheckingstub__43f598a9f664a05d63c3b7644f2981a0397df03284b98ca077e6d7265f6aebcb)
|
75
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
76
|
+
check_type(argname="argument import_to_id", value=import_to_id, expected_type=type_hints["import_to_id"])
|
77
|
+
check_type(argname="argument import_from_id", value=import_from_id, expected_type=type_hints["import_from_id"])
|
78
|
+
check_type(argname="argument provider", value=provider, expected_type=type_hints["provider"])
|
79
|
+
return typing.cast(_cdktf_9a9027ec.ImportableResource, jsii.sinvoke(cls, "generateConfigForImport", [scope, import_to_id, import_from_id, provider]))
|
80
|
+
|
81
|
+
@jsii.member(jsii_name="resetAlias")
|
82
|
+
def reset_alias(self) -> None:
|
83
|
+
return typing.cast(None, jsii.invoke(self, "resetAlias", []))
|
84
|
+
|
85
|
+
@jsii.member(jsii_name="resetApiKey")
|
86
|
+
def reset_api_key(self) -> None:
|
87
|
+
return typing.cast(None, jsii.invoke(self, "resetApiKey", []))
|
88
|
+
|
89
|
+
@jsii.member(jsii_name="synthesizeAttributes")
|
90
|
+
def _synthesize_attributes(self) -> typing.Mapping[builtins.str, typing.Any]:
|
91
|
+
return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.invoke(self, "synthesizeAttributes", []))
|
92
|
+
|
93
|
+
@jsii.member(jsii_name="synthesizeHclAttributes")
|
94
|
+
def _synthesize_hcl_attributes(self) -> typing.Mapping[builtins.str, typing.Any]:
|
95
|
+
return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.invoke(self, "synthesizeHclAttributes", []))
|
96
|
+
|
97
|
+
@jsii.python.classproperty
|
98
|
+
@jsii.member(jsii_name="tfResourceType")
|
99
|
+
def TF_RESOURCE_TYPE(cls) -> builtins.str:
|
100
|
+
return typing.cast(builtins.str, jsii.sget(cls, "tfResourceType"))
|
101
|
+
|
102
|
+
@builtins.property
|
103
|
+
@jsii.member(jsii_name="aliasInput")
|
104
|
+
def alias_input(self) -> typing.Optional[builtins.str]:
|
105
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "aliasInput"))
|
106
|
+
|
107
|
+
@builtins.property
|
108
|
+
@jsii.member(jsii_name="apiKeyInput")
|
109
|
+
def api_key_input(self) -> typing.Optional[builtins.str]:
|
110
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "apiKeyInput"))
|
111
|
+
|
112
|
+
@builtins.property
|
113
|
+
@jsii.member(jsii_name="alias")
|
114
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
115
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "alias"))
|
116
|
+
|
117
|
+
@alias.setter
|
118
|
+
def alias(self, value: typing.Optional[builtins.str]) -> None:
|
119
|
+
if __debug__:
|
120
|
+
type_hints = typing.get_type_hints(_typecheckingstub__15a78e7b117167a258d082de10d77ec8038e1f5fcc5ff5ef0caadbce4dec2c02)
|
121
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
122
|
+
jsii.set(self, "alias", value)
|
123
|
+
|
124
|
+
@builtins.property
|
125
|
+
@jsii.member(jsii_name="apiKey")
|
126
|
+
def api_key(self) -> typing.Optional[builtins.str]:
|
127
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "apiKey"))
|
128
|
+
|
129
|
+
@api_key.setter
|
130
|
+
def api_key(self, value: typing.Optional[builtins.str]) -> None:
|
131
|
+
if __debug__:
|
132
|
+
type_hints = typing.get_type_hints(_typecheckingstub__402b9018cf60ba05eb9ab72153d7f52235bd10a5f5615a074a53880068a8779b)
|
133
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
134
|
+
jsii.set(self, "apiKey", value)
|
135
|
+
|
136
|
+
|
137
|
+
@jsii.data_type(
|
138
|
+
jsii_type="vellum-ai_vellum.provider.VellumProviderConfig",
|
139
|
+
jsii_struct_bases=[],
|
140
|
+
name_mapping={"alias": "alias", "api_key": "apiKey"},
|
141
|
+
)
|
142
|
+
class VellumProviderConfig:
|
143
|
+
def __init__(
|
144
|
+
self,
|
145
|
+
*,
|
146
|
+
alias: typing.Optional[builtins.str] = None,
|
147
|
+
api_key: typing.Optional[builtins.str] = None,
|
148
|
+
) -> None:
|
149
|
+
'''
|
150
|
+
:param alias: Alias name. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs#alias VellumProvider#alias}
|
151
|
+
:param api_key: API Key to authenticate with the Vellum API. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs#api_key VellumProvider#api_key}
|
152
|
+
'''
|
153
|
+
if __debug__:
|
154
|
+
type_hints = typing.get_type_hints(_typecheckingstub__bb8c32f1d43f1344224f7a690abc6e2489c4dff67cb93921483ed2cc4b5410e1)
|
155
|
+
check_type(argname="argument alias", value=alias, expected_type=type_hints["alias"])
|
156
|
+
check_type(argname="argument api_key", value=api_key, expected_type=type_hints["api_key"])
|
157
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
158
|
+
if alias is not None:
|
159
|
+
self._values["alias"] = alias
|
160
|
+
if api_key is not None:
|
161
|
+
self._values["api_key"] = api_key
|
162
|
+
|
163
|
+
@builtins.property
|
164
|
+
def alias(self) -> typing.Optional[builtins.str]:
|
165
|
+
'''Alias name.
|
166
|
+
|
167
|
+
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs#alias VellumProvider#alias}
|
168
|
+
'''
|
169
|
+
result = self._values.get("alias")
|
170
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
171
|
+
|
172
|
+
@builtins.property
|
173
|
+
def api_key(self) -> typing.Optional[builtins.str]:
|
174
|
+
'''API Key to authenticate with the Vellum API.
|
175
|
+
|
176
|
+
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/vellum-ai/vellum/0.0.2/docs#api_key VellumProvider#api_key}
|
177
|
+
'''
|
178
|
+
result = self._values.get("api_key")
|
179
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
180
|
+
|
181
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
182
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
183
|
+
|
184
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
185
|
+
return not (rhs == self)
|
186
|
+
|
187
|
+
def __repr__(self) -> str:
|
188
|
+
return "VellumProviderConfig(%s)" % ", ".join(
|
189
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
190
|
+
)
|
191
|
+
|
192
|
+
|
193
|
+
__all__ = [
|
194
|
+
"VellumProvider",
|
195
|
+
"VellumProviderConfig",
|
196
|
+
]
|
197
|
+
|
198
|
+
publication.publish()
|
199
|
+
|
200
|
+
def _typecheckingstub__8f332a1b6664893e57a3554abbbfd334296d68a0c02222521351772fec263177(
|
201
|
+
scope: _constructs_77d1e7e8.Construct,
|
202
|
+
id: builtins.str,
|
203
|
+
*,
|
204
|
+
alias: typing.Optional[builtins.str] = None,
|
205
|
+
api_key: typing.Optional[builtins.str] = None,
|
206
|
+
) -> None:
|
207
|
+
"""Type checking stubs"""
|
208
|
+
pass
|
209
|
+
|
210
|
+
def _typecheckingstub__43f598a9f664a05d63c3b7644f2981a0397df03284b98ca077e6d7265f6aebcb(
|
211
|
+
scope: _constructs_77d1e7e8.Construct,
|
212
|
+
import_to_id: builtins.str,
|
213
|
+
import_from_id: builtins.str,
|
214
|
+
provider: typing.Optional[_cdktf_9a9027ec.TerraformProvider] = None,
|
215
|
+
) -> None:
|
216
|
+
"""Type checking stubs"""
|
217
|
+
pass
|
218
|
+
|
219
|
+
def _typecheckingstub__15a78e7b117167a258d082de10d77ec8038e1f5fcc5ff5ef0caadbce4dec2c02(
|
220
|
+
value: typing.Optional[builtins.str],
|
221
|
+
) -> None:
|
222
|
+
"""Type checking stubs"""
|
223
|
+
pass
|
224
|
+
|
225
|
+
def _typecheckingstub__402b9018cf60ba05eb9ab72153d7f52235bd10a5f5615a074a53880068a8779b(
|
226
|
+
value: typing.Optional[builtins.str],
|
227
|
+
) -> None:
|
228
|
+
"""Type checking stubs"""
|
229
|
+
pass
|
230
|
+
|
231
|
+
def _typecheckingstub__bb8c32f1d43f1344224f7a690abc6e2489c4dff67cb93921483ed2cc4b5410e1(
|
232
|
+
*,
|
233
|
+
alias: typing.Optional[builtins.str] = None,
|
234
|
+
api_key: typing.Optional[builtins.str] = None,
|
235
|
+
) -> None:
|
236
|
+
"""Type checking stubs"""
|
237
|
+
pass
|
@@ -0,0 +1 @@
|
|
1
|
+
|
vellum/types/__init__.py
CHANGED
@@ -260,6 +260,7 @@ from .prompt_template_block_data_request import PromptTemplateBlockDataRequest
|
|
260
260
|
from .prompt_template_block_properties import PromptTemplateBlockProperties
|
261
261
|
from .prompt_template_block_properties_request import PromptTemplateBlockPropertiesRequest
|
262
262
|
from .prompt_template_block_request import PromptTemplateBlockRequest
|
263
|
+
from .prompt_template_block_state import PromptTemplateBlockState
|
263
264
|
from .provider_enum import ProviderEnum
|
264
265
|
from .raw_prompt_execution_overrides_request import RawPromptExecutionOverridesRequest
|
265
266
|
from .register_prompt_error_response import RegisterPromptErrorResponse
|
@@ -399,6 +400,7 @@ from .test_suite_run_execution import TestSuiteRunExecution
|
|
399
400
|
from .test_suite_run_execution_chat_history_output import TestSuiteRunExecutionChatHistoryOutput
|
400
401
|
from .test_suite_run_execution_error_output import TestSuiteRunExecutionErrorOutput
|
401
402
|
from .test_suite_run_execution_json_output import TestSuiteRunExecutionJsonOutput
|
403
|
+
from .test_suite_run_execution_metric_definition import TestSuiteRunExecutionMetricDefinition
|
402
404
|
from .test_suite_run_execution_metric_result import TestSuiteRunExecutionMetricResult
|
403
405
|
from .test_suite_run_execution_number_output import TestSuiteRunExecutionNumberOutput
|
404
406
|
from .test_suite_run_execution_output import (
|
@@ -759,6 +761,7 @@ __all__ = [
|
|
759
761
|
"PromptTemplateBlockProperties",
|
760
762
|
"PromptTemplateBlockPropertiesRequest",
|
761
763
|
"PromptTemplateBlockRequest",
|
764
|
+
"PromptTemplateBlockState",
|
762
765
|
"ProviderEnum",
|
763
766
|
"RawPromptExecutionOverridesRequest",
|
764
767
|
"RegisterPromptErrorResponse",
|
@@ -882,6 +885,7 @@ __all__ = [
|
|
882
885
|
"TestSuiteRunExecutionChatHistoryOutput",
|
883
886
|
"TestSuiteRunExecutionErrorOutput",
|
884
887
|
"TestSuiteRunExecutionJsonOutput",
|
888
|
+
"TestSuiteRunExecutionMetricDefinition",
|
885
889
|
"TestSuiteRunExecutionMetricResult",
|
886
890
|
"TestSuiteRunExecutionNumberOutput",
|
887
891
|
"TestSuiteRunExecutionOutput",
|
@@ -24,7 +24,7 @@ class FulfilledWorkflowNodeResultEvent(pydantic.BaseModel):
|
|
24
24
|
ts: typing.Optional[dt.datetime] = None
|
25
25
|
data: typing.Optional[WorkflowNodeResultData] = None
|
26
26
|
source_execution_id: typing.Optional[str] = None
|
27
|
-
output_values: typing.
|
27
|
+
output_values: typing.List[NodeOutputCompiledValue]
|
28
28
|
mocked: typing.Optional[bool] = None
|
29
29
|
|
30
30
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -13,8 +13,12 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class NamedTestCaseChatHistoryVariableValueRequest(pydantic.BaseModel):
|
16
|
-
|
16
|
+
"""
|
17
|
+
Named Test Case value that is of type CHAT_HISTORY
|
18
|
+
"""
|
19
|
+
|
17
20
|
value: typing.Optional[typing.List[ChatMessageRequest]] = None
|
21
|
+
name: str
|
18
22
|
|
19
23
|
def json(self, **kwargs: typing.Any) -> str:
|
20
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -13,8 +13,12 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class NamedTestCaseErrorVariableValueRequest(pydantic.BaseModel):
|
16
|
-
|
16
|
+
"""
|
17
|
+
Named Test Case value that is of type ERROR
|
18
|
+
"""
|
19
|
+
|
17
20
|
value: typing.Optional[VellumErrorRequest] = None
|
21
|
+
name: str
|
18
22
|
|
19
23
|
def json(self, **kwargs: typing.Any) -> str:
|
20
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -12,8 +12,12 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class NamedTestCaseJsonVariableValueRequest(pydantic.BaseModel):
|
15
|
-
|
15
|
+
"""
|
16
|
+
Named Test Case value that is of type JSON
|
17
|
+
"""
|
18
|
+
|
16
19
|
value: typing.Optional[typing.Dict[str, typing.Any]] = None
|
20
|
+
name: str
|
17
21
|
|
18
22
|
def json(self, **kwargs: typing.Any) -> str:
|
19
23
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -12,8 +12,12 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class NamedTestCaseNumberVariableValueRequest(pydantic.BaseModel):
|
15
|
-
|
15
|
+
"""
|
16
|
+
Named Test Case value that is of type NUMBER
|
17
|
+
"""
|
18
|
+
|
16
19
|
value: typing.Optional[float] = None
|
20
|
+
name: str
|
17
21
|
|
18
22
|
def json(self, **kwargs: typing.Any) -> str:
|
19
23
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -13,8 +13,12 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class NamedTestCaseSearchResultsVariableValueRequest(pydantic.BaseModel):
|
16
|
-
|
16
|
+
"""
|
17
|
+
Named Test Case value that is of type SEARCH_RESULTS
|
18
|
+
"""
|
19
|
+
|
17
20
|
value: typing.Optional[typing.List[SearchResultRequest]] = None
|
21
|
+
name: str
|
18
22
|
|
19
23
|
def json(self, **kwargs: typing.Any) -> str:
|
20
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -12,8 +12,12 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class NamedTestCaseStringVariableValueRequest(pydantic.BaseModel):
|
15
|
-
|
15
|
+
"""
|
16
|
+
Named Test Case value that is of type STRING
|
17
|
+
"""
|
18
|
+
|
16
19
|
value: typing.Optional[str] = None
|
20
|
+
name: str
|
17
21
|
|
18
22
|
def json(self, **kwargs: typing.Any) -> str:
|
19
23
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -7,6 +7,7 @@ import typing
|
|
7
7
|
|
8
8
|
from ..core.datetime_utils import serialize_datetime
|
9
9
|
from .block_type_enum import BlockTypeEnum
|
10
|
+
from .prompt_template_block_state import PromptTemplateBlockState
|
10
11
|
|
11
12
|
try:
|
12
13
|
import pydantic.v1 as pydantic # type: ignore
|
@@ -18,6 +19,7 @@ class PromptTemplateBlock(pydantic.BaseModel):
|
|
18
19
|
id: str
|
19
20
|
block_type: BlockTypeEnum
|
20
21
|
properties: PromptTemplateBlockProperties
|
22
|
+
state: typing.Optional[PromptTemplateBlockState] = None
|
21
23
|
|
22
24
|
def json(self, **kwargs: typing.Any) -> str:
|
23
25
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -7,6 +7,7 @@ import typing
|
|
7
7
|
|
8
8
|
from ..core.datetime_utils import serialize_datetime
|
9
9
|
from .block_type_enum import BlockTypeEnum
|
10
|
+
from .prompt_template_block_state import PromptTemplateBlockState
|
10
11
|
|
11
12
|
try:
|
12
13
|
import pydantic.v1 as pydantic # type: ignore
|
@@ -18,6 +19,7 @@ class PromptTemplateBlockRequest(pydantic.BaseModel):
|
|
18
19
|
id: str
|
19
20
|
block_type: BlockTypeEnum
|
20
21
|
properties: PromptTemplateBlockPropertiesRequest
|
22
|
+
state: typing.Optional[PromptTemplateBlockState] = None
|
21
23
|
|
22
24
|
def json(self, **kwargs: typing.Any) -> str:
|
23
25
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import enum
|
4
|
+
import typing
|
5
|
+
|
6
|
+
T_Result = typing.TypeVar("T_Result")
|
7
|
+
|
8
|
+
|
9
|
+
class PromptTemplateBlockState(str, enum.Enum):
|
10
|
+
"""
|
11
|
+
- `ENABLED` - ENABLED
|
12
|
+
- `DISABLED` - DISABLED
|
13
|
+
"""
|
14
|
+
|
15
|
+
ENABLED = "ENABLED"
|
16
|
+
DISABLED = "DISABLED"
|
17
|
+
|
18
|
+
def visit(self, enabled: typing.Callable[[], T_Result], disabled: typing.Callable[[], T_Result]) -> T_Result:
|
19
|
+
if self is PromptTemplateBlockState.ENABLED:
|
20
|
+
return enabled()
|
21
|
+
if self is PromptTemplateBlockState.DISABLED:
|
22
|
+
return disabled()
|
@@ -13,8 +13,13 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class TestSuiteRunExecutionChatHistoryOutput(pydantic.BaseModel):
|
16
|
-
|
16
|
+
"""
|
17
|
+
Execution output of an entity evaluated during a Test Suite Run that is of type CHAT_HISTORY
|
18
|
+
"""
|
19
|
+
|
20
|
+
name: str
|
17
21
|
value: typing.Optional[typing.List[ChatMessage]] = None
|
22
|
+
output_variable_id: str
|
18
23
|
|
19
24
|
def json(self, **kwargs: typing.Any) -> str:
|
20
25
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -13,8 +13,13 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class TestSuiteRunExecutionErrorOutput(pydantic.BaseModel):
|
16
|
-
|
16
|
+
"""
|
17
|
+
Execution output of an entity evaluated during a Test Suite Run that is of type ERROR
|
18
|
+
"""
|
19
|
+
|
20
|
+
name: str
|
17
21
|
value: typing.Optional[VellumError] = None
|
22
|
+
output_variable_id: str
|
18
23
|
|
19
24
|
def json(self, **kwargs: typing.Any) -> str:
|
20
25
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -12,8 +12,13 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class TestSuiteRunExecutionJsonOutput(pydantic.BaseModel):
|
15
|
-
|
15
|
+
"""
|
16
|
+
Execution output of an entity evaluated during a Test Suite Run that is of type JSON
|
17
|
+
"""
|
18
|
+
|
19
|
+
name: str
|
16
20
|
value: typing.Optional[typing.Dict[str, typing.Any]] = None
|
21
|
+
output_variable_id: str
|
17
22
|
|
18
23
|
def json(self, **kwargs: typing.Any) -> str:
|
19
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -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
|
+
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
13
|
+
|
14
|
+
class TestSuiteRunExecutionMetricDefinition(pydantic.BaseModel):
|
15
|
+
id: typing.Optional[str] = None
|
16
|
+
label: typing.Optional[str] = None
|
17
|
+
name: typing.Optional[str] = None
|
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.Extra.allow
|
31
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -4,6 +4,7 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from .test_suite_run_execution_metric_definition import TestSuiteRunExecutionMetricDefinition
|
7
8
|
from .test_suite_run_metric_output import TestSuiteRunMetricOutput
|
8
9
|
|
9
10
|
try:
|
@@ -15,6 +16,8 @@ except ImportError:
|
|
15
16
|
class TestSuiteRunExecutionMetricResult(pydantic.BaseModel):
|
16
17
|
metric_id: str
|
17
18
|
outputs: typing.List[TestSuiteRunMetricOutput]
|
19
|
+
metric_label: typing.Optional[str] = None
|
20
|
+
metric_definition: typing.Optional[TestSuiteRunExecutionMetricDefinition] = None
|
18
21
|
|
19
22
|
def json(self, **kwargs: typing.Any) -> str:
|
20
23
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -12,8 +12,13 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class TestSuiteRunExecutionNumberOutput(pydantic.BaseModel):
|
15
|
-
|
15
|
+
"""
|
16
|
+
Execution output of an entity evaluated during a Test Suite Run that is of type NUMBER
|
17
|
+
"""
|
18
|
+
|
19
|
+
name: str
|
16
20
|
value: typing.Optional[float] = None
|
21
|
+
output_variable_id: str
|
17
22
|
|
18
23
|
def json(self, **kwargs: typing.Any) -> str:
|
19
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -13,8 +13,13 @@ except ImportError:
|
|
13
13
|
|
14
14
|
|
15
15
|
class TestSuiteRunExecutionSearchResultsOutput(pydantic.BaseModel):
|
16
|
-
|
16
|
+
"""
|
17
|
+
Execution output of an entity evaluated during a Test Suite Run that is of type SEARCH_RESULTS
|
18
|
+
"""
|
19
|
+
|
20
|
+
name: str
|
17
21
|
value: typing.Optional[typing.List[SearchResult]] = None
|
22
|
+
output_variable_id: str
|
18
23
|
|
19
24
|
def json(self, **kwargs: typing.Any) -> str:
|
20
25
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -12,8 +12,13 @@ except ImportError:
|
|
12
12
|
|
13
13
|
|
14
14
|
class TestSuiteRunExecutionStringOutput(pydantic.BaseModel):
|
15
|
-
|
15
|
+
"""
|
16
|
+
Execution output of an entity evaluated during a Test Suite Run that is of type STRING
|
17
|
+
"""
|
18
|
+
|
19
|
+
name: str
|
16
20
|
value: typing.Optional[str] = None
|
21
|
+
output_variable_id: str
|
17
22
|
|
18
23
|
def json(self, **kwargs: typing.Any) -> str:
|
19
24
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|