vellum-ai 1.4.2__py3-none-any.whl → 1.5.1__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 +14 -0
- vellum/client/__init__.py +3 -0
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/reference.md +160 -0
- vellum/client/resources/__init__.py +2 -0
- vellum/client/resources/integrations/__init__.py +4 -0
- vellum/client/resources/integrations/client.py +260 -0
- vellum/client/resources/integrations/raw_client.py +267 -0
- vellum/client/types/__init__.py +12 -0
- vellum/client/types/components_schemas_composio_execute_tool_request.py +5 -0
- vellum/client/types/components_schemas_composio_execute_tool_response.py +5 -0
- vellum/client/types/components_schemas_composio_tool_definition.py +5 -0
- vellum/client/types/composio_execute_tool_request.py +24 -0
- vellum/client/types/composio_execute_tool_response.py +24 -0
- vellum/client/types/composio_tool_definition.py +26 -0
- vellum/client/types/vellum_error_code_enum.py +2 -0
- vellum/client/types/vellum_sdk_error.py +1 -0
- vellum/client/types/workflow_event_error.py +1 -0
- vellum/resources/integrations/__init__.py +3 -0
- vellum/resources/integrations/client.py +3 -0
- vellum/resources/integrations/raw_client.py +3 -0
- vellum/types/components_schemas_composio_execute_tool_request.py +3 -0
- vellum/types/components_schemas_composio_execute_tool_response.py +3 -0
- vellum/types/components_schemas_composio_tool_definition.py +3 -0
- vellum/types/composio_execute_tool_request.py +3 -0
- vellum/types/composio_execute_tool_response.py +3 -0
- vellum/types/composio_tool_definition.py +3 -0
- vellum/workflows/descriptors/utils.py +3 -0
- vellum/workflows/emitters/vellum_emitter.py +4 -1
- vellum/workflows/integrations/__init__.py +5 -0
- vellum/workflows/integrations/tests/__init__.py +0 -0
- vellum/workflows/integrations/tests/test_vellum_integration_service.py +225 -0
- vellum/workflows/integrations/vellum_integration_service.py +96 -0
- vellum/workflows/nodes/bases/base.py +24 -3
- vellum/workflows/nodes/core/inline_subworkflow_node/node.py +5 -0
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py +2 -5
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +38 -4
- vellum/workflows/runner/runner.py +132 -110
- vellum/workflows/utils/functions.py +29 -18
- vellum/workflows/utils/tests/test_functions.py +40 -0
- vellum/workflows/workflows/base.py +23 -5
- vellum/workflows/workflows/tests/test_base_workflow.py +99 -0
- {vellum_ai-1.4.2.dist-info → vellum_ai-1.5.1.dist-info}/METADATA +1 -1
- {vellum_ai-1.4.2.dist-info → vellum_ai-1.5.1.dist-info}/RECORD +64 -41
- vellum_ai-1.5.1.dist-info/entry_points.txt +4 -0
- vellum_ee/assets/node-definitions.json +833 -0
- vellum_ee/scripts/generate_node_definitions.py +89 -0
- vellum_ee/workflows/display/nodes/base_node_display.py +6 -3
- vellum_ee/workflows/display/nodes/vellum/api_node.py +4 -7
- vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py +19 -5
- vellum_ee/workflows/display/nodes/vellum/retry_node.py +2 -3
- vellum_ee/workflows/display/nodes/vellum/search_node.py +3 -6
- vellum_ee/workflows/display/nodes/vellum/templating_node.py +1 -1
- vellum_ee/workflows/display/nodes/vellum/tests/test_utils.py +2 -3
- vellum_ee/workflows/display/nodes/vellum/try_node.py +3 -4
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py +5 -11
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_outputs_serialization.py +1 -1
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py +1 -1
- vellum_ee/workflows/display/types.py +3 -3
- vellum_ee/workflows/display/utils/expressions.py +10 -3
- vellum_ee/workflows/display/utils/vellum.py +9 -2
- vellum_ee/workflows/display/workflows/base_workflow_display.py +2 -2
- vellum_ai-1.4.2.dist-info/entry_points.txt +0 -3
- {vellum_ai-1.4.2.dist-info → vellum_ai-1.5.1.dist-info}/LICENSE +0 -0
- {vellum_ai-1.4.2.dist-info → vellum_ai-1.5.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,267 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
from json.decoder import JSONDecodeError
|
5
|
+
|
6
|
+
from ...core.api_error import ApiError
|
7
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
8
|
+
from ...core.http_response import AsyncHttpResponse, HttpResponse
|
9
|
+
from ...core.jsonable_encoder import jsonable_encoder
|
10
|
+
from ...core.pydantic_utilities import parse_obj_as
|
11
|
+
from ...core.request_options import RequestOptions
|
12
|
+
from ...errors.bad_request_error import BadRequestError
|
13
|
+
from ...types.components_schemas_composio_execute_tool_response import ComponentsSchemasComposioExecuteToolResponse
|
14
|
+
from ...types.components_schemas_composio_tool_definition import ComponentsSchemasComposioToolDefinition
|
15
|
+
|
16
|
+
# this is used as the default value for optional parameters
|
17
|
+
OMIT = typing.cast(typing.Any, ...)
|
18
|
+
|
19
|
+
|
20
|
+
class RawIntegrationsClient:
|
21
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
22
|
+
self._client_wrapper = client_wrapper
|
23
|
+
|
24
|
+
def retrieve_integration_tool_definition(
|
25
|
+
self,
|
26
|
+
integration: str,
|
27
|
+
provider: str,
|
28
|
+
tool_name: str,
|
29
|
+
*,
|
30
|
+
request_options: typing.Optional[RequestOptions] = None,
|
31
|
+
) -> HttpResponse[ComponentsSchemasComposioToolDefinition]:
|
32
|
+
"""
|
33
|
+
Parameters
|
34
|
+
----------
|
35
|
+
integration : str
|
36
|
+
The integration name
|
37
|
+
|
38
|
+
provider : str
|
39
|
+
The integration provider name
|
40
|
+
|
41
|
+
tool_name : str
|
42
|
+
The tool's unique name, as specified by the integration provider
|
43
|
+
|
44
|
+
request_options : typing.Optional[RequestOptions]
|
45
|
+
Request-specific configuration.
|
46
|
+
|
47
|
+
Returns
|
48
|
+
-------
|
49
|
+
HttpResponse[ComponentsSchemasComposioToolDefinition]
|
50
|
+
|
51
|
+
"""
|
52
|
+
_response = self._client_wrapper.httpx_client.request(
|
53
|
+
f"integrations/v1/providers/{jsonable_encoder(provider)}/integrations/{jsonable_encoder(integration)}/tools/{jsonable_encoder(tool_name)}",
|
54
|
+
base_url=self._client_wrapper.get_environment().default,
|
55
|
+
method="GET",
|
56
|
+
request_options=request_options,
|
57
|
+
)
|
58
|
+
try:
|
59
|
+
if 200 <= _response.status_code < 300:
|
60
|
+
_data = typing.cast(
|
61
|
+
ComponentsSchemasComposioToolDefinition,
|
62
|
+
parse_obj_as(
|
63
|
+
type_=ComponentsSchemasComposioToolDefinition, # type: ignore
|
64
|
+
object_=_response.json(),
|
65
|
+
),
|
66
|
+
)
|
67
|
+
return HttpResponse(response=_response, data=_data)
|
68
|
+
_response_json = _response.json()
|
69
|
+
except JSONDecodeError:
|
70
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
71
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
72
|
+
|
73
|
+
def execute_integration_tool(
|
74
|
+
self,
|
75
|
+
integration: str,
|
76
|
+
provider: str,
|
77
|
+
tool_name: str,
|
78
|
+
*,
|
79
|
+
arguments: typing.Dict[str, typing.Optional[typing.Any]],
|
80
|
+
request_options: typing.Optional[RequestOptions] = None,
|
81
|
+
) -> HttpResponse[ComponentsSchemasComposioExecuteToolResponse]:
|
82
|
+
"""
|
83
|
+
Parameters
|
84
|
+
----------
|
85
|
+
integration : str
|
86
|
+
The integration name
|
87
|
+
|
88
|
+
provider : str
|
89
|
+
The integration provider name
|
90
|
+
|
91
|
+
tool_name : str
|
92
|
+
The tool's unique name, as specified by the integration provider
|
93
|
+
|
94
|
+
arguments : typing.Dict[str, typing.Optional[typing.Any]]
|
95
|
+
|
96
|
+
request_options : typing.Optional[RequestOptions]
|
97
|
+
Request-specific configuration.
|
98
|
+
|
99
|
+
Returns
|
100
|
+
-------
|
101
|
+
HttpResponse[ComponentsSchemasComposioExecuteToolResponse]
|
102
|
+
|
103
|
+
"""
|
104
|
+
_response = self._client_wrapper.httpx_client.request(
|
105
|
+
f"integrations/v1/providers/{jsonable_encoder(provider)}/integrations/{jsonable_encoder(integration)}/tools/{jsonable_encoder(tool_name)}/execute",
|
106
|
+
base_url=self._client_wrapper.get_environment().default,
|
107
|
+
method="POST",
|
108
|
+
json={
|
109
|
+
"arguments": arguments,
|
110
|
+
"provider": "COMPOSIO",
|
111
|
+
},
|
112
|
+
headers={
|
113
|
+
"content-type": "application/json",
|
114
|
+
},
|
115
|
+
request_options=request_options,
|
116
|
+
omit=OMIT,
|
117
|
+
)
|
118
|
+
try:
|
119
|
+
if 200 <= _response.status_code < 300:
|
120
|
+
_data = typing.cast(
|
121
|
+
ComponentsSchemasComposioExecuteToolResponse,
|
122
|
+
parse_obj_as(
|
123
|
+
type_=ComponentsSchemasComposioExecuteToolResponse, # type: ignore
|
124
|
+
object_=_response.json(),
|
125
|
+
),
|
126
|
+
)
|
127
|
+
return HttpResponse(response=_response, data=_data)
|
128
|
+
if _response.status_code == 400:
|
129
|
+
raise BadRequestError(
|
130
|
+
headers=dict(_response.headers),
|
131
|
+
body=typing.cast(
|
132
|
+
typing.Optional[typing.Any],
|
133
|
+
parse_obj_as(
|
134
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
135
|
+
object_=_response.json(),
|
136
|
+
),
|
137
|
+
),
|
138
|
+
)
|
139
|
+
_response_json = _response.json()
|
140
|
+
except JSONDecodeError:
|
141
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
142
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
143
|
+
|
144
|
+
|
145
|
+
class AsyncRawIntegrationsClient:
|
146
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
147
|
+
self._client_wrapper = client_wrapper
|
148
|
+
|
149
|
+
async def retrieve_integration_tool_definition(
|
150
|
+
self,
|
151
|
+
integration: str,
|
152
|
+
provider: str,
|
153
|
+
tool_name: str,
|
154
|
+
*,
|
155
|
+
request_options: typing.Optional[RequestOptions] = None,
|
156
|
+
) -> AsyncHttpResponse[ComponentsSchemasComposioToolDefinition]:
|
157
|
+
"""
|
158
|
+
Parameters
|
159
|
+
----------
|
160
|
+
integration : str
|
161
|
+
The integration name
|
162
|
+
|
163
|
+
provider : str
|
164
|
+
The integration provider name
|
165
|
+
|
166
|
+
tool_name : str
|
167
|
+
The tool's unique name, as specified by the integration provider
|
168
|
+
|
169
|
+
request_options : typing.Optional[RequestOptions]
|
170
|
+
Request-specific configuration.
|
171
|
+
|
172
|
+
Returns
|
173
|
+
-------
|
174
|
+
AsyncHttpResponse[ComponentsSchemasComposioToolDefinition]
|
175
|
+
|
176
|
+
"""
|
177
|
+
_response = await self._client_wrapper.httpx_client.request(
|
178
|
+
f"integrations/v1/providers/{jsonable_encoder(provider)}/integrations/{jsonable_encoder(integration)}/tools/{jsonable_encoder(tool_name)}",
|
179
|
+
base_url=self._client_wrapper.get_environment().default,
|
180
|
+
method="GET",
|
181
|
+
request_options=request_options,
|
182
|
+
)
|
183
|
+
try:
|
184
|
+
if 200 <= _response.status_code < 300:
|
185
|
+
_data = typing.cast(
|
186
|
+
ComponentsSchemasComposioToolDefinition,
|
187
|
+
parse_obj_as(
|
188
|
+
type_=ComponentsSchemasComposioToolDefinition, # type: ignore
|
189
|
+
object_=_response.json(),
|
190
|
+
),
|
191
|
+
)
|
192
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
193
|
+
_response_json = _response.json()
|
194
|
+
except JSONDecodeError:
|
195
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
196
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
197
|
+
|
198
|
+
async def execute_integration_tool(
|
199
|
+
self,
|
200
|
+
integration: str,
|
201
|
+
provider: str,
|
202
|
+
tool_name: str,
|
203
|
+
*,
|
204
|
+
arguments: typing.Dict[str, typing.Optional[typing.Any]],
|
205
|
+
request_options: typing.Optional[RequestOptions] = None,
|
206
|
+
) -> AsyncHttpResponse[ComponentsSchemasComposioExecuteToolResponse]:
|
207
|
+
"""
|
208
|
+
Parameters
|
209
|
+
----------
|
210
|
+
integration : str
|
211
|
+
The integration name
|
212
|
+
|
213
|
+
provider : str
|
214
|
+
The integration provider name
|
215
|
+
|
216
|
+
tool_name : str
|
217
|
+
The tool's unique name, as specified by the integration provider
|
218
|
+
|
219
|
+
arguments : typing.Dict[str, typing.Optional[typing.Any]]
|
220
|
+
|
221
|
+
request_options : typing.Optional[RequestOptions]
|
222
|
+
Request-specific configuration.
|
223
|
+
|
224
|
+
Returns
|
225
|
+
-------
|
226
|
+
AsyncHttpResponse[ComponentsSchemasComposioExecuteToolResponse]
|
227
|
+
|
228
|
+
"""
|
229
|
+
_response = await self._client_wrapper.httpx_client.request(
|
230
|
+
f"integrations/v1/providers/{jsonable_encoder(provider)}/integrations/{jsonable_encoder(integration)}/tools/{jsonable_encoder(tool_name)}/execute",
|
231
|
+
base_url=self._client_wrapper.get_environment().default,
|
232
|
+
method="POST",
|
233
|
+
json={
|
234
|
+
"arguments": arguments,
|
235
|
+
"provider": "COMPOSIO",
|
236
|
+
},
|
237
|
+
headers={
|
238
|
+
"content-type": "application/json",
|
239
|
+
},
|
240
|
+
request_options=request_options,
|
241
|
+
omit=OMIT,
|
242
|
+
)
|
243
|
+
try:
|
244
|
+
if 200 <= _response.status_code < 300:
|
245
|
+
_data = typing.cast(
|
246
|
+
ComponentsSchemasComposioExecuteToolResponse,
|
247
|
+
parse_obj_as(
|
248
|
+
type_=ComponentsSchemasComposioExecuteToolResponse, # type: ignore
|
249
|
+
object_=_response.json(),
|
250
|
+
),
|
251
|
+
)
|
252
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
253
|
+
if _response.status_code == 400:
|
254
|
+
raise BadRequestError(
|
255
|
+
headers=dict(_response.headers),
|
256
|
+
body=typing.cast(
|
257
|
+
typing.Optional[typing.Any],
|
258
|
+
parse_obj_as(
|
259
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
260
|
+
object_=_response.json(),
|
261
|
+
),
|
262
|
+
),
|
263
|
+
)
|
264
|
+
_response_json = _response.json()
|
265
|
+
except JSONDecodeError:
|
266
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
267
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
vellum/client/types/__init__.py
CHANGED
@@ -72,9 +72,15 @@ from .code_executor_secret_input import CodeExecutorSecretInput
|
|
72
72
|
from .code_resource_definition import CodeResourceDefinition
|
73
73
|
from .compile_prompt_deployment_expand_meta_request import CompilePromptDeploymentExpandMetaRequest
|
74
74
|
from .compile_prompt_meta import CompilePromptMeta
|
75
|
+
from .components_schemas_composio_execute_tool_request import ComponentsSchemasComposioExecuteToolRequest
|
76
|
+
from .components_schemas_composio_execute_tool_response import ComponentsSchemasComposioExecuteToolResponse
|
77
|
+
from .components_schemas_composio_tool_definition import ComponentsSchemasComposioToolDefinition
|
75
78
|
from .components_schemas_pdf_search_result_meta_source import ComponentsSchemasPdfSearchResultMetaSource
|
76
79
|
from .components_schemas_pdf_search_result_meta_source_request import ComponentsSchemasPdfSearchResultMetaSourceRequest
|
77
80
|
from .components_schemas_prompt_version_build_config_sandbox import ComponentsSchemasPromptVersionBuildConfigSandbox
|
81
|
+
from .composio_execute_tool_request import ComposioExecuteToolRequest
|
82
|
+
from .composio_execute_tool_response import ComposioExecuteToolResponse
|
83
|
+
from .composio_tool_definition import ComposioToolDefinition
|
78
84
|
from .condition_combinator import ConditionCombinator
|
79
85
|
from .conditional_node_result import ConditionalNodeResult
|
80
86
|
from .conditional_node_result_data import ConditionalNodeResultData
|
@@ -758,9 +764,15 @@ __all__ = [
|
|
758
764
|
"CodeResourceDefinition",
|
759
765
|
"CompilePromptDeploymentExpandMetaRequest",
|
760
766
|
"CompilePromptMeta",
|
767
|
+
"ComponentsSchemasComposioExecuteToolRequest",
|
768
|
+
"ComponentsSchemasComposioExecuteToolResponse",
|
769
|
+
"ComponentsSchemasComposioToolDefinition",
|
761
770
|
"ComponentsSchemasPdfSearchResultMetaSource",
|
762
771
|
"ComponentsSchemasPdfSearchResultMetaSourceRequest",
|
763
772
|
"ComponentsSchemasPromptVersionBuildConfigSandbox",
|
773
|
+
"ComposioExecuteToolRequest",
|
774
|
+
"ComposioExecuteToolResponse",
|
775
|
+
"ComposioToolDefinition",
|
764
776
|
"ConditionCombinator",
|
765
777
|
"ConditionalNodeResult",
|
766
778
|
"ConditionalNodeResultData",
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
|
5
|
+
import pydantic
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
7
|
+
|
8
|
+
|
9
|
+
class ComposioExecuteToolRequest(UniversalBaseModel):
|
10
|
+
"""
|
11
|
+
Payload for executing a Composio tool with provider id and tool arguments.
|
12
|
+
"""
|
13
|
+
|
14
|
+
provider: typing.Literal["COMPOSIO"] = "COMPOSIO"
|
15
|
+
arguments: typing.Dict[str, typing.Optional[typing.Any]]
|
16
|
+
|
17
|
+
if IS_PYDANTIC_V2:
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
19
|
+
else:
|
20
|
+
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
|
5
|
+
import pydantic
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
7
|
+
|
8
|
+
|
9
|
+
class ComposioExecuteToolResponse(UniversalBaseModel):
|
10
|
+
"""
|
11
|
+
Response payload with provider id and execution output from a Composio tool.
|
12
|
+
"""
|
13
|
+
|
14
|
+
provider: typing.Literal["COMPOSIO"] = "COMPOSIO"
|
15
|
+
data: typing.Dict[str, typing.Optional[typing.Any]]
|
16
|
+
|
17
|
+
if IS_PYDANTIC_V2:
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
19
|
+
else:
|
20
|
+
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
|
5
|
+
import pydantic
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
7
|
+
|
8
|
+
|
9
|
+
class ComposioToolDefinition(UniversalBaseModel):
|
10
|
+
"""
|
11
|
+
Serializer for Composio tool definition response.
|
12
|
+
"""
|
13
|
+
|
14
|
+
provider: typing.Literal["COMPOSIO"] = "COMPOSIO"
|
15
|
+
name: str
|
16
|
+
description: str
|
17
|
+
parameters: typing.Dict[str, typing.Optional[typing.Any]]
|
18
|
+
|
19
|
+
if IS_PYDANTIC_V2:
|
20
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
21
|
+
else:
|
22
|
+
|
23
|
+
class Config:
|
24
|
+
frozen = True
|
25
|
+
smart_union = True
|
26
|
+
extra = pydantic.Extra.allow
|
@@ -7,9 +7,11 @@ VellumErrorCodeEnum = typing.Union[
|
|
7
7
|
"INVALID_REQUEST",
|
8
8
|
"INVALID_INPUTS",
|
9
9
|
"PROVIDER_ERROR",
|
10
|
+
"PROVIDER_CREDENTIALS_AVAILABLE",
|
10
11
|
"REQUEST_TIMEOUT",
|
11
12
|
"INTERNAL_SERVER_ERROR",
|
12
13
|
"USER_DEFINED_ERROR",
|
14
|
+
"WORKFLOW_CANCELLED",
|
13
15
|
],
|
14
16
|
typing.Any,
|
15
17
|
]
|
@@ -10,6 +10,7 @@ from .vellum_sdk_error_code_enum import VellumSdkErrorCodeEnum
|
|
10
10
|
class VellumSdkError(UniversalBaseModel):
|
11
11
|
message: str
|
12
12
|
code: VellumSdkErrorCodeEnum
|
13
|
+
raw_data: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
13
14
|
|
14
15
|
if IS_PYDANTIC_V2:
|
15
16
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
@@ -10,6 +10,7 @@ from .workflow_execution_event_error_code import WorkflowExecutionEventErrorCode
|
|
10
10
|
class WorkflowEventError(UniversalBaseModel):
|
11
11
|
message: str
|
12
12
|
code: WorkflowExecutionEventErrorCode
|
13
|
+
raw_data: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
13
14
|
stacktrace: typing.Optional[str] = None
|
14
15
|
|
15
16
|
if IS_PYDANTIC_V2:
|
@@ -126,7 +126,10 @@ class VellumEmitter(BaseWorkflowEmitter):
|
|
126
126
|
return
|
127
127
|
|
128
128
|
client = self._context.vellum_client
|
129
|
-
|
129
|
+
if self._timeout is not None:
|
130
|
+
request_options = RequestOptions(timeout_in_seconds=int(self._timeout), max_retries=self._max_retries)
|
131
|
+
else:
|
132
|
+
request_options = RequestOptions(max_retries=self._max_retries)
|
130
133
|
|
131
134
|
client.events.create(
|
132
135
|
# The API accepts a ClientWorkflowEvent but our SDK emits an SDKWorkflowEvent. These shapes are
|
File without changes
|