vellum-ai 1.0.11__py3-none-any.whl → 1.1.0__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 +2 -2
- vellum/client/__init__.py +0 -4
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/reference.md +2 -3
- vellum/client/resources/__init__.py +0 -2
- vellum/client/resources/workflow_deployments/client.py +119 -0
- vellum/client/types/__init__.py +2 -0
- vellum/client/types/api_request_parent_context.py +1 -0
- vellum/client/types/external_parent_context.py +36 -0
- vellum/client/types/node_execution_fulfilled_event.py +1 -0
- vellum/client/types/node_execution_initiated_event.py +1 -0
- vellum/client/types/node_execution_paused_event.py +1 -0
- vellum/client/types/node_execution_rejected_event.py +1 -0
- vellum/client/types/node_execution_resumed_event.py +1 -0
- vellum/client/types/node_execution_span.py +1 -0
- vellum/client/types/node_execution_span_attributes.py +1 -0
- vellum/client/types/node_execution_streaming_event.py +1 -0
- vellum/client/types/node_parent_context.py +1 -0
- vellum/client/types/parent_context.py +2 -0
- vellum/client/types/prompt_deployment_parent_context.py +1 -0
- vellum/client/types/slim_workflow_execution_read.py +1 -0
- vellum/client/types/span_link.py +1 -0
- vellum/client/types/workflow_deployment_event_executions_response.py +1 -0
- vellum/client/types/workflow_deployment_parent_context.py +1 -0
- vellum/client/types/workflow_event_execution_read.py +1 -0
- vellum/client/types/workflow_execution_detail.py +1 -0
- vellum/client/types/workflow_execution_fulfilled_event.py +1 -0
- vellum/client/types/workflow_execution_initiated_event.py +1 -0
- vellum/client/types/workflow_execution_paused_event.py +1 -0
- vellum/client/types/workflow_execution_rejected_event.py +1 -0
- vellum/client/types/workflow_execution_resumed_event.py +1 -0
- vellum/client/types/workflow_execution_snapshotted_event.py +1 -0
- vellum/client/types/workflow_execution_span.py +1 -0
- vellum/client/types/workflow_execution_span_attributes.py +1 -0
- vellum/client/types/workflow_execution_streaming_event.py +1 -0
- vellum/client/types/workflow_parent_context.py +1 -0
- vellum/client/types/workflow_sandbox_parent_context.py +1 -0
- vellum/{resources/release_reviews/__init__.py → types/external_parent_context.py} +1 -1
- vellum/workflows/emitters/vellum_emitter.py +3 -2
- vellum/workflows/events/types.py +6 -0
- vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +5 -15
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +6 -0
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +75 -0
- vellum/workflows/state/context.py +13 -2
- vellum/workflows/types/definition.py +2 -2
- vellum/workflows/types/tests/test_definition.py +2 -3
- vellum/workflows/utils/functions.py +1 -1
- vellum/workflows/utils/tests/test_functions.py +3 -3
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.0.dist-info}/METADATA +1 -1
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.0.dist-info}/RECORD +57 -58
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +93 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +98 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_workflow_deployment_serialization.py +1 -1
- vellum_ee/workflows/display/utils/expressions.py +1 -1
- vellum/client/resources/release_reviews/__init__.py +0 -2
- vellum/client/resources/release_reviews/client.py +0 -139
- vellum/resources/release_reviews/client.py +0 -3
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.0.dist-info}/LICENSE +0 -0
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.0.dist-info}/WHEEL +0 -0
- {vellum_ai-1.0.11.dist-info → vellum_ai-1.1.0.dist-info}/entry_points.txt +0 -0
vellum/__init__.py
CHANGED
@@ -124,6 +124,7 @@ from .client.types import (
|
|
124
124
|
ExecutionThinkingVellumValue,
|
125
125
|
ExecutionVellumValue,
|
126
126
|
ExternalInputDescriptor,
|
127
|
+
ExternalParentContext,
|
127
128
|
ExternalTestCaseExecution,
|
128
129
|
ExternalTestCaseExecutionRequest,
|
129
130
|
FastEmbedVectorizerBaaiBgeSmallEnV15,
|
@@ -625,7 +626,6 @@ from .resources import (
|
|
625
626
|
ml_models,
|
626
627
|
organizations,
|
627
628
|
prompts,
|
628
|
-
release_reviews,
|
629
629
|
sandboxes,
|
630
630
|
test_suite_runs,
|
631
631
|
test_suites,
|
@@ -765,6 +765,7 @@ __all__ = [
|
|
765
765
|
"ExecutionThinkingVellumValue",
|
766
766
|
"ExecutionVellumValue",
|
767
767
|
"ExternalInputDescriptor",
|
768
|
+
"ExternalParentContext",
|
768
769
|
"ExternalTestCaseExecution",
|
769
770
|
"ExternalTestCaseExecutionRequest",
|
770
771
|
"FastEmbedVectorizerBaaiBgeSmallEnV15",
|
@@ -1267,7 +1268,6 @@ __all__ = [
|
|
1267
1268
|
"ml_models",
|
1268
1269
|
"organizations",
|
1269
1270
|
"prompts",
|
1270
|
-
"release_reviews",
|
1271
1271
|
"sandboxes",
|
1272
1272
|
"test_suite_runs",
|
1273
1273
|
"test_suites",
|
vellum/client/__init__.py
CHANGED
@@ -20,7 +20,6 @@ from .resources.sandboxes.client import SandboxesClient
|
|
20
20
|
from .resources.test_suite_runs.client import TestSuiteRunsClient
|
21
21
|
from .resources.test_suites.client import TestSuitesClient
|
22
22
|
from .resources.workflow_deployments.client import WorkflowDeploymentsClient
|
23
|
-
from .resources.release_reviews.client import ReleaseReviewsClient
|
24
23
|
from .resources.workflow_executions.client import WorkflowExecutionsClient
|
25
24
|
from .resources.workflow_sandboxes.client import WorkflowSandboxesClient
|
26
25
|
from .resources.workflows.client import WorkflowsClient
|
@@ -79,7 +78,6 @@ from .resources.sandboxes.client import AsyncSandboxesClient
|
|
79
78
|
from .resources.test_suite_runs.client import AsyncTestSuiteRunsClient
|
80
79
|
from .resources.test_suites.client import AsyncTestSuitesClient
|
81
80
|
from .resources.workflow_deployments.client import AsyncWorkflowDeploymentsClient
|
82
|
-
from .resources.release_reviews.client import AsyncReleaseReviewsClient
|
83
81
|
from .resources.workflow_executions.client import AsyncWorkflowExecutionsClient
|
84
82
|
from .resources.workflow_sandboxes.client import AsyncWorkflowSandboxesClient
|
85
83
|
from .resources.workflows.client import AsyncWorkflowsClient
|
@@ -164,7 +162,6 @@ class Vellum:
|
|
164
162
|
self.test_suite_runs = TestSuiteRunsClient(client_wrapper=self._client_wrapper)
|
165
163
|
self.test_suites = TestSuitesClient(client_wrapper=self._client_wrapper)
|
166
164
|
self.workflow_deployments = WorkflowDeploymentsClient(client_wrapper=self._client_wrapper)
|
167
|
-
self.release_reviews = ReleaseReviewsClient(client_wrapper=self._client_wrapper)
|
168
165
|
self.workflow_executions = WorkflowExecutionsClient(client_wrapper=self._client_wrapper)
|
169
166
|
self.workflow_sandboxes = WorkflowSandboxesClient(client_wrapper=self._client_wrapper)
|
170
167
|
self.workflows = WorkflowsClient(client_wrapper=self._client_wrapper)
|
@@ -1599,7 +1596,6 @@ class AsyncVellum:
|
|
1599
1596
|
self.test_suite_runs = AsyncTestSuiteRunsClient(client_wrapper=self._client_wrapper)
|
1600
1597
|
self.test_suites = AsyncTestSuitesClient(client_wrapper=self._client_wrapper)
|
1601
1598
|
self.workflow_deployments = AsyncWorkflowDeploymentsClient(client_wrapper=self._client_wrapper)
|
1602
|
-
self.release_reviews = AsyncReleaseReviewsClient(client_wrapper=self._client_wrapper)
|
1603
1599
|
self.workflow_executions = AsyncWorkflowExecutionsClient(client_wrapper=self._client_wrapper)
|
1604
1600
|
self.workflow_sandboxes = AsyncWorkflowSandboxesClient(client_wrapper=self._client_wrapper)
|
1605
1601
|
self.workflows = AsyncWorkflowsClient(client_wrapper=self._client_wrapper)
|
@@ -25,10 +25,10 @@ class BaseClientWrapper:
|
|
25
25
|
|
26
26
|
def get_headers(self) -> typing.Dict[str, str]:
|
27
27
|
headers: typing.Dict[str, str] = {
|
28
|
-
"User-Agent": "vellum-ai/1.0
|
28
|
+
"User-Agent": "vellum-ai/1.1.0",
|
29
29
|
"X-Fern-Language": "Python",
|
30
30
|
"X-Fern-SDK-Name": "vellum-ai",
|
31
|
-
"X-Fern-SDK-Version": "1.0
|
31
|
+
"X-Fern-SDK-Version": "1.1.0",
|
32
32
|
}
|
33
33
|
if self._api_version is not None:
|
34
34
|
headers["X-API-Version"] = self._api_version
|
vellum/client/reference.md
CHANGED
@@ -5952,8 +5952,7 @@ client.workflow_deployments.update_workflow_release_tag(
|
|
5952
5952
|
</dl>
|
5953
5953
|
</details>
|
5954
5954
|
|
5955
|
-
|
5956
|
-
<details><summary><code>client.release_reviews.<a href="src/vellum/resources/release_reviews/client.py">retrieve_workflow_deployment_release</a>(...)</code></summary>
|
5955
|
+
<details><summary><code>client.workflow_deployments.<a href="src/vellum/resources/workflow_deployments/client.py">retrieve_workflow_deployment_release</a>(...)</code></summary>
|
5957
5956
|
<dl>
|
5958
5957
|
<dd>
|
5959
5958
|
|
@@ -5986,7 +5985,7 @@ client = Vellum(
|
|
5986
5985
|
api_version="YOUR_API_VERSION",
|
5987
5986
|
api_key="YOUR_API_KEY",
|
5988
5987
|
)
|
5989
|
-
client.
|
5988
|
+
client.workflow_deployments.retrieve_workflow_deployment_release(
|
5990
5989
|
id="id",
|
5991
5990
|
release_id_or_release_tag="release_id_or_release_tag",
|
5992
5991
|
)
|
@@ -11,7 +11,6 @@ from . import (
|
|
11
11
|
ml_models,
|
12
12
|
organizations,
|
13
13
|
prompts,
|
14
|
-
release_reviews,
|
15
14
|
sandboxes,
|
16
15
|
test_suite_runs,
|
17
16
|
test_suites,
|
@@ -46,7 +45,6 @@ __all__ = [
|
|
46
45
|
"ml_models",
|
47
46
|
"organizations",
|
48
47
|
"prompts",
|
49
|
-
"release_reviews",
|
50
48
|
"sandboxes",
|
51
49
|
"test_suite_runs",
|
52
50
|
"test_suites",
|
@@ -16,6 +16,7 @@ from ...types.workflow_deployment_history_item import WorkflowDeploymentHistoryI
|
|
16
16
|
from .types.list_workflow_release_tags_request_source import ListWorkflowReleaseTagsRequestSource
|
17
17
|
from ...types.paginated_workflow_release_tag_read_list import PaginatedWorkflowReleaseTagReadList
|
18
18
|
from ...types.workflow_release_tag_read import WorkflowReleaseTagRead
|
19
|
+
from ...types.workflow_deployment_release import WorkflowDeploymentRelease
|
19
20
|
from ...core.client_wrapper import AsyncClientWrapper
|
20
21
|
|
21
22
|
# this is used as the default value for optional parameters
|
@@ -519,6 +520,61 @@ class WorkflowDeploymentsClient:
|
|
519
520
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
520
521
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
521
522
|
|
523
|
+
def retrieve_workflow_deployment_release(
|
524
|
+
self, id: str, release_id_or_release_tag: str, *, request_options: typing.Optional[RequestOptions] = None
|
525
|
+
) -> WorkflowDeploymentRelease:
|
526
|
+
"""
|
527
|
+
Retrieve a specific Workflow Deployment Release by either its UUID or the name of a Release Tag that points to it.
|
528
|
+
|
529
|
+
Parameters
|
530
|
+
----------
|
531
|
+
id : str
|
532
|
+
Either the Workflow Deployment's ID or its unique name
|
533
|
+
|
534
|
+
release_id_or_release_tag : str
|
535
|
+
Either the UUID of Workflow Deployment Release you'd like to retrieve, or the name of a Release Tag that's pointing to the Workflow Deployment Release you'd like to retrieve.
|
536
|
+
|
537
|
+
request_options : typing.Optional[RequestOptions]
|
538
|
+
Request-specific configuration.
|
539
|
+
|
540
|
+
Returns
|
541
|
+
-------
|
542
|
+
WorkflowDeploymentRelease
|
543
|
+
|
544
|
+
|
545
|
+
Examples
|
546
|
+
--------
|
547
|
+
from vellum import Vellum
|
548
|
+
|
549
|
+
client = Vellum(
|
550
|
+
api_version="YOUR_API_VERSION",
|
551
|
+
api_key="YOUR_API_KEY",
|
552
|
+
)
|
553
|
+
client.workflow_deployments.retrieve_workflow_deployment_release(
|
554
|
+
id="id",
|
555
|
+
release_id_or_release_tag="release_id_or_release_tag",
|
556
|
+
)
|
557
|
+
"""
|
558
|
+
_response = self._client_wrapper.httpx_client.request(
|
559
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/releases/{jsonable_encoder(release_id_or_release_tag)}",
|
560
|
+
base_url=self._client_wrapper.get_environment().default,
|
561
|
+
method="GET",
|
562
|
+
request_options=request_options,
|
563
|
+
)
|
564
|
+
try:
|
565
|
+
if 200 <= _response.status_code < 300:
|
566
|
+
return typing.cast(
|
567
|
+
WorkflowDeploymentRelease,
|
568
|
+
parse_obj_as(
|
569
|
+
type_=WorkflowDeploymentRelease, # type: ignore
|
570
|
+
object_=_response.json(),
|
571
|
+
),
|
572
|
+
)
|
573
|
+
_response_json = _response.json()
|
574
|
+
except JSONDecodeError:
|
575
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
576
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
577
|
+
|
522
578
|
|
523
579
|
class AsyncWorkflowDeploymentsClient:
|
524
580
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
@@ -1082,3 +1138,66 @@ class AsyncWorkflowDeploymentsClient:
|
|
1082
1138
|
except JSONDecodeError:
|
1083
1139
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1084
1140
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
1141
|
+
|
1142
|
+
async def retrieve_workflow_deployment_release(
|
1143
|
+
self, id: str, release_id_or_release_tag: str, *, request_options: typing.Optional[RequestOptions] = None
|
1144
|
+
) -> WorkflowDeploymentRelease:
|
1145
|
+
"""
|
1146
|
+
Retrieve a specific Workflow Deployment Release by either its UUID or the name of a Release Tag that points to it.
|
1147
|
+
|
1148
|
+
Parameters
|
1149
|
+
----------
|
1150
|
+
id : str
|
1151
|
+
Either the Workflow Deployment's ID or its unique name
|
1152
|
+
|
1153
|
+
release_id_or_release_tag : str
|
1154
|
+
Either the UUID of Workflow Deployment Release you'd like to retrieve, or the name of a Release Tag that's pointing to the Workflow Deployment Release you'd like to retrieve.
|
1155
|
+
|
1156
|
+
request_options : typing.Optional[RequestOptions]
|
1157
|
+
Request-specific configuration.
|
1158
|
+
|
1159
|
+
Returns
|
1160
|
+
-------
|
1161
|
+
WorkflowDeploymentRelease
|
1162
|
+
|
1163
|
+
|
1164
|
+
Examples
|
1165
|
+
--------
|
1166
|
+
import asyncio
|
1167
|
+
|
1168
|
+
from vellum import AsyncVellum
|
1169
|
+
|
1170
|
+
client = AsyncVellum(
|
1171
|
+
api_version="YOUR_API_VERSION",
|
1172
|
+
api_key="YOUR_API_KEY",
|
1173
|
+
)
|
1174
|
+
|
1175
|
+
|
1176
|
+
async def main() -> None:
|
1177
|
+
await client.workflow_deployments.retrieve_workflow_deployment_release(
|
1178
|
+
id="id",
|
1179
|
+
release_id_or_release_tag="release_id_or_release_tag",
|
1180
|
+
)
|
1181
|
+
|
1182
|
+
|
1183
|
+
asyncio.run(main())
|
1184
|
+
"""
|
1185
|
+
_response = await self._client_wrapper.httpx_client.request(
|
1186
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/releases/{jsonable_encoder(release_id_or_release_tag)}",
|
1187
|
+
base_url=self._client_wrapper.get_environment().default,
|
1188
|
+
method="GET",
|
1189
|
+
request_options=request_options,
|
1190
|
+
)
|
1191
|
+
try:
|
1192
|
+
if 200 <= _response.status_code < 300:
|
1193
|
+
return typing.cast(
|
1194
|
+
WorkflowDeploymentRelease,
|
1195
|
+
parse_obj_as(
|
1196
|
+
type_=WorkflowDeploymentRelease, # type: ignore
|
1197
|
+
object_=_response.json(),
|
1198
|
+
),
|
1199
|
+
)
|
1200
|
+
_response_json = _response.json()
|
1201
|
+
except JSONDecodeError:
|
1202
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
1203
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
vellum/client/types/__init__.py
CHANGED
@@ -128,6 +128,7 @@ from .execution_string_vellum_value import ExecutionStringVellumValue
|
|
128
128
|
from .execution_thinking_vellum_value import ExecutionThinkingVellumValue
|
129
129
|
from .execution_vellum_value import ExecutionVellumValue
|
130
130
|
from .external_input_descriptor import ExternalInputDescriptor
|
131
|
+
from .external_parent_context import ExternalParentContext
|
131
132
|
from .external_test_case_execution import ExternalTestCaseExecution
|
132
133
|
from .external_test_case_execution_request import ExternalTestCaseExecutionRequest
|
133
134
|
from .fast_embed_vectorizer_baai_bge_small_en_v_15 import FastEmbedVectorizerBaaiBgeSmallEnV15
|
@@ -751,6 +752,7 @@ __all__ = [
|
|
751
752
|
"ExecutionThinkingVellumValue",
|
752
753
|
"ExecutionVellumValue",
|
753
754
|
"ExternalInputDescriptor",
|
755
|
+
"ExternalParentContext",
|
754
756
|
"ExternalTestCaseExecution",
|
755
757
|
"ExternalTestCaseExecutionRequest",
|
756
758
|
"FastEmbedVectorizerBaaiBgeSmallEnV15",
|
@@ -24,6 +24,7 @@ class ApiRequestParentContext(UniversalBaseModel):
|
|
24
24
|
extra = pydantic.Extra.allow
|
25
25
|
|
26
26
|
|
27
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
27
28
|
from .node_parent_context import NodeParentContext # noqa: E402
|
28
29
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
29
30
|
from .span_link import SpanLink # noqa: E402
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
5
|
+
import typing
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
8
|
+
from ..core.pydantic_utilities import update_forward_refs
|
9
|
+
|
10
|
+
|
11
|
+
class ExternalParentContext(UniversalBaseModel):
|
12
|
+
parent: typing.Optional["ParentContext"] = None
|
13
|
+
links: typing.Optional[typing.List["SpanLink"]] = None
|
14
|
+
type: typing.Literal["EXTERNAL"] = "EXTERNAL"
|
15
|
+
span_id: str
|
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
|
25
|
+
|
26
|
+
|
27
|
+
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
28
|
+
from .node_parent_context import NodeParentContext # noqa: E402
|
29
|
+
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
30
|
+
from .span_link import SpanLink # noqa: E402
|
31
|
+
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext # noqa: E402
|
32
|
+
from .workflow_parent_context import WorkflowParentContext # noqa: E402
|
33
|
+
from .workflow_sandbox_parent_context import WorkflowSandboxParentContext # noqa: E402
|
34
|
+
from .parent_context import ParentContext # noqa: E402
|
35
|
+
|
36
|
+
update_forward_refs(ExternalParentContext)
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -27,6 +27,7 @@ class NodeParentContext(UniversalBaseModel):
|
|
27
27
|
|
28
28
|
|
29
29
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
30
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
30
31
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
31
32
|
from .span_link import SpanLink # noqa: E402
|
32
33
|
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext # noqa: E402
|
@@ -11,6 +11,7 @@ if typing.TYPE_CHECKING:
|
|
11
11
|
from .workflow_sandbox_parent_context import WorkflowSandboxParentContext
|
12
12
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
13
13
|
from .api_request_parent_context import ApiRequestParentContext
|
14
|
+
from .external_parent_context import ExternalParentContext
|
14
15
|
ParentContext = typing.Union[
|
15
16
|
"WorkflowParentContext",
|
16
17
|
"NodeParentContext",
|
@@ -18,4 +19,5 @@ ParentContext = typing.Union[
|
|
18
19
|
"WorkflowSandboxParentContext",
|
19
20
|
"PromptDeploymentParentContext",
|
20
21
|
"ApiRequestParentContext",
|
22
|
+
"ExternalParentContext",
|
21
23
|
]
|
@@ -33,6 +33,7 @@ class PromptDeploymentParentContext(UniversalBaseModel):
|
|
33
33
|
|
34
34
|
|
35
35
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
36
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
36
37
|
from .node_parent_context import NodeParentContext # noqa: E402
|
37
38
|
from .span_link import SpanLink # noqa: E402
|
38
39
|
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext # noqa: E402
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
vellum/client/types/span_link.py
CHANGED
@@ -25,6 +25,7 @@ class SpanLink(UniversalBaseModel):
|
|
25
25
|
|
26
26
|
|
27
27
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
28
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
28
29
|
from .node_parent_context import NodeParentContext # noqa: E402
|
29
30
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
30
31
|
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext # noqa: E402
|
@@ -3,6 +3,7 @@
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
5
|
from .array_vellum_value import ArrayVellumValue
|
6
|
+
from .external_parent_context import ExternalParentContext
|
6
7
|
from .node_parent_context import NodeParentContext
|
7
8
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
8
9
|
from .span_link import SpanLink
|
@@ -33,6 +33,7 @@ class WorkflowDeploymentParentContext(UniversalBaseModel):
|
|
33
33
|
|
34
34
|
|
35
35
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
36
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
36
37
|
from .node_parent_context import NodeParentContext # noqa: E402
|
37
38
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
38
39
|
from .span_link import SpanLink # noqa: E402
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -8,6 +8,7 @@ import pydantic
|
|
8
8
|
|
9
9
|
class WorkflowExecutionSpanAttributes(UniversalBaseModel):
|
10
10
|
label: str
|
11
|
+
workflow_id: str
|
11
12
|
|
12
13
|
if IS_PYDANTIC_V2:
|
13
14
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
from .api_request_parent_context import ApiRequestParentContext
|
5
|
+
from .external_parent_context import ExternalParentContext
|
5
6
|
from .node_parent_context import NodeParentContext
|
6
7
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext
|
7
8
|
from .span_link import SpanLink
|
@@ -27,6 +27,7 @@ class WorkflowParentContext(UniversalBaseModel):
|
|
27
27
|
|
28
28
|
|
29
29
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
30
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
30
31
|
from .node_parent_context import NodeParentContext # noqa: E402
|
31
32
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
32
33
|
from .span_link import SpanLink # noqa: E402
|
@@ -28,6 +28,7 @@ class WorkflowSandboxParentContext(UniversalBaseModel):
|
|
28
28
|
|
29
29
|
|
30
30
|
from .api_request_parent_context import ApiRequestParentContext # noqa: E402
|
31
|
+
from .external_parent_context import ExternalParentContext # noqa: E402
|
31
32
|
from .node_parent_context import NodeParentContext # noqa: E402
|
32
33
|
from .prompt_deployment_parent_context import PromptDeploymentParentContext # noqa: E402
|
33
34
|
from .span_link import SpanLink # noqa: E402
|
@@ -41,7 +41,7 @@ class VellumEmitter(BaseWorkflowEmitter):
|
|
41
41
|
super().__init__()
|
42
42
|
self._timeout = timeout
|
43
43
|
self._max_retries = max_retries
|
44
|
-
self._events_endpoint = "events" # TODO: make this configurable with the correct url
|
44
|
+
self._events_endpoint = "v1/events" # TODO: make this configurable with the correct url
|
45
45
|
|
46
46
|
def emit_event(self, event: WorkflowEvent) -> None:
|
47
47
|
"""
|
@@ -90,7 +90,8 @@ class VellumEmitter(BaseWorkflowEmitter):
|
|
90
90
|
base_url = client._client_wrapper.get_environment().default
|
91
91
|
response = client._client_wrapper.httpx_client.request(
|
92
92
|
method="POST",
|
93
|
-
|
93
|
+
base_url=base_url,
|
94
|
+
path=self._events_endpoint, # TODO: will be replaced with the correct url
|
94
95
|
json=event_data,
|
95
96
|
headers=client._client_wrapper.get_headers(),
|
96
97
|
request_options={"timeout_in_seconds": self._timeout},
|
vellum/workflows/events/types.py
CHANGED
@@ -80,6 +80,11 @@ class UnknownParentContext(BaseParentContext):
|
|
80
80
|
type: Literal["UNKNOWN"] = "UNKNOWN"
|
81
81
|
|
82
82
|
|
83
|
+
# Setting external parent context for external workflows
|
84
|
+
class ExternalParentContext(BaseParentContext):
|
85
|
+
type: Literal["EXTERNAL"] = "EXTERNAL"
|
86
|
+
|
87
|
+
|
83
88
|
def _cast_parent_context_discriminator(v: Any) -> Any:
|
84
89
|
if v in PARENT_CONTEXT_TYPES:
|
85
90
|
return v
|
@@ -138,6 +143,7 @@ ParentContext = Annotated[
|
|
138
143
|
PromptDeploymentParentContext,
|
139
144
|
WorkflowSandboxParentContext,
|
140
145
|
APIRequestParentContext,
|
146
|
+
ExternalParentContext,
|
141
147
|
UnknownParentContext,
|
142
148
|
],
|
143
149
|
ParentContextDiscriminator(),
|