vellum-ai 0.7.1__py3-none-any.whl → 0.7.2__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 +42 -0
- vellum/client.py +45 -12
- vellum/core/client_wrapper.py +1 -1
- vellum/types/__init__.py +44 -0
- vellum/types/array_vellum_value_item_request.py +82 -0
- vellum/types/error_vellum_value_request.py +30 -0
- vellum/types/function_call_vellum_value_request.py +30 -0
- vellum/types/image_vellum_value_request.py +30 -0
- vellum/types/json_vellum_value_request.py +29 -0
- vellum/types/named_test_case_array_variable_value.py +31 -0
- vellum/types/named_test_case_array_variable_value_request.py +31 -0
- vellum/types/named_test_case_variable_value.py +12 -0
- vellum/types/named_test_case_variable_value_request.py +12 -0
- vellum/types/number_vellum_value_request.py +29 -0
- vellum/types/prompt_deployment_expand_meta_request_request.py +11 -11
- vellum/types/prompt_execution_meta.py +1 -1
- vellum/types/prompt_node_execution_meta.py +30 -0
- vellum/types/prompt_node_result_data.py +2 -0
- vellum/types/string_vellum_value_request.py +29 -0
- vellum/types/test_case_array_variable_value.py +32 -0
- vellum/types/test_case_variable_value.py +12 -0
- vellum/types/workflow_expand_meta_request.py +28 -0
- {vellum_ai-0.7.1.dist-info → vellum_ai-0.7.2.dist-info}/METADATA +1 -1
- {vellum_ai-0.7.1.dist-info → vellum_ai-0.7.2.dist-info}/RECORD +26 -14
- {vellum_ai-0.7.1.dist-info → vellum_ai-0.7.2.dist-info}/LICENSE +0 -0
- {vellum_ai-0.7.1.dist-info → vellum_ai-0.7.2.dist-info}/WHEEL +0 -0
vellum/types/__init__.py
CHANGED
@@ -36,6 +36,15 @@ from .array_vellum_value_item import (
|
|
36
36
|
ArrayVellumValueItem_Number,
|
37
37
|
ArrayVellumValueItem_String,
|
38
38
|
)
|
39
|
+
from .array_vellum_value_item_request import (
|
40
|
+
ArrayVellumValueItemRequest,
|
41
|
+
ArrayVellumValueItemRequest_Error,
|
42
|
+
ArrayVellumValueItemRequest_FunctionCall,
|
43
|
+
ArrayVellumValueItemRequest_Image,
|
44
|
+
ArrayVellumValueItemRequest_Json,
|
45
|
+
ArrayVellumValueItemRequest_Number,
|
46
|
+
ArrayVellumValueItemRequest_String,
|
47
|
+
)
|
39
48
|
from .basic_vectorizer_intfloat_multilingual_e_5_large import BasicVectorizerIntfloatMultilingualE5Large
|
40
49
|
from .basic_vectorizer_intfloat_multilingual_e_5_large_request import BasicVectorizerIntfloatMultilingualE5LargeRequest
|
41
50
|
from .basic_vectorizer_sentence_transformers_multi_qa_mpnet_base_cos_v_1 import (
|
@@ -126,6 +135,7 @@ from .environment_enum import EnvironmentEnum
|
|
126
135
|
from .error_enum import ErrorEnum
|
127
136
|
from .error_variable_value import ErrorVariableValue
|
128
137
|
from .error_vellum_value import ErrorVellumValue
|
138
|
+
from .error_vellum_value_request import ErrorVellumValueRequest
|
129
139
|
from .execute_prompt_api_error_response import ExecutePromptApiErrorResponse
|
130
140
|
from .execute_prompt_event import (
|
131
141
|
ExecutePromptEvent,
|
@@ -184,6 +194,7 @@ from .function_call_enum import FunctionCallEnum
|
|
184
194
|
from .function_call_request import FunctionCallRequest
|
185
195
|
from .function_call_variable_value import FunctionCallVariableValue
|
186
196
|
from .function_call_vellum_value import FunctionCallVellumValue
|
197
|
+
from .function_call_vellum_value_request import FunctionCallVellumValueRequest
|
187
198
|
from .generate_error_response import GenerateErrorResponse
|
188
199
|
from .generate_options_request import GenerateOptionsRequest
|
189
200
|
from .generate_request import GenerateRequest
|
@@ -202,6 +213,7 @@ from .image_chat_message_content_request import ImageChatMessageContentRequest
|
|
202
213
|
from .image_enum import ImageEnum
|
203
214
|
from .image_variable_value import ImageVariableValue
|
204
215
|
from .image_vellum_value import ImageVellumValue
|
216
|
+
from .image_vellum_value_request import ImageVellumValueRequest
|
205
217
|
from .indexing_config_vectorizer import (
|
206
218
|
IndexingConfigVectorizer,
|
207
219
|
IndexingConfigVectorizer_HkunlpInstructorXl,
|
@@ -235,6 +247,7 @@ from .json_enum import JsonEnum
|
|
235
247
|
from .json_input_request import JsonInputRequest
|
236
248
|
from .json_variable_value import JsonVariableValue
|
237
249
|
from .json_vellum_value import JsonVellumValue
|
250
|
+
from .json_vellum_value_request import JsonVellumValueRequest
|
238
251
|
from .logical_operator import LogicalOperator
|
239
252
|
from .logprobs_enum import LogprobsEnum
|
240
253
|
from .map_enum import MapEnum
|
@@ -256,6 +269,8 @@ from .named_scenario_input_request import (
|
|
256
269
|
NamedScenarioInputRequest_String,
|
257
270
|
)
|
258
271
|
from .named_scenario_input_string_variable_value_request import NamedScenarioInputStringVariableValueRequest
|
272
|
+
from .named_test_case_array_variable_value import NamedTestCaseArrayVariableValue
|
273
|
+
from .named_test_case_array_variable_value_request import NamedTestCaseArrayVariableValueRequest
|
259
274
|
from .named_test_case_chat_history_variable_value import NamedTestCaseChatHistoryVariableValue
|
260
275
|
from .named_test_case_chat_history_variable_value_request import NamedTestCaseChatHistoryVariableValueRequest
|
261
276
|
from .named_test_case_error_variable_value import NamedTestCaseErrorVariableValue
|
@@ -272,6 +287,7 @@ from .named_test_case_string_variable_value import NamedTestCaseStringVariableVa
|
|
272
287
|
from .named_test_case_string_variable_value_request import NamedTestCaseStringVariableValueRequest
|
273
288
|
from .named_test_case_variable_value import (
|
274
289
|
NamedTestCaseVariableValue,
|
290
|
+
NamedTestCaseVariableValue_Array,
|
275
291
|
NamedTestCaseVariableValue_ChatHistory,
|
276
292
|
NamedTestCaseVariableValue_Error,
|
277
293
|
NamedTestCaseVariableValue_FunctionCall,
|
@@ -282,6 +298,7 @@ from .named_test_case_variable_value import (
|
|
282
298
|
)
|
283
299
|
from .named_test_case_variable_value_request import (
|
284
300
|
NamedTestCaseVariableValueRequest,
|
301
|
+
NamedTestCaseVariableValueRequest_Array,
|
285
302
|
NamedTestCaseVariableValueRequest_ChatHistory,
|
286
303
|
NamedTestCaseVariableValueRequest_Error,
|
287
304
|
NamedTestCaseVariableValueRequest_FunctionCall,
|
@@ -333,6 +350,7 @@ from .normalized_token_log_probs import NormalizedTokenLogProbs
|
|
333
350
|
from .number_enum import NumberEnum
|
334
351
|
from .number_variable_value import NumberVariableValue
|
335
352
|
from .number_vellum_value import NumberVellumValue
|
353
|
+
from .number_vellum_value_request import NumberVellumValueRequest
|
336
354
|
from .open_ai_vectorizer_config import OpenAiVectorizerConfig
|
337
355
|
from .open_ai_vectorizer_config_request import OpenAiVectorizerConfigRequest
|
338
356
|
from .open_ai_vectorizer_text_embedding_3_large import OpenAiVectorizerTextEmbedding3Large
|
@@ -360,6 +378,7 @@ from .prompt_deployment_input_request import (
|
|
360
378
|
PromptDeploymentInputRequest_String,
|
361
379
|
)
|
362
380
|
from .prompt_execution_meta import PromptExecutionMeta
|
381
|
+
from .prompt_node_execution_meta import PromptNodeExecutionMeta
|
363
382
|
from .prompt_node_result import PromptNodeResult
|
364
383
|
from .prompt_node_result_data import PromptNodeResultData
|
365
384
|
from .prompt_output import (
|
@@ -426,6 +445,7 @@ from .string_enum import StringEnum
|
|
426
445
|
from .string_input_request import StringInputRequest
|
427
446
|
from .string_variable_value import StringVariableValue
|
428
447
|
from .string_vellum_value import StringVellumValue
|
448
|
+
from .string_vellum_value_request import StringVellumValueRequest
|
429
449
|
from .submit_completion_actual_request import SubmitCompletionActualRequest
|
430
450
|
from .submit_completion_actuals_error_response import SubmitCompletionActualsErrorResponse
|
431
451
|
from .submit_workflow_execution_actual_request import (
|
@@ -479,6 +499,7 @@ from .terminal_node_result_output import (
|
|
479
499
|
)
|
480
500
|
from .terminal_node_search_results_result import TerminalNodeSearchResultsResult
|
481
501
|
from .terminal_node_string_result import TerminalNodeStringResult
|
502
|
+
from .test_case_array_variable_value import TestCaseArrayVariableValue
|
482
503
|
from .test_case_chat_history_variable_value import TestCaseChatHistoryVariableValue
|
483
504
|
from .test_case_error_variable_value import TestCaseErrorVariableValue
|
484
505
|
from .test_case_function_call_variable_value import TestCaseFunctionCallVariableValue
|
@@ -488,6 +509,7 @@ from .test_case_search_results_variable_value import TestCaseSearchResultsVariab
|
|
488
509
|
from .test_case_string_variable_value import TestCaseStringVariableValue
|
489
510
|
from .test_case_variable_value import (
|
490
511
|
TestCaseVariableValue,
|
512
|
+
TestCaseVariableValue_Array,
|
491
513
|
TestCaseVariableValue_ChatHistory,
|
492
514
|
TestCaseVariableValue_Error,
|
493
515
|
TestCaseVariableValue_FunctionCall,
|
@@ -621,6 +643,7 @@ from .workflow_execution_event_error_code import WorkflowExecutionEventErrorCode
|
|
621
643
|
from .workflow_execution_event_type import WorkflowExecutionEventType
|
622
644
|
from .workflow_execution_node_result_event import WorkflowExecutionNodeResultEvent
|
623
645
|
from .workflow_execution_workflow_result_event import WorkflowExecutionWorkflowResultEvent
|
646
|
+
from .workflow_expand_meta_request import WorkflowExpandMetaRequest
|
624
647
|
from .workflow_node_result_data import (
|
625
648
|
WorkflowNodeResultData,
|
626
649
|
WorkflowNodeResultData_Api,
|
@@ -722,6 +745,13 @@ __all__ = [
|
|
722
745
|
"ArrayVariableValueItem_Number",
|
723
746
|
"ArrayVariableValueItem_String",
|
724
747
|
"ArrayVellumValueItem",
|
748
|
+
"ArrayVellumValueItemRequest",
|
749
|
+
"ArrayVellumValueItemRequest_Error",
|
750
|
+
"ArrayVellumValueItemRequest_FunctionCall",
|
751
|
+
"ArrayVellumValueItemRequest_Image",
|
752
|
+
"ArrayVellumValueItemRequest_Json",
|
753
|
+
"ArrayVellumValueItemRequest_Number",
|
754
|
+
"ArrayVellumValueItemRequest_String",
|
725
755
|
"ArrayVellumValueItem_Error",
|
726
756
|
"ArrayVellumValueItem_FunctionCall",
|
727
757
|
"ArrayVellumValueItem_Image",
|
@@ -800,6 +830,7 @@ __all__ = [
|
|
800
830
|
"ErrorEnum",
|
801
831
|
"ErrorVariableValue",
|
802
832
|
"ErrorVellumValue",
|
833
|
+
"ErrorVellumValueRequest",
|
803
834
|
"ExecutePromptApiErrorResponse",
|
804
835
|
"ExecutePromptEvent",
|
805
836
|
"ExecutePromptEvent_Fulfilled",
|
@@ -850,6 +881,7 @@ __all__ = [
|
|
850
881
|
"FunctionCallRequest",
|
851
882
|
"FunctionCallVariableValue",
|
852
883
|
"FunctionCallVellumValue",
|
884
|
+
"FunctionCallVellumValueRequest",
|
853
885
|
"GenerateErrorResponse",
|
854
886
|
"GenerateOptionsRequest",
|
855
887
|
"GenerateRequest",
|
@@ -868,6 +900,7 @@ __all__ = [
|
|
868
900
|
"ImageEnum",
|
869
901
|
"ImageVariableValue",
|
870
902
|
"ImageVellumValue",
|
903
|
+
"ImageVellumValueRequest",
|
871
904
|
"IndexingConfigVectorizer",
|
872
905
|
"IndexingConfigVectorizerRequest",
|
873
906
|
"IndexingConfigVectorizerRequest_HkunlpInstructorXl",
|
@@ -897,6 +930,7 @@ __all__ = [
|
|
897
930
|
"JsonInputRequest",
|
898
931
|
"JsonVariableValue",
|
899
932
|
"JsonVellumValue",
|
933
|
+
"JsonVellumValueRequest",
|
900
934
|
"LogicalOperator",
|
901
935
|
"LogprobsEnum",
|
902
936
|
"MapEnum",
|
@@ -916,6 +950,8 @@ __all__ = [
|
|
916
950
|
"NamedScenarioInputRequest_ChatHistory",
|
917
951
|
"NamedScenarioInputRequest_String",
|
918
952
|
"NamedScenarioInputStringVariableValueRequest",
|
953
|
+
"NamedTestCaseArrayVariableValue",
|
954
|
+
"NamedTestCaseArrayVariableValueRequest",
|
919
955
|
"NamedTestCaseChatHistoryVariableValue",
|
920
956
|
"NamedTestCaseChatHistoryVariableValueRequest",
|
921
957
|
"NamedTestCaseErrorVariableValue",
|
@@ -932,6 +968,7 @@ __all__ = [
|
|
932
968
|
"NamedTestCaseStringVariableValueRequest",
|
933
969
|
"NamedTestCaseVariableValue",
|
934
970
|
"NamedTestCaseVariableValueRequest",
|
971
|
+
"NamedTestCaseVariableValueRequest_Array",
|
935
972
|
"NamedTestCaseVariableValueRequest_ChatHistory",
|
936
973
|
"NamedTestCaseVariableValueRequest_Error",
|
937
974
|
"NamedTestCaseVariableValueRequest_FunctionCall",
|
@@ -939,6 +976,7 @@ __all__ = [
|
|
939
976
|
"NamedTestCaseVariableValueRequest_Number",
|
940
977
|
"NamedTestCaseVariableValueRequest_SearchResults",
|
941
978
|
"NamedTestCaseVariableValueRequest_String",
|
979
|
+
"NamedTestCaseVariableValue_Array",
|
942
980
|
"NamedTestCaseVariableValue_ChatHistory",
|
943
981
|
"NamedTestCaseVariableValue_Error",
|
944
982
|
"NamedTestCaseVariableValue_FunctionCall",
|
@@ -985,6 +1023,7 @@ __all__ = [
|
|
985
1023
|
"NumberEnum",
|
986
1024
|
"NumberVariableValue",
|
987
1025
|
"NumberVellumValue",
|
1026
|
+
"NumberVellumValueRequest",
|
988
1027
|
"OpenAiVectorizerConfig",
|
989
1028
|
"OpenAiVectorizerConfigRequest",
|
990
1029
|
"OpenAiVectorizerTextEmbedding3Large",
|
@@ -1010,6 +1049,7 @@ __all__ = [
|
|
1010
1049
|
"PromptDeploymentInputRequest_Json",
|
1011
1050
|
"PromptDeploymentInputRequest_String",
|
1012
1051
|
"PromptExecutionMeta",
|
1052
|
+
"PromptNodeExecutionMeta",
|
1013
1053
|
"PromptNodeResult",
|
1014
1054
|
"PromptNodeResultData",
|
1015
1055
|
"PromptOutput",
|
@@ -1078,6 +1118,7 @@ __all__ = [
|
|
1078
1118
|
"StringInputRequest",
|
1079
1119
|
"StringVariableValue",
|
1080
1120
|
"StringVellumValue",
|
1121
|
+
"StringVellumValueRequest",
|
1081
1122
|
"SubmitCompletionActualRequest",
|
1082
1123
|
"SubmitCompletionActualsErrorResponse",
|
1083
1124
|
"SubmitWorkflowExecutionActualRequest",
|
@@ -1125,6 +1166,7 @@ __all__ = [
|
|
1125
1166
|
"TerminalNodeResultOutput_String",
|
1126
1167
|
"TerminalNodeSearchResultsResult",
|
1127
1168
|
"TerminalNodeStringResult",
|
1169
|
+
"TestCaseArrayVariableValue",
|
1128
1170
|
"TestCaseChatHistoryVariableValue",
|
1129
1171
|
"TestCaseErrorVariableValue",
|
1130
1172
|
"TestCaseFunctionCallVariableValue",
|
@@ -1133,6 +1175,7 @@ __all__ = [
|
|
1133
1175
|
"TestCaseSearchResultsVariableValue",
|
1134
1176
|
"TestCaseStringVariableValue",
|
1135
1177
|
"TestCaseVariableValue",
|
1178
|
+
"TestCaseVariableValue_Array",
|
1136
1179
|
"TestCaseVariableValue_ChatHistory",
|
1137
1180
|
"TestCaseVariableValue_Error",
|
1138
1181
|
"TestCaseVariableValue_FunctionCall",
|
@@ -1247,6 +1290,7 @@ __all__ = [
|
|
1247
1290
|
"WorkflowExecutionEventType",
|
1248
1291
|
"WorkflowExecutionNodeResultEvent",
|
1249
1292
|
"WorkflowExecutionWorkflowResultEvent",
|
1293
|
+
"WorkflowExpandMetaRequest",
|
1250
1294
|
"WorkflowNodeResultData",
|
1251
1295
|
"WorkflowNodeResultData_Api",
|
1252
1296
|
"WorkflowNodeResultData_CodeExecution",
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import typing
|
6
|
+
|
7
|
+
from .error_vellum_value_request import ErrorVellumValueRequest
|
8
|
+
from .function_call_vellum_value_request import FunctionCallVellumValueRequest
|
9
|
+
from .image_vellum_value_request import ImageVellumValueRequest
|
10
|
+
from .json_vellum_value_request import JsonVellumValueRequest
|
11
|
+
from .number_vellum_value_request import NumberVellumValueRequest
|
12
|
+
from .string_vellum_value_request import StringVellumValueRequest
|
13
|
+
|
14
|
+
|
15
|
+
class ArrayVellumValueItemRequest_String(StringVellumValueRequest):
|
16
|
+
type: typing.Literal["STRING"] = "STRING"
|
17
|
+
|
18
|
+
class Config:
|
19
|
+
frozen = True
|
20
|
+
smart_union = True
|
21
|
+
allow_population_by_field_name = True
|
22
|
+
populate_by_name = True
|
23
|
+
|
24
|
+
|
25
|
+
class ArrayVellumValueItemRequest_Number(NumberVellumValueRequest):
|
26
|
+
type: typing.Literal["NUMBER"] = "NUMBER"
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
allow_population_by_field_name = True
|
32
|
+
populate_by_name = True
|
33
|
+
|
34
|
+
|
35
|
+
class ArrayVellumValueItemRequest_Json(JsonVellumValueRequest):
|
36
|
+
type: typing.Literal["JSON"] = "JSON"
|
37
|
+
|
38
|
+
class Config:
|
39
|
+
frozen = True
|
40
|
+
smart_union = True
|
41
|
+
allow_population_by_field_name = True
|
42
|
+
populate_by_name = True
|
43
|
+
|
44
|
+
|
45
|
+
class ArrayVellumValueItemRequest_Image(ImageVellumValueRequest):
|
46
|
+
type: typing.Literal["IMAGE"] = "IMAGE"
|
47
|
+
|
48
|
+
class Config:
|
49
|
+
frozen = True
|
50
|
+
smart_union = True
|
51
|
+
allow_population_by_field_name = True
|
52
|
+
populate_by_name = True
|
53
|
+
|
54
|
+
|
55
|
+
class ArrayVellumValueItemRequest_FunctionCall(FunctionCallVellumValueRequest):
|
56
|
+
type: typing.Literal["FUNCTION_CALL"] = "FUNCTION_CALL"
|
57
|
+
|
58
|
+
class Config:
|
59
|
+
frozen = True
|
60
|
+
smart_union = True
|
61
|
+
allow_population_by_field_name = True
|
62
|
+
populate_by_name = True
|
63
|
+
|
64
|
+
|
65
|
+
class ArrayVellumValueItemRequest_Error(ErrorVellumValueRequest):
|
66
|
+
type: typing.Literal["ERROR"] = "ERROR"
|
67
|
+
|
68
|
+
class Config:
|
69
|
+
frozen = True
|
70
|
+
smart_union = True
|
71
|
+
allow_population_by_field_name = True
|
72
|
+
populate_by_name = True
|
73
|
+
|
74
|
+
|
75
|
+
ArrayVellumValueItemRequest = typing.Union[
|
76
|
+
ArrayVellumValueItemRequest_String,
|
77
|
+
ArrayVellumValueItemRequest_Number,
|
78
|
+
ArrayVellumValueItemRequest_Json,
|
79
|
+
ArrayVellumValueItemRequest_Image,
|
80
|
+
ArrayVellumValueItemRequest_FunctionCall,
|
81
|
+
ArrayVellumValueItemRequest_Error,
|
82
|
+
]
|
@@ -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 .vellum_error_request import VellumErrorRequest
|
9
|
+
|
10
|
+
|
11
|
+
class ErrorVellumValueRequest(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
A value representing an Error.
|
14
|
+
"""
|
15
|
+
|
16
|
+
value: typing.Optional[VellumErrorRequest] = 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}
|
@@ -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 .function_call_request import FunctionCallRequest
|
9
|
+
|
10
|
+
|
11
|
+
class FunctionCallVellumValueRequest(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
A value representing a Function Call.
|
14
|
+
"""
|
15
|
+
|
16
|
+
value: typing.Optional[FunctionCallRequest] = 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}
|
@@ -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 .vellum_image_request import VellumImageRequest
|
9
|
+
|
10
|
+
|
11
|
+
class ImageVellumValueRequest(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
A base Vellum primitive value representing an image.
|
14
|
+
"""
|
15
|
+
|
16
|
+
value: typing.Optional[VellumImageRequest] = 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}
|
@@ -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}
|
@@ -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}
|
@@ -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
|
]
|
@@ -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
|
13
|
+
If enabled, the response will include the model identifier representing the ML Model invoked by the Prompt.
|
14
14
|
"""
|
15
15
|
|
16
|
-
|
16
|
+
usage: typing.Optional[bool] = pydantic_v1.Field(default=None)
|
17
17
|
"""
|
18
|
-
If enabled, the response will include
|
18
|
+
If enabled, the response will include model host usage tracking. This may increase latency for some model hosts.
|
19
19
|
"""
|
20
20
|
|
21
|
-
|
21
|
+
finish_reason: typing.Optional[bool] = pydantic_v1.Field(default=None)
|
22
22
|
"""
|
23
|
-
If enabled, the response will include the
|
23
|
+
If enabled, the response will include the reason provided by the model for why the execution finished.
|
24
24
|
"""
|
25
25
|
|
26
|
-
|
26
|
+
latency: typing.Optional[bool] = pydantic_v1.Field(default=None)
|
27
27
|
"""
|
28
|
-
If enabled, the response will include the
|
28
|
+
If enabled, the response will include the time in nanoseconds it took to execute the Prompt Deployment.
|
29
29
|
"""
|
30
30
|
|
31
|
-
|
31
|
+
deployment_release_tag: typing.Optional[bool] = pydantic_v1.Field(default=None)
|
32
32
|
"""
|
33
|
-
If enabled, the response will include the
|
33
|
+
If enabled, the response will include the release tag of the Prompt Deployment.
|
34
34
|
"""
|
35
35
|
|
36
|
-
|
36
|
+
prompt_version_id: typing.Optional[bool] = pydantic_v1.Field(default=None)
|
37
37
|
"""
|
38
|
-
If enabled, the response will include
|
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}
|