vellum-ai 0.0.43__py3-none-any.whl → 0.0.44__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +20 -2
- vellum/core/client_wrapper.py +1 -1
- vellum/resources/registered_prompts/client.py +14 -2
- vellum/types/__init__.py +20 -2
- vellum/types/deployment_read.py +0 -2
- vellum/types/enriched_normalized_completion.py +1 -0
- vellum/types/model_version_build_config.py +1 -0
- vellum/types/model_version_read.py +2 -3
- vellum/types/node_input_compiled_error_value.py +31 -0
- vellum/types/node_input_variable_compiled_value.py +11 -0
- vellum/types/provider_enum.py +10 -5
- vellum/types/templating_node_error_result.py +30 -0
- vellum/types/templating_node_result_output.py +11 -0
- vellum/types/terminal_node_error_result.py +31 -0
- vellum/types/terminal_node_result_output.py +11 -0
- vellum/types/vellum_error.py +30 -0
- vellum/types/vellum_error_code_enum.py +31 -0
- vellum/types/vellum_variable_type.py +5 -0
- vellum/types/workflow_result_event_output_data.py +11 -0
- vellum/types/workflow_result_event_output_data_error.py +37 -0
- {vellum_ai-0.0.43.dist-info → vellum_ai-0.0.44.dist-info}/METADATA +1 -1
- {vellum_ai-0.0.43.dist-info → vellum_ai-0.0.44.dist-info}/RECORD +23 -18
- vellum/types/model_type_deprecated.py +0 -22
- {vellum_ai-0.0.43.dist-info → vellum_ai-0.0.44.dist-info}/WHEEL +0 -0
vellum/__init__.py
CHANGED
@@ -38,7 +38,6 @@ from .types import (
|
|
38
38
|
MetadataFilterConfigRequest,
|
39
39
|
MetadataFilterRuleCombinator,
|
40
40
|
MetadataFilterRuleRequest,
|
41
|
-
ModelTypeDeprecated,
|
42
41
|
ModelVersionBuildConfig,
|
43
42
|
ModelVersionCompilePromptResponse,
|
44
43
|
ModelVersionCompiledPrompt,
|
@@ -48,12 +47,14 @@ from .types import (
|
|
48
47
|
ModelVersionReadStatusEnum,
|
49
48
|
ModelVersionSandboxSnapshot,
|
50
49
|
NodeInputCompiledChatHistoryValue,
|
50
|
+
NodeInputCompiledErrorValue,
|
51
51
|
NodeInputCompiledJsonValue,
|
52
52
|
NodeInputCompiledNumberValue,
|
53
53
|
NodeInputCompiledSearchResultsValue,
|
54
54
|
NodeInputCompiledStringValue,
|
55
55
|
NodeInputVariableCompiledValue,
|
56
56
|
NodeInputVariableCompiledValue_ChatHistory,
|
57
|
+
NodeInputVariableCompiledValue_Error,
|
57
58
|
NodeInputVariableCompiledValue_Json,
|
58
59
|
NodeInputVariableCompiledValue_Number,
|
59
60
|
NodeInputVariableCompiledValue_SearchResults,
|
@@ -106,12 +107,14 @@ from .types import (
|
|
106
107
|
SubmitWorkflowExecutionActualRequest_Json,
|
107
108
|
SubmitWorkflowExecutionActualRequest_String,
|
108
109
|
TemplatingNodeChatHistoryResult,
|
110
|
+
TemplatingNodeErrorResult,
|
109
111
|
TemplatingNodeJsonResult,
|
110
112
|
TemplatingNodeNumberResult,
|
111
113
|
TemplatingNodeResult,
|
112
114
|
TemplatingNodeResultData,
|
113
115
|
TemplatingNodeResultOutput,
|
114
116
|
TemplatingNodeResultOutput_ChatHistory,
|
117
|
+
TemplatingNodeResultOutput_Error,
|
115
118
|
TemplatingNodeResultOutput_Json,
|
116
119
|
TemplatingNodeResultOutput_Number,
|
117
120
|
TemplatingNodeResultOutput_SearchResults,
|
@@ -119,12 +122,14 @@ from .types import (
|
|
119
122
|
TemplatingNodeSearchResultsResult,
|
120
123
|
TemplatingNodeStringResult,
|
121
124
|
TerminalNodeChatHistoryResult,
|
125
|
+
TerminalNodeErrorResult,
|
122
126
|
TerminalNodeJsonResult,
|
123
127
|
TerminalNodeNumberResult,
|
124
128
|
TerminalNodeResult,
|
125
129
|
TerminalNodeResultData,
|
126
130
|
TerminalNodeResultOutput,
|
127
131
|
TerminalNodeResultOutput_ChatHistory,
|
132
|
+
TerminalNodeResultOutput_Error,
|
128
133
|
TerminalNodeResultOutput_Json,
|
129
134
|
TerminalNodeResultOutput_Number,
|
130
135
|
TerminalNodeResultOutput_SearchResults,
|
@@ -134,6 +139,8 @@ from .types import (
|
|
134
139
|
TestSuiteTestCase,
|
135
140
|
UploadDocumentErrorResponse,
|
136
141
|
UploadDocumentResponse,
|
142
|
+
VellumError,
|
143
|
+
VellumErrorCodeEnum,
|
137
144
|
VellumVariable,
|
138
145
|
VellumVariableType,
|
139
146
|
WorkflowEventError,
|
@@ -163,11 +170,13 @@ from .types import (
|
|
163
170
|
WorkflowResultEvent,
|
164
171
|
WorkflowResultEventOutputData,
|
165
172
|
WorkflowResultEventOutputDataChatHistory,
|
173
|
+
WorkflowResultEventOutputDataError,
|
166
174
|
WorkflowResultEventOutputDataJson,
|
167
175
|
WorkflowResultEventOutputDataNumber,
|
168
176
|
WorkflowResultEventOutputDataSearchResults,
|
169
177
|
WorkflowResultEventOutputDataString,
|
170
178
|
WorkflowResultEventOutputData_ChatHistory,
|
179
|
+
WorkflowResultEventOutputData_Error,
|
171
180
|
WorkflowResultEventOutputData_Json,
|
172
181
|
WorkflowResultEventOutputData_Number,
|
173
182
|
WorkflowResultEventOutputData_SearchResults,
|
@@ -230,7 +239,6 @@ __all__ = [
|
|
230
239
|
"MetadataFilterConfigRequest",
|
231
240
|
"MetadataFilterRuleCombinator",
|
232
241
|
"MetadataFilterRuleRequest",
|
233
|
-
"ModelTypeDeprecated",
|
234
242
|
"ModelVersionBuildConfig",
|
235
243
|
"ModelVersionCompilePromptResponse",
|
236
244
|
"ModelVersionCompiledPrompt",
|
@@ -240,12 +248,14 @@ __all__ = [
|
|
240
248
|
"ModelVersionReadStatusEnum",
|
241
249
|
"ModelVersionSandboxSnapshot",
|
242
250
|
"NodeInputCompiledChatHistoryValue",
|
251
|
+
"NodeInputCompiledErrorValue",
|
243
252
|
"NodeInputCompiledJsonValue",
|
244
253
|
"NodeInputCompiledNumberValue",
|
245
254
|
"NodeInputCompiledSearchResultsValue",
|
246
255
|
"NodeInputCompiledStringValue",
|
247
256
|
"NodeInputVariableCompiledValue",
|
248
257
|
"NodeInputVariableCompiledValue_ChatHistory",
|
258
|
+
"NodeInputVariableCompiledValue_Error",
|
249
259
|
"NodeInputVariableCompiledValue_Json",
|
250
260
|
"NodeInputVariableCompiledValue_Number",
|
251
261
|
"NodeInputVariableCompiledValue_SearchResults",
|
@@ -299,12 +309,14 @@ __all__ = [
|
|
299
309
|
"SubmitWorkflowExecutionActualRequest_Json",
|
300
310
|
"SubmitWorkflowExecutionActualRequest_String",
|
301
311
|
"TemplatingNodeChatHistoryResult",
|
312
|
+
"TemplatingNodeErrorResult",
|
302
313
|
"TemplatingNodeJsonResult",
|
303
314
|
"TemplatingNodeNumberResult",
|
304
315
|
"TemplatingNodeResult",
|
305
316
|
"TemplatingNodeResultData",
|
306
317
|
"TemplatingNodeResultOutput",
|
307
318
|
"TemplatingNodeResultOutput_ChatHistory",
|
319
|
+
"TemplatingNodeResultOutput_Error",
|
308
320
|
"TemplatingNodeResultOutput_Json",
|
309
321
|
"TemplatingNodeResultOutput_Number",
|
310
322
|
"TemplatingNodeResultOutput_SearchResults",
|
@@ -312,12 +324,14 @@ __all__ = [
|
|
312
324
|
"TemplatingNodeSearchResultsResult",
|
313
325
|
"TemplatingNodeStringResult",
|
314
326
|
"TerminalNodeChatHistoryResult",
|
327
|
+
"TerminalNodeErrorResult",
|
315
328
|
"TerminalNodeJsonResult",
|
316
329
|
"TerminalNodeNumberResult",
|
317
330
|
"TerminalNodeResult",
|
318
331
|
"TerminalNodeResultData",
|
319
332
|
"TerminalNodeResultOutput",
|
320
333
|
"TerminalNodeResultOutput_ChatHistory",
|
334
|
+
"TerminalNodeResultOutput_Error",
|
321
335
|
"TerminalNodeResultOutput_Json",
|
322
336
|
"TerminalNodeResultOutput_Number",
|
323
337
|
"TerminalNodeResultOutput_SearchResults",
|
@@ -328,6 +342,8 @@ __all__ = [
|
|
328
342
|
"UploadDocumentErrorResponse",
|
329
343
|
"UploadDocumentResponse",
|
330
344
|
"VellumEnvironment",
|
345
|
+
"VellumError",
|
346
|
+
"VellumErrorCodeEnum",
|
331
347
|
"VellumVariable",
|
332
348
|
"VellumVariableType",
|
333
349
|
"WorkflowEventError",
|
@@ -357,11 +373,13 @@ __all__ = [
|
|
357
373
|
"WorkflowResultEvent",
|
358
374
|
"WorkflowResultEventOutputData",
|
359
375
|
"WorkflowResultEventOutputDataChatHistory",
|
376
|
+
"WorkflowResultEventOutputDataError",
|
360
377
|
"WorkflowResultEventOutputDataJson",
|
361
378
|
"WorkflowResultEventOutputDataNumber",
|
362
379
|
"WorkflowResultEventOutputDataSearchResults",
|
363
380
|
"WorkflowResultEventOutputDataString",
|
364
381
|
"WorkflowResultEventOutputData_ChatHistory",
|
382
|
+
"WorkflowResultEventOutputData_Error",
|
365
383
|
"WorkflowResultEventOutputData_Json",
|
366
384
|
"WorkflowResultEventOutputData_Number",
|
367
385
|
"WorkflowResultEventOutputData_SearchResults",
|
vellum/core/client_wrapper.py
CHANGED
@@ -16,7 +16,7 @@ class BaseClientWrapper:
|
|
16
16
|
headers: typing.Dict[str, str] = {
|
17
17
|
"X-Fern-Language": "Python",
|
18
18
|
"X-Fern-SDK-Name": "vellum-ai",
|
19
|
-
"X-Fern-SDK-Version": "v0.0.
|
19
|
+
"X-Fern-SDK-Version": "v0.0.44",
|
20
20
|
}
|
21
21
|
headers["X_API_KEY"] = self.api_key
|
22
22
|
return headers
|
@@ -7,7 +7,9 @@ from json.decoder import JSONDecodeError
|
|
7
7
|
from ...core.api_error import ApiError
|
8
8
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
9
|
from ...core.jsonable_encoder import jsonable_encoder
|
10
|
+
from ...errors.bad_request_error import BadRequestError
|
10
11
|
from ...errors.conflict_error import ConflictError
|
12
|
+
from ...errors.not_found_error import NotFoundError
|
11
13
|
from ...types.provider_enum import ProviderEnum
|
12
14
|
from ...types.register_prompt_error_response import RegisterPromptErrorResponse
|
13
15
|
from ...types.register_prompt_model_parameters_request import RegisterPromptModelParametersRequest
|
@@ -58,8 +60,9 @@ class RegisteredPromptsClient:
|
|
58
60
|
* `GOOGLE` - Google
|
59
61
|
* `HOSTED` - Hosted
|
60
62
|
* `MOSAICML` - MosaicML
|
61
|
-
* `MYSTIC` - Mystic
|
62
63
|
* `OPENAI` - OpenAI
|
64
|
+
* `HUGGINGFACE` - HuggingFace
|
65
|
+
* `MYSTIC` - Mystic
|
63
66
|
* `PYQ` - Pyq
|
64
67
|
- model: str. The initial model to use for this prompt
|
65
68
|
|
@@ -88,6 +91,10 @@ class RegisteredPromptsClient:
|
|
88
91
|
)
|
89
92
|
if 200 <= _response.status_code < 300:
|
90
93
|
return pydantic.parse_obj_as(RegisterPromptResponse, _response.json()) # type: ignore
|
94
|
+
if _response.status_code == 400:
|
95
|
+
raise BadRequestError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
96
|
+
if _response.status_code == 404:
|
97
|
+
raise NotFoundError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
91
98
|
if _response.status_code == 409:
|
92
99
|
raise ConflictError(pydantic.parse_obj_as(RegisterPromptErrorResponse, _response.json())) # type: ignore
|
93
100
|
try:
|
@@ -132,8 +139,9 @@ class AsyncRegisteredPromptsClient:
|
|
132
139
|
* `GOOGLE` - Google
|
133
140
|
* `HOSTED` - Hosted
|
134
141
|
* `MOSAICML` - MosaicML
|
135
|
-
* `MYSTIC` - Mystic
|
136
142
|
* `OPENAI` - OpenAI
|
143
|
+
* `HUGGINGFACE` - HuggingFace
|
144
|
+
* `MYSTIC` - Mystic
|
137
145
|
* `PYQ` - Pyq
|
138
146
|
- model: str. The initial model to use for this prompt
|
139
147
|
|
@@ -162,6 +170,10 @@ class AsyncRegisteredPromptsClient:
|
|
162
170
|
)
|
163
171
|
if 200 <= _response.status_code < 300:
|
164
172
|
return pydantic.parse_obj_as(RegisterPromptResponse, _response.json()) # type: ignore
|
173
|
+
if _response.status_code == 400:
|
174
|
+
raise BadRequestError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
175
|
+
if _response.status_code == 404:
|
176
|
+
raise NotFoundError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
|
165
177
|
if _response.status_code == 409:
|
166
178
|
raise ConflictError(pydantic.parse_obj_as(RegisterPromptErrorResponse, _response.json())) # type: ignore
|
167
179
|
try:
|
vellum/types/__init__.py
CHANGED
@@ -37,7 +37,6 @@ from .logprobs_enum import LogprobsEnum
|
|
37
37
|
from .metadata_filter_config_request import MetadataFilterConfigRequest
|
38
38
|
from .metadata_filter_rule_combinator import MetadataFilterRuleCombinator
|
39
39
|
from .metadata_filter_rule_request import MetadataFilterRuleRequest
|
40
|
-
from .model_type_deprecated import ModelTypeDeprecated
|
41
40
|
from .model_version_build_config import ModelVersionBuildConfig
|
42
41
|
from .model_version_compile_prompt_response import ModelVersionCompilePromptResponse
|
43
42
|
from .model_version_compiled_prompt import ModelVersionCompiledPrompt
|
@@ -47,6 +46,7 @@ from .model_version_read import ModelVersionRead
|
|
47
46
|
from .model_version_read_status_enum import ModelVersionReadStatusEnum
|
48
47
|
from .model_version_sandbox_snapshot import ModelVersionSandboxSnapshot
|
49
48
|
from .node_input_compiled_chat_history_value import NodeInputCompiledChatHistoryValue
|
49
|
+
from .node_input_compiled_error_value import NodeInputCompiledErrorValue
|
50
50
|
from .node_input_compiled_json_value import NodeInputCompiledJsonValue
|
51
51
|
from .node_input_compiled_number_value import NodeInputCompiledNumberValue
|
52
52
|
from .node_input_compiled_search_results_value import NodeInputCompiledSearchResultsValue
|
@@ -54,6 +54,7 @@ from .node_input_compiled_string_value import NodeInputCompiledStringValue
|
|
54
54
|
from .node_input_variable_compiled_value import (
|
55
55
|
NodeInputVariableCompiledValue,
|
56
56
|
NodeInputVariableCompiledValue_ChatHistory,
|
57
|
+
NodeInputVariableCompiledValue_Error,
|
57
58
|
NodeInputVariableCompiledValue_Json,
|
58
59
|
NodeInputVariableCompiledValue_Number,
|
59
60
|
NodeInputVariableCompiledValue_SearchResults,
|
@@ -109,6 +110,7 @@ from .submit_workflow_execution_actual_request import (
|
|
109
110
|
SubmitWorkflowExecutionActualRequest_String,
|
110
111
|
)
|
111
112
|
from .templating_node_chat_history_result import TemplatingNodeChatHistoryResult
|
113
|
+
from .templating_node_error_result import TemplatingNodeErrorResult
|
112
114
|
from .templating_node_json_result import TemplatingNodeJsonResult
|
113
115
|
from .templating_node_number_result import TemplatingNodeNumberResult
|
114
116
|
from .templating_node_result import TemplatingNodeResult
|
@@ -116,6 +118,7 @@ from .templating_node_result_data import TemplatingNodeResultData
|
|
116
118
|
from .templating_node_result_output import (
|
117
119
|
TemplatingNodeResultOutput,
|
118
120
|
TemplatingNodeResultOutput_ChatHistory,
|
121
|
+
TemplatingNodeResultOutput_Error,
|
119
122
|
TemplatingNodeResultOutput_Json,
|
120
123
|
TemplatingNodeResultOutput_Number,
|
121
124
|
TemplatingNodeResultOutput_SearchResults,
|
@@ -124,6 +127,7 @@ from .templating_node_result_output import (
|
|
124
127
|
from .templating_node_search_results_result import TemplatingNodeSearchResultsResult
|
125
128
|
from .templating_node_string_result import TemplatingNodeStringResult
|
126
129
|
from .terminal_node_chat_history_result import TerminalNodeChatHistoryResult
|
130
|
+
from .terminal_node_error_result import TerminalNodeErrorResult
|
127
131
|
from .terminal_node_json_result import TerminalNodeJsonResult
|
128
132
|
from .terminal_node_number_result import TerminalNodeNumberResult
|
129
133
|
from .terminal_node_result import TerminalNodeResult
|
@@ -131,6 +135,7 @@ from .terminal_node_result_data import TerminalNodeResultData
|
|
131
135
|
from .terminal_node_result_output import (
|
132
136
|
TerminalNodeResultOutput,
|
133
137
|
TerminalNodeResultOutput_ChatHistory,
|
138
|
+
TerminalNodeResultOutput_Error,
|
134
139
|
TerminalNodeResultOutput_Json,
|
135
140
|
TerminalNodeResultOutput_Number,
|
136
141
|
TerminalNodeResultOutput_SearchResults,
|
@@ -141,6 +146,8 @@ from .terminal_node_string_result import TerminalNodeStringResult
|
|
141
146
|
from .test_suite_test_case import TestSuiteTestCase
|
142
147
|
from .upload_document_error_response import UploadDocumentErrorResponse
|
143
148
|
from .upload_document_response import UploadDocumentResponse
|
149
|
+
from .vellum_error import VellumError
|
150
|
+
from .vellum_error_code_enum import VellumErrorCodeEnum
|
144
151
|
from .vellum_variable import VellumVariable
|
145
152
|
from .vellum_variable_type import VellumVariableType
|
146
153
|
from .workflow_event_error import WorkflowEventError
|
@@ -175,12 +182,14 @@ from .workflow_result_event import WorkflowResultEvent
|
|
175
182
|
from .workflow_result_event_output_data import (
|
176
183
|
WorkflowResultEventOutputData,
|
177
184
|
WorkflowResultEventOutputData_ChatHistory,
|
185
|
+
WorkflowResultEventOutputData_Error,
|
178
186
|
WorkflowResultEventOutputData_Json,
|
179
187
|
WorkflowResultEventOutputData_Number,
|
180
188
|
WorkflowResultEventOutputData_SearchResults,
|
181
189
|
WorkflowResultEventOutputData_String,
|
182
190
|
)
|
183
191
|
from .workflow_result_event_output_data_chat_history import WorkflowResultEventOutputDataChatHistory
|
192
|
+
from .workflow_result_event_output_data_error import WorkflowResultEventOutputDataError
|
184
193
|
from .workflow_result_event_output_data_json import WorkflowResultEventOutputDataJson
|
185
194
|
from .workflow_result_event_output_data_number import WorkflowResultEventOutputDataNumber
|
186
195
|
from .workflow_result_event_output_data_search_results import WorkflowResultEventOutputDataSearchResults
|
@@ -225,7 +234,6 @@ __all__ = [
|
|
225
234
|
"MetadataFilterConfigRequest",
|
226
235
|
"MetadataFilterRuleCombinator",
|
227
236
|
"MetadataFilterRuleRequest",
|
228
|
-
"ModelTypeDeprecated",
|
229
237
|
"ModelVersionBuildConfig",
|
230
238
|
"ModelVersionCompilePromptResponse",
|
231
239
|
"ModelVersionCompiledPrompt",
|
@@ -235,12 +243,14 @@ __all__ = [
|
|
235
243
|
"ModelVersionReadStatusEnum",
|
236
244
|
"ModelVersionSandboxSnapshot",
|
237
245
|
"NodeInputCompiledChatHistoryValue",
|
246
|
+
"NodeInputCompiledErrorValue",
|
238
247
|
"NodeInputCompiledJsonValue",
|
239
248
|
"NodeInputCompiledNumberValue",
|
240
249
|
"NodeInputCompiledSearchResultsValue",
|
241
250
|
"NodeInputCompiledStringValue",
|
242
251
|
"NodeInputVariableCompiledValue",
|
243
252
|
"NodeInputVariableCompiledValue_ChatHistory",
|
253
|
+
"NodeInputVariableCompiledValue_Error",
|
244
254
|
"NodeInputVariableCompiledValue_Json",
|
245
255
|
"NodeInputVariableCompiledValue_Number",
|
246
256
|
"NodeInputVariableCompiledValue_SearchResults",
|
@@ -293,12 +303,14 @@ __all__ = [
|
|
293
303
|
"SubmitWorkflowExecutionActualRequest_Json",
|
294
304
|
"SubmitWorkflowExecutionActualRequest_String",
|
295
305
|
"TemplatingNodeChatHistoryResult",
|
306
|
+
"TemplatingNodeErrorResult",
|
296
307
|
"TemplatingNodeJsonResult",
|
297
308
|
"TemplatingNodeNumberResult",
|
298
309
|
"TemplatingNodeResult",
|
299
310
|
"TemplatingNodeResultData",
|
300
311
|
"TemplatingNodeResultOutput",
|
301
312
|
"TemplatingNodeResultOutput_ChatHistory",
|
313
|
+
"TemplatingNodeResultOutput_Error",
|
302
314
|
"TemplatingNodeResultOutput_Json",
|
303
315
|
"TemplatingNodeResultOutput_Number",
|
304
316
|
"TemplatingNodeResultOutput_SearchResults",
|
@@ -306,12 +318,14 @@ __all__ = [
|
|
306
318
|
"TemplatingNodeSearchResultsResult",
|
307
319
|
"TemplatingNodeStringResult",
|
308
320
|
"TerminalNodeChatHistoryResult",
|
321
|
+
"TerminalNodeErrorResult",
|
309
322
|
"TerminalNodeJsonResult",
|
310
323
|
"TerminalNodeNumberResult",
|
311
324
|
"TerminalNodeResult",
|
312
325
|
"TerminalNodeResultData",
|
313
326
|
"TerminalNodeResultOutput",
|
314
327
|
"TerminalNodeResultOutput_ChatHistory",
|
328
|
+
"TerminalNodeResultOutput_Error",
|
315
329
|
"TerminalNodeResultOutput_Json",
|
316
330
|
"TerminalNodeResultOutput_Number",
|
317
331
|
"TerminalNodeResultOutput_SearchResults",
|
@@ -321,6 +335,8 @@ __all__ = [
|
|
321
335
|
"TestSuiteTestCase",
|
322
336
|
"UploadDocumentErrorResponse",
|
323
337
|
"UploadDocumentResponse",
|
338
|
+
"VellumError",
|
339
|
+
"VellumErrorCodeEnum",
|
324
340
|
"VellumVariable",
|
325
341
|
"VellumVariableType",
|
326
342
|
"WorkflowEventError",
|
@@ -350,11 +366,13 @@ __all__ = [
|
|
350
366
|
"WorkflowResultEvent",
|
351
367
|
"WorkflowResultEventOutputData",
|
352
368
|
"WorkflowResultEventOutputDataChatHistory",
|
369
|
+
"WorkflowResultEventOutputDataError",
|
353
370
|
"WorkflowResultEventOutputDataJson",
|
354
371
|
"WorkflowResultEventOutputDataNumber",
|
355
372
|
"WorkflowResultEventOutputDataSearchResults",
|
356
373
|
"WorkflowResultEventOutputDataString",
|
357
374
|
"WorkflowResultEventOutputData_ChatHistory",
|
375
|
+
"WorkflowResultEventOutputData_Error",
|
358
376
|
"WorkflowResultEventOutputData_Json",
|
359
377
|
"WorkflowResultEventOutputData_Number",
|
360
378
|
"WorkflowResultEventOutputData_SearchResults",
|
vellum/types/deployment_read.py
CHANGED
@@ -6,7 +6,6 @@ import typing
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
7
|
from .deployment_status import DeploymentStatus
|
8
8
|
from .environment_enum import EnvironmentEnum
|
9
|
-
from .model_type_deprecated import ModelTypeDeprecated
|
10
9
|
from .vellum_variable import VellumVariable
|
11
10
|
|
12
11
|
try:
|
@@ -38,7 +37,6 @@ class DeploymentRead(pydantic.BaseModel):
|
|
38
37
|
"* `PRODUCTION` - Production\n"
|
39
38
|
)
|
40
39
|
)
|
41
|
-
model_type: ModelTypeDeprecated
|
42
40
|
active_model_version_ids: typing.List[str]
|
43
41
|
last_deployed_on: dt.datetime
|
44
42
|
input_variables: typing.List[VellumVariable]
|
@@ -33,6 +33,7 @@ class EnrichedNormalizedCompletion(pydantic.BaseModel):
|
|
33
33
|
description="The logprobs of the completion. Only present if specified in the original request options."
|
34
34
|
)
|
35
35
|
model_version_id: str = pydantic.Field(description="The ID of the model version used to generate this completion.")
|
36
|
+
prompt_version_id: typing.Optional[str]
|
36
37
|
type: typing.Optional[VellumVariableType]
|
37
38
|
|
38
39
|
def json(self, **kwargs: typing.Any) -> str:
|
@@ -19,6 +19,7 @@ class ModelVersionBuildConfig(pydantic.BaseModel):
|
|
19
19
|
sandbox_snapshot: typing.Optional[ModelVersionSandboxSnapshot] = pydantic.Field(
|
20
20
|
description="Information about the sandbox snapshot that was used to create this model version, if applicable."
|
21
21
|
)
|
22
|
+
prompt_version_id: typing.Optional[str]
|
22
23
|
|
23
24
|
def json(self, **kwargs: typing.Any) -> str:
|
24
25
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -4,7 +4,6 @@ import datetime as dt
|
|
4
4
|
import typing
|
5
5
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from .model_type_deprecated import ModelTypeDeprecated
|
8
7
|
from .model_version_build_config import ModelVersionBuildConfig
|
9
8
|
from .model_version_exec_config import ModelVersionExecConfig
|
10
9
|
from .model_version_read_status_enum import ModelVersionReadStatusEnum
|
@@ -20,7 +19,6 @@ class ModelVersionRead(pydantic.BaseModel):
|
|
20
19
|
id: str = pydantic.Field(description="Vellum-generated ID that uniquely identifies this model version.")
|
21
20
|
created: dt.datetime = pydantic.Field(description="Timestamp of when this model version was created.")
|
22
21
|
label: str = pydantic.Field(description="Human-friendly name for this model version.")
|
23
|
-
model_type: ModelTypeDeprecated
|
24
22
|
provider: ProviderEnum = pydantic.Field(
|
25
23
|
description=(
|
26
24
|
"Which LLM provider this model version is associated with.\n"
|
@@ -30,8 +28,9 @@ class ModelVersionRead(pydantic.BaseModel):
|
|
30
28
|
"* `GOOGLE` - Google\n"
|
31
29
|
"* `HOSTED` - Hosted\n"
|
32
30
|
"* `MOSAICML` - MosaicML\n"
|
33
|
-
"* `MYSTIC` - Mystic\n"
|
34
31
|
"* `OPENAI` - OpenAI\n"
|
32
|
+
"* `HUGGINGFACE` - HuggingFace\n"
|
33
|
+
"* `MYSTIC` - Mystic\n"
|
35
34
|
"* `PYQ` - Pyq\n"
|
36
35
|
)
|
37
36
|
)
|
@@ -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 .vellum_error import VellumError
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class NodeInputCompiledErrorValue(pydantic.BaseModel):
|
16
|
+
node_input_id: str
|
17
|
+
key: str
|
18
|
+
value: typing.Optional[VellumError]
|
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
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -7,6 +7,7 @@ import typing
|
|
7
7
|
import typing_extensions
|
8
8
|
|
9
9
|
from .node_input_compiled_chat_history_value import NodeInputCompiledChatHistoryValue
|
10
|
+
from .node_input_compiled_error_value import NodeInputCompiledErrorValue
|
10
11
|
from .node_input_compiled_json_value import NodeInputCompiledJsonValue
|
11
12
|
from .node_input_compiled_number_value import NodeInputCompiledNumberValue
|
12
13
|
from .node_input_compiled_search_results_value import NodeInputCompiledSearchResultsValue
|
@@ -58,10 +59,20 @@ class NodeInputVariableCompiledValue_SearchResults(NodeInputCompiledSearchResult
|
|
58
59
|
allow_population_by_field_name = True
|
59
60
|
|
60
61
|
|
62
|
+
class NodeInputVariableCompiledValue_Error(NodeInputCompiledErrorValue):
|
63
|
+
type: typing_extensions.Literal["ERROR"]
|
64
|
+
|
65
|
+
class Config:
|
66
|
+
frozen = True
|
67
|
+
smart_union = True
|
68
|
+
allow_population_by_field_name = True
|
69
|
+
|
70
|
+
|
61
71
|
NodeInputVariableCompiledValue = typing.Union[
|
62
72
|
NodeInputVariableCompiledValue_String,
|
63
73
|
NodeInputVariableCompiledValue_Number,
|
64
74
|
NodeInputVariableCompiledValue_Json,
|
65
75
|
NodeInputVariableCompiledValue_ChatHistory,
|
66
76
|
NodeInputVariableCompiledValue_SearchResults,
|
77
|
+
NodeInputVariableCompiledValue_Error,
|
67
78
|
]
|
vellum/types/provider_enum.py
CHANGED
@@ -13,8 +13,9 @@ class ProviderEnum(str, enum.Enum):
|
|
13
13
|
* `GOOGLE` - Google
|
14
14
|
* `HOSTED` - Hosted
|
15
15
|
* `MOSAICML` - MosaicML
|
16
|
-
* `MYSTIC` - Mystic
|
17
16
|
* `OPENAI` - OpenAI
|
17
|
+
* `HUGGINGFACE` - HuggingFace
|
18
|
+
* `MYSTIC` - Mystic
|
18
19
|
* `PYQ` - Pyq
|
19
20
|
"""
|
20
21
|
|
@@ -23,8 +24,9 @@ class ProviderEnum(str, enum.Enum):
|
|
23
24
|
GOOGLE = "GOOGLE"
|
24
25
|
HOSTED = "HOSTED"
|
25
26
|
MOSAICML = "MOSAICML"
|
26
|
-
MYSTIC = "MYSTIC"
|
27
27
|
OPENAI = "OPENAI"
|
28
|
+
HUGGINGFACE = "HUGGINGFACE"
|
29
|
+
MYSTIC = "MYSTIC"
|
28
30
|
PYQ = "PYQ"
|
29
31
|
|
30
32
|
def visit(
|
@@ -34,8 +36,9 @@ class ProviderEnum(str, enum.Enum):
|
|
34
36
|
google: typing.Callable[[], T_Result],
|
35
37
|
hosted: typing.Callable[[], T_Result],
|
36
38
|
mosaicml: typing.Callable[[], T_Result],
|
37
|
-
mystic: typing.Callable[[], T_Result],
|
38
39
|
openai: typing.Callable[[], T_Result],
|
40
|
+
huggingface: typing.Callable[[], T_Result],
|
41
|
+
mystic: typing.Callable[[], T_Result],
|
39
42
|
pyq: typing.Callable[[], T_Result],
|
40
43
|
) -> T_Result:
|
41
44
|
if self is ProviderEnum.ANTHROPIC:
|
@@ -48,9 +51,11 @@ class ProviderEnum(str, enum.Enum):
|
|
48
51
|
return hosted()
|
49
52
|
if self is ProviderEnum.MOSAICML:
|
50
53
|
return mosaicml()
|
51
|
-
if self is ProviderEnum.MYSTIC:
|
52
|
-
return mystic()
|
53
54
|
if self is ProviderEnum.OPENAI:
|
54
55
|
return openai()
|
56
|
+
if self is ProviderEnum.HUGGINGFACE:
|
57
|
+
return huggingface()
|
58
|
+
if self is ProviderEnum.MYSTIC:
|
59
|
+
return mystic()
|
55
60
|
if self is ProviderEnum.PYQ:
|
56
61
|
return pyq()
|
@@ -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 .vellum_error import VellumError
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class TemplatingNodeErrorResult(pydantic.BaseModel):
|
16
|
+
id: str
|
17
|
+
value: typing.Optional[VellumError]
|
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
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -7,6 +7,7 @@ import typing
|
|
7
7
|
import typing_extensions
|
8
8
|
|
9
9
|
from .templating_node_chat_history_result import TemplatingNodeChatHistoryResult
|
10
|
+
from .templating_node_error_result import TemplatingNodeErrorResult
|
10
11
|
from .templating_node_json_result import TemplatingNodeJsonResult
|
11
12
|
from .templating_node_number_result import TemplatingNodeNumberResult
|
12
13
|
from .templating_node_search_results_result import TemplatingNodeSearchResultsResult
|
@@ -58,10 +59,20 @@ class TemplatingNodeResultOutput_SearchResults(TemplatingNodeSearchResultsResult
|
|
58
59
|
allow_population_by_field_name = True
|
59
60
|
|
60
61
|
|
62
|
+
class TemplatingNodeResultOutput_Error(TemplatingNodeErrorResult):
|
63
|
+
type: typing_extensions.Literal["ERROR"]
|
64
|
+
|
65
|
+
class Config:
|
66
|
+
frozen = True
|
67
|
+
smart_union = True
|
68
|
+
allow_population_by_field_name = True
|
69
|
+
|
70
|
+
|
61
71
|
TemplatingNodeResultOutput = typing.Union[
|
62
72
|
TemplatingNodeResultOutput_String,
|
63
73
|
TemplatingNodeResultOutput_Number,
|
64
74
|
TemplatingNodeResultOutput_Json,
|
65
75
|
TemplatingNodeResultOutput_ChatHistory,
|
66
76
|
TemplatingNodeResultOutput_SearchResults,
|
77
|
+
TemplatingNodeResultOutput_Error,
|
67
78
|
]
|
@@ -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 .vellum_error import VellumError
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class TerminalNodeErrorResult(pydantic.BaseModel):
|
16
|
+
id: typing.Optional[str]
|
17
|
+
name: str = pydantic.Field(description="The unique name given to the terminal node that produced this output.")
|
18
|
+
value: typing.Optional[VellumError]
|
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
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -7,6 +7,7 @@ import typing
|
|
7
7
|
import typing_extensions
|
8
8
|
|
9
9
|
from .terminal_node_chat_history_result import TerminalNodeChatHistoryResult
|
10
|
+
from .terminal_node_error_result import TerminalNodeErrorResult
|
10
11
|
from .terminal_node_json_result import TerminalNodeJsonResult
|
11
12
|
from .terminal_node_number_result import TerminalNodeNumberResult
|
12
13
|
from .terminal_node_search_results_result import TerminalNodeSearchResultsResult
|
@@ -58,10 +59,20 @@ class TerminalNodeResultOutput_SearchResults(TerminalNodeSearchResultsResult):
|
|
58
59
|
allow_population_by_field_name = True
|
59
60
|
|
60
61
|
|
62
|
+
class TerminalNodeResultOutput_Error(TerminalNodeErrorResult):
|
63
|
+
type: typing_extensions.Literal["ERROR"]
|
64
|
+
|
65
|
+
class Config:
|
66
|
+
frozen = True
|
67
|
+
smart_union = True
|
68
|
+
allow_population_by_field_name = True
|
69
|
+
|
70
|
+
|
61
71
|
TerminalNodeResultOutput = typing.Union[
|
62
72
|
TerminalNodeResultOutput_String,
|
63
73
|
TerminalNodeResultOutput_Number,
|
64
74
|
TerminalNodeResultOutput_Json,
|
65
75
|
TerminalNodeResultOutput_ChatHistory,
|
66
76
|
TerminalNodeResultOutput_SearchResults,
|
77
|
+
TerminalNodeResultOutput_Error,
|
67
78
|
]
|
@@ -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 .vellum_error_code_enum import VellumErrorCodeEnum
|
8
|
+
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
14
|
+
|
15
|
+
class VellumError(pydantic.BaseModel):
|
16
|
+
message: str
|
17
|
+
code: VellumErrorCodeEnum
|
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
|
+
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 enum
|
4
|
+
import typing
|
5
|
+
|
6
|
+
T_Result = typing.TypeVar("T_Result")
|
7
|
+
|
8
|
+
|
9
|
+
class VellumErrorCodeEnum(str, enum.Enum):
|
10
|
+
"""
|
11
|
+
* `INVALID_REQUEST` - INVALID_REQUEST
|
12
|
+
* `PROVIDER_ERROR` - PROVIDER_ERROR
|
13
|
+
* `INTERNAL_SERVER_ERROR` - INTERNAL_SERVER_ERROR
|
14
|
+
"""
|
15
|
+
|
16
|
+
INVALID_REQUEST = "INVALID_REQUEST"
|
17
|
+
PROVIDER_ERROR = "PROVIDER_ERROR"
|
18
|
+
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR"
|
19
|
+
|
20
|
+
def visit(
|
21
|
+
self,
|
22
|
+
invalid_request: typing.Callable[[], T_Result],
|
23
|
+
provider_error: typing.Callable[[], T_Result],
|
24
|
+
internal_server_error: typing.Callable[[], T_Result],
|
25
|
+
) -> T_Result:
|
26
|
+
if self is VellumErrorCodeEnum.INVALID_REQUEST:
|
27
|
+
return invalid_request()
|
28
|
+
if self is VellumErrorCodeEnum.PROVIDER_ERROR:
|
29
|
+
return provider_error()
|
30
|
+
if self is VellumErrorCodeEnum.INTERNAL_SERVER_ERROR:
|
31
|
+
return internal_server_error()
|
@@ -13,6 +13,7 @@ class VellumVariableType(str, enum.Enum):
|
|
13
13
|
* `JSON` - JSON
|
14
14
|
* `CHAT_HISTORY` - CHAT_HISTORY
|
15
15
|
* `SEARCH_RESULTS` - SEARCH_RESULTS
|
16
|
+
* `ERROR` - ERROR
|
16
17
|
"""
|
17
18
|
|
18
19
|
STRING = "STRING"
|
@@ -20,6 +21,7 @@ class VellumVariableType(str, enum.Enum):
|
|
20
21
|
JSON = "JSON"
|
21
22
|
CHAT_HISTORY = "CHAT_HISTORY"
|
22
23
|
SEARCH_RESULTS = "SEARCH_RESULTS"
|
24
|
+
ERROR = "ERROR"
|
23
25
|
|
24
26
|
def visit(
|
25
27
|
self,
|
@@ -28,6 +30,7 @@ class VellumVariableType(str, enum.Enum):
|
|
28
30
|
json: typing.Callable[[], T_Result],
|
29
31
|
chat_history: typing.Callable[[], T_Result],
|
30
32
|
search_results: typing.Callable[[], T_Result],
|
33
|
+
error: typing.Callable[[], T_Result],
|
31
34
|
) -> T_Result:
|
32
35
|
if self is VellumVariableType.STRING:
|
33
36
|
return string()
|
@@ -39,3 +42,5 @@ class VellumVariableType(str, enum.Enum):
|
|
39
42
|
return chat_history()
|
40
43
|
if self is VellumVariableType.SEARCH_RESULTS:
|
41
44
|
return search_results()
|
45
|
+
if self is VellumVariableType.ERROR:
|
46
|
+
return error()
|
@@ -7,6 +7,7 @@ import typing
|
|
7
7
|
import typing_extensions
|
8
8
|
|
9
9
|
from .workflow_result_event_output_data_chat_history import WorkflowResultEventOutputDataChatHistory
|
10
|
+
from .workflow_result_event_output_data_error import WorkflowResultEventOutputDataError
|
10
11
|
from .workflow_result_event_output_data_json import WorkflowResultEventOutputDataJson
|
11
12
|
from .workflow_result_event_output_data_number import WorkflowResultEventOutputDataNumber
|
12
13
|
from .workflow_result_event_output_data_search_results import WorkflowResultEventOutputDataSearchResults
|
@@ -58,10 +59,20 @@ class WorkflowResultEventOutputData_SearchResults(WorkflowResultEventOutputDataS
|
|
58
59
|
allow_population_by_field_name = True
|
59
60
|
|
60
61
|
|
62
|
+
class WorkflowResultEventOutputData_Error(WorkflowResultEventOutputDataError):
|
63
|
+
type: typing_extensions.Literal["ERROR"]
|
64
|
+
|
65
|
+
class Config:
|
66
|
+
frozen = True
|
67
|
+
smart_union = True
|
68
|
+
allow_population_by_field_name = True
|
69
|
+
|
70
|
+
|
61
71
|
WorkflowResultEventOutputData = typing.Union[
|
62
72
|
WorkflowResultEventOutputData_String,
|
63
73
|
WorkflowResultEventOutputData_Number,
|
64
74
|
WorkflowResultEventOutputData_Json,
|
65
75
|
WorkflowResultEventOutputData_ChatHistory,
|
66
76
|
WorkflowResultEventOutputData_SearchResults,
|
77
|
+
WorkflowResultEventOutputData_Error,
|
67
78
|
]
|
@@ -0,0 +1,37 @@
|
|
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 .vellum_error import VellumError
|
8
|
+
from .workflow_node_result_event_state import WorkflowNodeResultEventState
|
9
|
+
|
10
|
+
try:
|
11
|
+
import pydantic.v1 as pydantic # type: ignore
|
12
|
+
except ImportError:
|
13
|
+
import pydantic # type: ignore
|
14
|
+
|
15
|
+
|
16
|
+
class WorkflowResultEventOutputDataError(pydantic.BaseModel):
|
17
|
+
id: typing.Optional[str]
|
18
|
+
name: str
|
19
|
+
state: WorkflowNodeResultEventState
|
20
|
+
node_id: str
|
21
|
+
delta: typing.Optional[str] = pydantic.Field(
|
22
|
+
description="The newly output string value. Only relevant for string outputs with a state of STREAMING."
|
23
|
+
)
|
24
|
+
value: typing.Optional[VellumError]
|
25
|
+
|
26
|
+
def json(self, **kwargs: typing.Any) -> str:
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
28
|
+
return super().json(**kwargs_with_defaults)
|
29
|
+
|
30
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
31
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
32
|
+
return super().dict(**kwargs_with_defaults)
|
33
|
+
|
34
|
+
class Config:
|
35
|
+
frozen = True
|
36
|
+
smart_union = True
|
37
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
vellum/__init__.py,sha256=
|
1
|
+
vellum/__init__.py,sha256=DtVFCtohFJrKc8Ty6N3Pw3aOaIsgoUcKrABHIy8n8qE,12851
|
2
2
|
vellum/client.py,sha256=NxShhFvI9ZXXccaf3HzT1mzGTSz0HYehqldVN4zkMPM,35331
|
3
3
|
vellum/core/__init__.py,sha256=QJS3CJ2TYP2E1Tge0CS6Z7r8LTNzJHQVX1hD3558eP0,519
|
4
4
|
vellum/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
5
|
-
vellum/core/client_wrapper.py,sha256=
|
5
|
+
vellum/core/client_wrapper.py,sha256=JrfCgbH99OJ5s28X62IxrIad8B7l2BvFXwdtqnDhSSg,1214
|
6
6
|
vellum/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
7
7
|
vellum/core/jsonable_encoder.py,sha256=MTYkDov2EryHgee4QM46uZiBOuOXK9KTHlBdBwU-CpU,3799
|
8
8
|
vellum/core/remove_none_from_dict.py,sha256=8m91FC3YuVem0Gm9_sXhJ2tGvP33owJJdrqCLEdowGw,330
|
@@ -24,12 +24,12 @@ vellum/resources/documents/client.py,sha256=yeJkmRD7ZxPg0z6HNuH3AnoieemaOiUdQW-e
|
|
24
24
|
vellum/resources/model_versions/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
25
25
|
vellum/resources/model_versions/client.py,sha256=mWF64oG7D3EWHVmX1B78q-UQ9ujJPUKlVuKEHwaEL3E,5397
|
26
26
|
vellum/resources/registered_prompts/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
27
|
-
vellum/resources/registered_prompts/client.py,sha256=
|
27
|
+
vellum/resources/registered_prompts/client.py,sha256=OTSk0sHv_xCvEHI0dM26ta2HFcFOPXWO84uxHbHqdb8,8247
|
28
28
|
vellum/resources/sandboxes/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
29
29
|
vellum/resources/sandboxes/client.py,sha256=yhXlN3Z6Xbf8uYYoj4eZZiiGs6ZRAOD1ZnlECoClcVU,7695
|
30
30
|
vellum/resources/test_suites/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
31
31
|
vellum/resources/test_suites/client.py,sha256=MsBsx4aMDZo-ZRfFJCOoe1dbnfnpfmh_GP19OOKhRdI,7882
|
32
|
-
vellum/types/__init__.py,sha256=
|
32
|
+
vellum/types/__init__.py,sha256=WSMDNEamsJl-s5PZkJDFUFRnHkGcXl9xtoqDUfxSoGs,17482
|
33
33
|
vellum/types/api_node_result.py,sha256=1zAcNznjyVkTQM2V--UE1lYFzRWbYEogoChZBGcsliE,936
|
34
34
|
vellum/types/api_node_result_data.py,sha256=HvpZaAKYXsoBOnobACIYCmIdxbRc7Zp-ibIohiz_Nzc,1125
|
35
35
|
vellum/types/block_type_enum.py,sha256=BQ8ZN1OKhOdmHeQ3-bhMfkLLohirsNhHPljBJX8Bbmo,1051
|
@@ -38,14 +38,14 @@ vellum/types/chat_message_request.py,sha256=9wgnG0Q36jUNTr7vS0FASRFrsXzgIccrjNiC
|
|
38
38
|
vellum/types/chat_message_role.py,sha256=VscYXloHNYjiThf7g6OsMxO0S8p0ZUa0G6sakaWhc1g,914
|
39
39
|
vellum/types/conditional_node_result.py,sha256=u2Rx3LOY0rNwdSb6vZnOmMRcDvl83uKXccVQv2kzS7g,968
|
40
40
|
vellum/types/conditional_node_result_data.py,sha256=IT6PnM2N4q8JJ4srk9ushri4GnCvxMz9VuEcbhmo_rs,911
|
41
|
-
vellum/types/deployment_read.py,sha256=
|
41
|
+
vellum/types/deployment_read.py,sha256=rnGqiO_IqtlW3G8_cQqTx4vWBta1B3urlehBuES1lwk,1964
|
42
42
|
vellum/types/deployment_status.py,sha256=rtsRFv9cx0kEwNYkgscGzo62bvaNME-rU8ZxFlcY0M8,761
|
43
43
|
vellum/types/document_document_to_document_index.py,sha256=So0eaa9uQd_vrbnpQD_wV7YJS0YQY3AH_91asYpYv_g,1634
|
44
44
|
vellum/types/document_index_read.py,sha256=PuGRQTrzpQjs4d-ObBe5glzKNlgpJR3Hr5OGEannHak,1889
|
45
45
|
vellum/types/document_index_status.py,sha256=DtcNtByS8wUEuxfYAW7IQVPSN4HaGJTynP0jNkxgbKE,560
|
46
46
|
vellum/types/document_read.py,sha256=aeAwY8-Si0nT2Ifh1J9ChLaNFJaker1jlfbJkuoA-xc,2264
|
47
47
|
vellum/types/document_status.py,sha256=dkotle2rykOxF1QxqcM8af2ORzmFjZR5a7pHXP6SjDQ,144
|
48
|
-
vellum/types/enriched_normalized_completion.py,sha256=
|
48
|
+
vellum/types/enriched_normalized_completion.py,sha256=uz6lrdSrZIG80rbPQxWD44ic_UYLICYoLQSBYKMdsk0,2100
|
49
49
|
vellum/types/environment_enum.py,sha256=16gr0xkzNIO5dhrOnJNjcQ34z9Xk1oE-egW17P0RWDs,799
|
50
50
|
vellum/types/evaluation_params.py,sha256=Ey-RgV4uKVv8G4Dj6lmX_qiBsLcPo1NmoY2xcFW_qDQ,1048
|
51
51
|
vellum/types/evaluation_params_request.py,sha256=izDbrQHT7QFYjxXX9bkeZnoCle3teShaodbnV_11sJo,1055
|
@@ -67,21 +67,21 @@ vellum/types/logprobs_enum.py,sha256=v3VTlzw1bpuU0hBhcWJTN7JMBS2nWqwertJlaCgxmuY
|
|
67
67
|
vellum/types/metadata_filter_config_request.py,sha256=tUkflYOkwBYmouX_9OfO2mJixeylSns4gHoDuKFgpmo,1333
|
68
68
|
vellum/types/metadata_filter_rule_combinator.py,sha256=ZBBIJE7lSkyMAuesLQxbqw27S4oE8KTrpEbJdPICL0s,528
|
69
69
|
vellum/types/metadata_filter_rule_request.py,sha256=Bo_IQiMfNKx7qzEU36WovvPQoYhxIWn1zQFHN6kEevs,1349
|
70
|
-
vellum/types/
|
71
|
-
vellum/types/model_version_build_config.py,sha256=olweaWo63MJ5hnecA6C9UkkWKIMPbe0l2E8-8JG11JQ,1312
|
70
|
+
vellum/types/model_version_build_config.py,sha256=qxHpUjgguJ3HX4V4VYfYSCMwoQC-S8sP1DG_X5orMHs,1356
|
72
71
|
vellum/types/model_version_compile_prompt_response.py,sha256=I5GQgyhE6HpxOL3MHHrEPqp6vKYarU4N3Qp8iZZciBI,1056
|
73
72
|
vellum/types/model_version_compiled_prompt.py,sha256=kEivdO6Telihn25iBa4UQz5yvI3Fg2KaoovQ2AnIbE0,1168
|
74
73
|
vellum/types/model_version_exec_config.py,sha256=14gVZNz-Hxg7ocEZQs3LQ3BUAL3Vcxo-SxAYC64beIQ,1632
|
75
74
|
vellum/types/model_version_exec_config_parameters.py,sha256=RzhbO7holFFrAmT3crLUPpIPDJm-QDBHT65Kuhnmvek,1178
|
76
|
-
vellum/types/model_version_read.py,sha256=
|
75
|
+
vellum/types/model_version_read.py,sha256=kIDjWRvA1iKG29XLEO7UUKBBlTfWhkwnOtY7KwLQEzM,2391
|
77
76
|
vellum/types/model_version_read_status_enum.py,sha256=Fkciaj4_EHRfNfa6okK4mPbmgCOLaEPkdsoGBYEGkv8,1032
|
78
77
|
vellum/types/model_version_sandbox_snapshot.py,sha256=yxan0nnKQh8YKZgYCV8H2VrtA7_OlQEtbHMVpGwcgW0,1217
|
79
78
|
vellum/types/node_input_compiled_chat_history_value.py,sha256=ZVUjSYuz4DeJU7sUcexHTcJSxhOSha1XNBjNlmL-QE8,1003
|
79
|
+
vellum/types/node_input_compiled_error_value.py,sha256=nbFNdikbmqLutApUmpKXI0k3ukAkPMkLEopo-WNWa8g,984
|
80
80
|
vellum/types/node_input_compiled_json_value.py,sha256=-GCgER6yFl3jOu4W4Ktjy9nM_vKYtBj8vqVitOvHd5I,962
|
81
81
|
vellum/types/node_input_compiled_number_value.py,sha256=OUdX7cRbzYxV4cZ-F7SwCChK-7YlK1YAJdhZyUg39MY,939
|
82
82
|
vellum/types/node_input_compiled_search_results_value.py,sha256=p9K0LpWvAg9TMzjTNzmODHSCadmfPdDHMF5CnivGHcc,1008
|
83
83
|
vellum/types/node_input_compiled_string_value.py,sha256=lrOr8WhK5wZrsUb1-7bYQ7M2deap8JvnVMtqh8887Zc,939
|
84
|
-
vellum/types/node_input_variable_compiled_value.py,sha256=
|
84
|
+
vellum/types/node_input_variable_compiled_value.py,sha256=6PhquhSskdpslUfbS0roxl8H2iQC_WLOGy3IagsZLQs,2381
|
85
85
|
vellum/types/normalized_log_probs.py,sha256=XhiqVdoFYWbVhYWinsiDzkIRSs1t2DCMEX18EwK-c24,1013
|
86
86
|
vellum/types/normalized_token_log_probs.py,sha256=ZIEr6evXULAv5GFhkekr1Qc6QsJjr2vsTdumMooO4oc,1014
|
87
87
|
vellum/types/paginated_slim_document_list.py,sha256=rfm_k539tWn6jVBjtgUG1M0AqtPvxtwPXwBJLPBiE6Q,1062
|
@@ -95,7 +95,7 @@ vellum/types/prompt_template_block_data_request.py,sha256=HgrcEIgO8OSseYsqqNX9VK
|
|
95
95
|
vellum/types/prompt_template_block_properties.py,sha256=SNdB7L-UArlWNs-kLzOGop2jt9EI_POc8ITaNeq9YvE,1586
|
96
96
|
vellum/types/prompt_template_block_properties_request.py,sha256=woZkEqjSt-ij-Oi8BV0ZZCAsJmCCyYYFdGTUbMOTjmA,1622
|
97
97
|
vellum/types/prompt_template_block_request.py,sha256=6js3_Jfy65xzNijioY0uDbDDcc0Ar3NECaVP2OBJLk0,1200
|
98
|
-
vellum/types/provider_enum.py,sha256=
|
98
|
+
vellum/types/provider_enum.py,sha256=9NRZ5NEdM-6BLzXvWyrfqGlvKfDCmxbO7wNVyF760Jc,1732
|
99
99
|
vellum/types/register_prompt_error_response.py,sha256=ma0aguRLbdsCWVrWyUBQPaWpfQ99pzcuXNTptpOj8jM,956
|
100
100
|
vellum/types/register_prompt_model_parameters_request.py,sha256=lUHXwW3_JwkrAVEbLU5jhE-yMWSTjFaWjVPltSgPldI,1148
|
101
101
|
vellum/types/register_prompt_prompt.py,sha256=EWqQOYXiNgfRLYM2LiN4M5QLziPigMRRKYBrKY6CxGg,1035
|
@@ -127,26 +127,30 @@ vellum/types/submit_completion_actual_request.py,sha256=krKZefK_-0LAEJYIKilUemEw
|
|
127
127
|
vellum/types/submit_completion_actuals_error_response.py,sha256=AJTkBM60F8rxGKXfz0TcjdP5v_OgRnF3zUrDG1CtNDo,895
|
128
128
|
vellum/types/submit_workflow_execution_actual_request.py,sha256=hazWw_rBxap8g0QAqlrO-qYFu3gJV_XXVgquWkDVsi0,1413
|
129
129
|
vellum/types/templating_node_chat_history_result.py,sha256=hSnL_WbnG0vMq6_4vBo-JJobMb2BzhSN0HKZpt-dHmU,977
|
130
|
+
vellum/types/templating_node_error_result.py,sha256=0zosQlkEZTMVY1MzzSPWCFEGWAK5kky6pKPd384urGc,958
|
130
131
|
vellum/types/templating_node_json_result.py,sha256=_vHc09B-SU0GhFSE6GgNRspvgoxkuf48Lw8uKiaeUj4,936
|
131
132
|
vellum/types/templating_node_number_result.py,sha256=MU9sOJrZSqUEEn9mAo6pY8ea2zqsYJ8iEnud2NwLYuA,913
|
132
133
|
vellum/types/templating_node_result.py,sha256=nLjZgVqCr3Zl5JIlrjfcyRJt11B8l4VCMmu-ApkAPMM,964
|
133
134
|
vellum/types/templating_node_result_data.py,sha256=kyDRROaumQFof-kIiKrchvOfh2umqCFxAh3b0Fcy5-w,976
|
134
|
-
vellum/types/templating_node_result_output.py,sha256=
|
135
|
+
vellum/types/templating_node_result_output.py,sha256=2pONPFz_AbYkZ9m5vBcPVBtP0xYzzGekb2eNPAijKEY,2287
|
135
136
|
vellum/types/templating_node_search_results_result.py,sha256=jvR3bWQsKawjlV3e2rpakTkrb7pBR1InZVV1Gzg3OjQ,982
|
136
137
|
vellum/types/templating_node_string_result.py,sha256=6RDWtxGZSPFJPSNncbT0hXRDdMjBfoftDdQfTnGwLlw,913
|
137
138
|
vellum/types/terminal_node_chat_history_result.py,sha256=4uj65lHbRA_XDKme7RKT2uKDm4pGyMjuH3qvcsnIOX0,1108
|
139
|
+
vellum/types/terminal_node_error_result.py,sha256=8Q1IJbju9DgHQQysFyk5cfBw75dQJx1vv4xhC94Ll4Y,1089
|
138
140
|
vellum/types/terminal_node_json_result.py,sha256=cXfFWr355b0C45jBIMmZC59JRMKLMWPVLctdH6bonGM,1067
|
139
141
|
vellum/types/terminal_node_number_result.py,sha256=_9J7gGGsjCwXRv_GN6NevnI4VmVutqq4O-GUuuJR8go,1044
|
140
142
|
vellum/types/terminal_node_result.py,sha256=K8b1aD9HuGF83YCHZnex8q7-WMuh52rC31_wK_PRPWU,956
|
141
143
|
vellum/types/terminal_node_result_data.py,sha256=Ev4xZWdWp6vu0YQljVvSpV5J360pf-K-hE3s10C5Ijs,968
|
142
|
-
vellum/types/terminal_node_result_output.py,sha256=
|
144
|
+
vellum/types/terminal_node_result_output.py,sha256=KVM-9BYiIsOli3c_1UJcABY56vuBuFHjBhpAc8UfugM,2225
|
143
145
|
vellum/types/terminal_node_search_results_result.py,sha256=McUYdCDNtbQGxTLhdOEevdowY0tok4on8ylMMLXYm24,1113
|
144
146
|
vellum/types/terminal_node_string_result.py,sha256=iAtk5T5y9m1bee93BKsJZlLavow5H0Xf2hKa0F_nnD8,1044
|
145
147
|
vellum/types/test_suite_test_case.py,sha256=z0c1OPNv3-W33YjRVg7-Dp_2Q5Mljx1zLO7s4YN2knQ,1562
|
146
148
|
vellum/types/upload_document_error_response.py,sha256=j2NahdS7jnklF9sGIaw7SbDEa3QhnzsDG3mG6prbGSQ,886
|
147
149
|
vellum/types/upload_document_response.py,sha256=6SY4OqEHIg_EUgOwU2rSdWeNDQULUt2LZv6zN-QCJ7Y,956
|
150
|
+
vellum/types/vellum_error.py,sha256=rO2oP5qbRRpk17X5D-Gf8Ea2oSkqkZpp7n71Dz-Qivw,957
|
151
|
+
vellum/types/vellum_error_code_enum.py,sha256=q06lQbmAjeGDSTKKOoySVdG2lvgk_wPC9NGrafmy8ik,969
|
148
152
|
vellum/types/vellum_variable.py,sha256=mVchGYwlkdti5QKb4nTqalA_rotmwhI0fLlT-dmrweQ,964
|
149
|
-
vellum/types/vellum_variable_type.py,sha256=
|
153
|
+
vellum/types/vellum_variable_type.py,sha256=8cmoS9sONgpgqMa7E5silUrWZJ7H4KodME-EFc7uSBs,1319
|
150
154
|
vellum/types/workflow_event_error.py,sha256=X1jEuhnsZoh75FN6XpTvtbO67UD_1SiACsBk5bhn3wQ,1001
|
151
155
|
vellum/types/workflow_execution_actual_chat_history_request.py,sha256=skI-SuvBfJc8wxH2EDMqyKCGUgjfFFBUPkCLyncHgmM,2014
|
152
156
|
vellum/types/workflow_execution_actual_json_request.py,sha256=hVKpBukLehwDUopO7iiKv-wTvxDDg4SXMYmmexZDMo0,1951
|
@@ -163,13 +167,14 @@ vellum/types/workflow_request_input_request.py,sha256=ffPjQ9OakOFcQx5yuCjitvtkHC
|
|
163
167
|
vellum/types/workflow_request_json_input_request.py,sha256=VbcQsnTp4myLN_wRSmkxMJILaDgaPjZQKovNTpkp1Is,1009
|
164
168
|
vellum/types/workflow_request_string_input_request.py,sha256=L1Zl1_K7Tlqjaz5pJfb8Q4GG2BVKWJzw2Wos6IEJpxM,986
|
165
169
|
vellum/types/workflow_result_event.py,sha256=lMguy0yzxJKx_9F6KHb_3kz-52iUk-bN6gFmSCyQGrw,1245
|
166
|
-
vellum/types/workflow_result_event_output_data.py,sha256=
|
170
|
+
vellum/types/workflow_result_event_output_data.py,sha256=WugPeifmg-x5Ef6hFZ6L3gQC68_e57Q-xThlcWEBhlA,2500
|
167
171
|
vellum/types/workflow_result_event_output_data_chat_history.py,sha256=g-pnQ0q_z_2sAi6YqK6ZkxiJsEHmNcDb9i-UNxvL9JY,1318
|
172
|
+
vellum/types/workflow_result_event_output_data_error.py,sha256=YXW7hOIwEtaRsCPbNcf-FlogY-gmbd2aklhGsCb73vg,1299
|
168
173
|
vellum/types/workflow_result_event_output_data_json.py,sha256=jWazBChbXRuNitkENjA1ITbpe61g1ZE06arsycPccwY,1277
|
169
174
|
vellum/types/workflow_result_event_output_data_number.py,sha256=k4XL7IZONzsa-yTjpRtnadf9Nr0WaY_eMmDD_twI_eM,1254
|
170
175
|
vellum/types/workflow_result_event_output_data_search_results.py,sha256=frCaJ5kWrIqCeV-waBNfd7rO4fqWe5aYpSI8PM4-oRw,1323
|
171
176
|
vellum/types/workflow_result_event_output_data_string.py,sha256=TByZxyQh9ci4UIdEmoEi_JK1U_JwYCnVZeB_4kGuXKM,1405
|
172
177
|
vellum/types/workflow_stream_event.py,sha256=OQUSzwoM-OCfWxNzeOVVLsjCue_WWqin3tGMtwvp_rc,873
|
173
|
-
vellum_ai-0.0.
|
174
|
-
vellum_ai-0.0.
|
175
|
-
vellum_ai-0.0.
|
178
|
+
vellum_ai-0.0.44.dist-info/METADATA,sha256=nrHXw1e10WO4KFnQ0n7F5o4H7K96QbDUw5UTvfs6_Ko,3483
|
179
|
+
vellum_ai-0.0.44.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
180
|
+
vellum_ai-0.0.44.dist-info/RECORD,,
|
@@ -1,22 +0,0 @@
|
|
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 ModelTypeDeprecated(str, enum.Enum):
|
10
|
-
"""
|
11
|
-
* `GENERATE` - Generate
|
12
|
-
* `CLASSIFY` - Classify
|
13
|
-
"""
|
14
|
-
|
15
|
-
GENERATE = "GENERATE"
|
16
|
-
CLASSIFY = "CLASSIFY"
|
17
|
-
|
18
|
-
def visit(self, generate: typing.Callable[[], T_Result], classify: typing.Callable[[], T_Result]) -> T_Result:
|
19
|
-
if self is ModelTypeDeprecated.GENERATE:
|
20
|
-
return generate()
|
21
|
-
if self is ModelTypeDeprecated.CLASSIFY:
|
22
|
-
return classify()
|
File without changes
|