vellum-ai 0.14.31__py3-none-any.whl → 0.14.33__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 +18 -0
- vellum/client/__init__.py +4 -0
- vellum/client/core/client_wrapper.py +1 -1
- vellum/client/resources/__init__.py +2 -0
- vellum/client/resources/release_reviews/__init__.py +2 -0
- vellum/client/resources/release_reviews/client.py +137 -0
- vellum/client/types/__init__.py +16 -0
- vellum/client/types/release_created_by.py +21 -0
- vellum/client/types/release_environment.py +21 -0
- vellum/client/types/release_release_tag.py +31 -0
- vellum/client/types/release_review_reviewer.py +20 -0
- vellum/client/types/release_review_state.py +5 -0
- vellum/client/types/slim_release_review.py +25 -0
- vellum/client/types/workflow_deployment_release.py +32 -0
- vellum/client/types/workflow_deployment_release_workflow_version.py +19 -0
- vellum/resources/release_reviews/__init__.py +3 -0
- vellum/resources/release_reviews/client.py +3 -0
- vellum/types/release_created_by.py +3 -0
- vellum/types/release_environment.py +3 -0
- vellum/types/release_release_tag.py +3 -0
- vellum/types/release_review_reviewer.py +3 -0
- vellum/types/release_review_state.py +3 -0
- vellum/types/slim_release_review.py +3 -0
- vellum/types/workflow_deployment_release.py +3 -0
- vellum/types/workflow_deployment_release_workflow_version.py +3 -0
- vellum/workflows/nodes/core/inline_subworkflow_node/node.py +3 -1
- vellum/workflows/nodes/core/map_node/node.py +3 -1
- vellum/workflows/nodes/core/retry_node/node.py +3 -1
- vellum/workflows/nodes/core/try_node/node.py +3 -1
- vellum/workflows/nodes/displayable/guardrail_node/node.py +1 -1
- {vellum_ai-0.14.31.dist-info → vellum_ai-0.14.33.dist-info}/METADATA +1 -1
- {vellum_ai-0.14.31.dist-info → vellum_ai-0.14.33.dist-info}/RECORD +42 -22
- vellum_cli/ping.py +13 -2
- vellum_cli/pull.py +10 -3
- vellum_cli/tests/test_ping.py +35 -0
- vellum_cli/tests/test_pull.py +44 -0
- vellum_ee/workflows/display/nodes/vellum/guardrail_node.py +3 -4
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py +4 -4
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py +2 -2
- {vellum_ai-0.14.31.dist-info → vellum_ai-0.14.33.dist-info}/LICENSE +0 -0
- {vellum_ai-0.14.31.dist-info → vellum_ai-0.14.33.dist-info}/WHEEL +0 -0
- {vellum_ai-0.14.31.dist-info → vellum_ai-0.14.33.dist-info}/entry_points.txt +0 -0
vellum/__init__.py
CHANGED
@@ -323,6 +323,11 @@ from .types import (
|
|
323
323
|
RejectedExecuteWorkflowWorkflowResultEvent,
|
324
324
|
RejectedPromptExecutionMeta,
|
325
325
|
RejectedWorkflowNodeResultEvent,
|
326
|
+
ReleaseCreatedBy,
|
327
|
+
ReleaseEnvironment,
|
328
|
+
ReleaseReleaseTag,
|
329
|
+
ReleaseReviewReviewer,
|
330
|
+
ReleaseReviewState,
|
326
331
|
ReleaseTagRelease,
|
327
332
|
ReleaseTagSource,
|
328
333
|
ReplaceTestSuiteTestCaseRequest,
|
@@ -357,6 +362,7 @@ from .types import (
|
|
357
362
|
SlimDeploymentRead,
|
358
363
|
SlimDocument,
|
359
364
|
SlimDocumentDocumentToDocumentIndex,
|
365
|
+
SlimReleaseReview,
|
360
366
|
SlimWorkflowDeployment,
|
361
367
|
SlimWorkflowExecutionRead,
|
362
368
|
SpanLink,
|
@@ -500,6 +506,8 @@ from .types import (
|
|
500
506
|
WorkflowDeploymentHistoryItem,
|
501
507
|
WorkflowDeploymentParentContext,
|
502
508
|
WorkflowDeploymentRead,
|
509
|
+
WorkflowDeploymentRelease,
|
510
|
+
WorkflowDeploymentReleaseWorkflowVersion,
|
503
511
|
WorkflowError,
|
504
512
|
WorkflowEventDisplayContext,
|
505
513
|
WorkflowEventError,
|
@@ -591,6 +599,7 @@ from .resources import (
|
|
591
599
|
ml_models,
|
592
600
|
organizations,
|
593
601
|
prompts,
|
602
|
+
release_reviews,
|
594
603
|
sandboxes,
|
595
604
|
test_suite_runs,
|
596
605
|
test_suites,
|
@@ -935,6 +944,11 @@ __all__ = [
|
|
935
944
|
"RejectedExecuteWorkflowWorkflowResultEvent",
|
936
945
|
"RejectedPromptExecutionMeta",
|
937
946
|
"RejectedWorkflowNodeResultEvent",
|
947
|
+
"ReleaseCreatedBy",
|
948
|
+
"ReleaseEnvironment",
|
949
|
+
"ReleaseReleaseTag",
|
950
|
+
"ReleaseReviewReviewer",
|
951
|
+
"ReleaseReviewState",
|
938
952
|
"ReleaseTagRelease",
|
939
953
|
"ReleaseTagSource",
|
940
954
|
"ReplaceTestSuiteTestCaseRequest",
|
@@ -969,6 +983,7 @@ __all__ = [
|
|
969
983
|
"SlimDeploymentRead",
|
970
984
|
"SlimDocument",
|
971
985
|
"SlimDocumentDocumentToDocumentIndex",
|
986
|
+
"SlimReleaseReview",
|
972
987
|
"SlimWorkflowDeployment",
|
973
988
|
"SlimWorkflowExecutionRead",
|
974
989
|
"SpanLink",
|
@@ -1114,6 +1129,8 @@ __all__ = [
|
|
1114
1129
|
"WorkflowDeploymentHistoryItem",
|
1115
1130
|
"WorkflowDeploymentParentContext",
|
1116
1131
|
"WorkflowDeploymentRead",
|
1132
|
+
"WorkflowDeploymentRelease",
|
1133
|
+
"WorkflowDeploymentReleaseWorkflowVersion",
|
1117
1134
|
"WorkflowDeploymentsListRequestStatus",
|
1118
1135
|
"WorkflowError",
|
1119
1136
|
"WorkflowEventDisplayContext",
|
@@ -1197,6 +1214,7 @@ __all__ = [
|
|
1197
1214
|
"ml_models",
|
1198
1215
|
"organizations",
|
1199
1216
|
"prompts",
|
1217
|
+
"release_reviews",
|
1200
1218
|
"sandboxes",
|
1201
1219
|
"test_suite_runs",
|
1202
1220
|
"test_suites",
|
vellum/client/__init__.py
CHANGED
@@ -18,6 +18,7 @@ from .resources.sandboxes.client import SandboxesClient
|
|
18
18
|
from .resources.test_suite_runs.client import TestSuiteRunsClient
|
19
19
|
from .resources.test_suites.client import TestSuitesClient
|
20
20
|
from .resources.workflow_deployments.client import WorkflowDeploymentsClient
|
21
|
+
from .resources.release_reviews.client import ReleaseReviewsClient
|
21
22
|
from .resources.workflow_sandboxes.client import WorkflowSandboxesClient
|
22
23
|
from .resources.workflows.client import WorkflowsClient
|
23
24
|
from .resources.workspace_secrets.client import WorkspaceSecretsClient
|
@@ -75,6 +76,7 @@ from .resources.sandboxes.client import AsyncSandboxesClient
|
|
75
76
|
from .resources.test_suite_runs.client import AsyncTestSuiteRunsClient
|
76
77
|
from .resources.test_suites.client import AsyncTestSuitesClient
|
77
78
|
from .resources.workflow_deployments.client import AsyncWorkflowDeploymentsClient
|
79
|
+
from .resources.release_reviews.client import AsyncReleaseReviewsClient
|
78
80
|
from .resources.workflow_sandboxes.client import AsyncWorkflowSandboxesClient
|
79
81
|
from .resources.workflows.client import AsyncWorkflowsClient
|
80
82
|
from .resources.workspace_secrets.client import AsyncWorkspaceSecretsClient
|
@@ -152,6 +154,7 @@ class Vellum:
|
|
152
154
|
self.test_suite_runs = TestSuiteRunsClient(client_wrapper=self._client_wrapper)
|
153
155
|
self.test_suites = TestSuitesClient(client_wrapper=self._client_wrapper)
|
154
156
|
self.workflow_deployments = WorkflowDeploymentsClient(client_wrapper=self._client_wrapper)
|
157
|
+
self.release_reviews = ReleaseReviewsClient(client_wrapper=self._client_wrapper)
|
155
158
|
self.workflow_sandboxes = WorkflowSandboxesClient(client_wrapper=self._client_wrapper)
|
156
159
|
self.workflows = WorkflowsClient(client_wrapper=self._client_wrapper)
|
157
160
|
self.workspace_secrets = WorkspaceSecretsClient(client_wrapper=self._client_wrapper)
|
@@ -1494,6 +1497,7 @@ class AsyncVellum:
|
|
1494
1497
|
self.test_suite_runs = AsyncTestSuiteRunsClient(client_wrapper=self._client_wrapper)
|
1495
1498
|
self.test_suites = AsyncTestSuitesClient(client_wrapper=self._client_wrapper)
|
1496
1499
|
self.workflow_deployments = AsyncWorkflowDeploymentsClient(client_wrapper=self._client_wrapper)
|
1500
|
+
self.release_reviews = AsyncReleaseReviewsClient(client_wrapper=self._client_wrapper)
|
1497
1501
|
self.workflow_sandboxes = AsyncWorkflowSandboxesClient(client_wrapper=self._client_wrapper)
|
1498
1502
|
self.workflows = AsyncWorkflowsClient(client_wrapper=self._client_wrapper)
|
1499
1503
|
self.workspace_secrets = AsyncWorkspaceSecretsClient(client_wrapper=self._client_wrapper)
|
@@ -18,7 +18,7 @@ class BaseClientWrapper:
|
|
18
18
|
headers: typing.Dict[str, str] = {
|
19
19
|
"X-Fern-Language": "Python",
|
20
20
|
"X-Fern-SDK-Name": "vellum-ai",
|
21
|
-
"X-Fern-SDK-Version": "0.14.
|
21
|
+
"X-Fern-SDK-Version": "0.14.33",
|
22
22
|
}
|
23
23
|
headers["X_API_KEY"] = self.api_key
|
24
24
|
return headers
|
@@ -11,6 +11,7 @@ from . import (
|
|
11
11
|
ml_models,
|
12
12
|
organizations,
|
13
13
|
prompts,
|
14
|
+
release_reviews,
|
14
15
|
sandboxes,
|
15
16
|
test_suite_runs,
|
16
17
|
test_suites,
|
@@ -44,6 +45,7 @@ __all__ = [
|
|
44
45
|
"ml_models",
|
45
46
|
"organizations",
|
46
47
|
"prompts",
|
48
|
+
"release_reviews",
|
47
49
|
"sandboxes",
|
48
50
|
"test_suite_runs",
|
49
51
|
"test_suites",
|
@@ -0,0 +1,137 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ...core.client_wrapper import SyncClientWrapper
|
4
|
+
import typing
|
5
|
+
from ...core.request_options import RequestOptions
|
6
|
+
from ...types.workflow_deployment_release import WorkflowDeploymentRelease
|
7
|
+
from ...core.jsonable_encoder import jsonable_encoder
|
8
|
+
from ...core.pydantic_utilities import parse_obj_as
|
9
|
+
from json.decoder import JSONDecodeError
|
10
|
+
from ...core.api_error import ApiError
|
11
|
+
from ...core.client_wrapper import AsyncClientWrapper
|
12
|
+
|
13
|
+
|
14
|
+
class ReleaseReviewsClient:
|
15
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
16
|
+
self._client_wrapper = client_wrapper
|
17
|
+
|
18
|
+
def retrieve_workflow_deployment_release(
|
19
|
+
self, id: str, release_id_or_release_tag: str, *, request_options: typing.Optional[RequestOptions] = None
|
20
|
+
) -> WorkflowDeploymentRelease:
|
21
|
+
"""
|
22
|
+
Retrieve a specific Workflow Deployment Release by either its UUID or the name of a Release Tag that points to it.
|
23
|
+
|
24
|
+
Parameters
|
25
|
+
----------
|
26
|
+
id : str
|
27
|
+
A UUID string identifying this workflow deployment.
|
28
|
+
|
29
|
+
release_id_or_release_tag : str
|
30
|
+
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.
|
31
|
+
|
32
|
+
request_options : typing.Optional[RequestOptions]
|
33
|
+
Request-specific configuration.
|
34
|
+
|
35
|
+
Returns
|
36
|
+
-------
|
37
|
+
WorkflowDeploymentRelease
|
38
|
+
|
39
|
+
|
40
|
+
Examples
|
41
|
+
--------
|
42
|
+
from vellum import Vellum
|
43
|
+
|
44
|
+
client = Vellum(
|
45
|
+
api_key="YOUR_API_KEY",
|
46
|
+
)
|
47
|
+
client.release_reviews.retrieve_workflow_deployment_release(
|
48
|
+
id="id",
|
49
|
+
release_id_or_release_tag="release_id_or_release_tag",
|
50
|
+
)
|
51
|
+
"""
|
52
|
+
_response = self._client_wrapper.httpx_client.request(
|
53
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/releases/{jsonable_encoder(release_id_or_release_tag)}",
|
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
|
+
return typing.cast(
|
61
|
+
WorkflowDeploymentRelease,
|
62
|
+
parse_obj_as(
|
63
|
+
type_=WorkflowDeploymentRelease, # type: ignore
|
64
|
+
object_=_response.json(),
|
65
|
+
),
|
66
|
+
)
|
67
|
+
_response_json = _response.json()
|
68
|
+
except JSONDecodeError:
|
69
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
70
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
71
|
+
|
72
|
+
|
73
|
+
class AsyncReleaseReviewsClient:
|
74
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
75
|
+
self._client_wrapper = client_wrapper
|
76
|
+
|
77
|
+
async def retrieve_workflow_deployment_release(
|
78
|
+
self, id: str, release_id_or_release_tag: str, *, request_options: typing.Optional[RequestOptions] = None
|
79
|
+
) -> WorkflowDeploymentRelease:
|
80
|
+
"""
|
81
|
+
Retrieve a specific Workflow Deployment Release by either its UUID or the name of a Release Tag that points to it.
|
82
|
+
|
83
|
+
Parameters
|
84
|
+
----------
|
85
|
+
id : str
|
86
|
+
A UUID string identifying this workflow deployment.
|
87
|
+
|
88
|
+
release_id_or_release_tag : str
|
89
|
+
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.
|
90
|
+
|
91
|
+
request_options : typing.Optional[RequestOptions]
|
92
|
+
Request-specific configuration.
|
93
|
+
|
94
|
+
Returns
|
95
|
+
-------
|
96
|
+
WorkflowDeploymentRelease
|
97
|
+
|
98
|
+
|
99
|
+
Examples
|
100
|
+
--------
|
101
|
+
import asyncio
|
102
|
+
|
103
|
+
from vellum import AsyncVellum
|
104
|
+
|
105
|
+
client = AsyncVellum(
|
106
|
+
api_key="YOUR_API_KEY",
|
107
|
+
)
|
108
|
+
|
109
|
+
|
110
|
+
async def main() -> None:
|
111
|
+
await client.release_reviews.retrieve_workflow_deployment_release(
|
112
|
+
id="id",
|
113
|
+
release_id_or_release_tag="release_id_or_release_tag",
|
114
|
+
)
|
115
|
+
|
116
|
+
|
117
|
+
asyncio.run(main())
|
118
|
+
"""
|
119
|
+
_response = await self._client_wrapper.httpx_client.request(
|
120
|
+
f"v1/workflow-deployments/{jsonable_encoder(id)}/releases/{jsonable_encoder(release_id_or_release_tag)}",
|
121
|
+
base_url=self._client_wrapper.get_environment().default,
|
122
|
+
method="GET",
|
123
|
+
request_options=request_options,
|
124
|
+
)
|
125
|
+
try:
|
126
|
+
if 200 <= _response.status_code < 300:
|
127
|
+
return typing.cast(
|
128
|
+
WorkflowDeploymentRelease,
|
129
|
+
parse_obj_as(
|
130
|
+
type_=WorkflowDeploymentRelease, # type: ignore
|
131
|
+
object_=_response.json(),
|
132
|
+
),
|
133
|
+
)
|
134
|
+
_response_json = _response.json()
|
135
|
+
except JSONDecodeError:
|
136
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
137
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
vellum/client/types/__init__.py
CHANGED
@@ -331,6 +331,11 @@ from .rejected_execute_prompt_response import RejectedExecutePromptResponse
|
|
331
331
|
from .rejected_execute_workflow_workflow_result_event import RejectedExecuteWorkflowWorkflowResultEvent
|
332
332
|
from .rejected_prompt_execution_meta import RejectedPromptExecutionMeta
|
333
333
|
from .rejected_workflow_node_result_event import RejectedWorkflowNodeResultEvent
|
334
|
+
from .release_created_by import ReleaseCreatedBy
|
335
|
+
from .release_environment import ReleaseEnvironment
|
336
|
+
from .release_release_tag import ReleaseReleaseTag
|
337
|
+
from .release_review_reviewer import ReleaseReviewReviewer
|
338
|
+
from .release_review_state import ReleaseReviewState
|
334
339
|
from .release_tag_release import ReleaseTagRelease
|
335
340
|
from .release_tag_source import ReleaseTagSource
|
336
341
|
from .replace_test_suite_test_case_request import ReplaceTestSuiteTestCaseRequest
|
@@ -365,6 +370,7 @@ from .sentence_chunking_request import SentenceChunkingRequest
|
|
365
370
|
from .slim_deployment_read import SlimDeploymentRead
|
366
371
|
from .slim_document import SlimDocument
|
367
372
|
from .slim_document_document_to_document_index import SlimDocumentDocumentToDocumentIndex
|
373
|
+
from .slim_release_review import SlimReleaseReview
|
368
374
|
from .slim_workflow_deployment import SlimWorkflowDeployment
|
369
375
|
from .slim_workflow_execution_read import SlimWorkflowExecutionRead
|
370
376
|
from .span_link import SpanLink
|
@@ -524,6 +530,8 @@ from .workflow_deployment_event_executions_response import WorkflowDeploymentEve
|
|
524
530
|
from .workflow_deployment_history_item import WorkflowDeploymentHistoryItem
|
525
531
|
from .workflow_deployment_parent_context import WorkflowDeploymentParentContext
|
526
532
|
from .workflow_deployment_read import WorkflowDeploymentRead
|
533
|
+
from .workflow_deployment_release import WorkflowDeploymentRelease
|
534
|
+
from .workflow_deployment_release_workflow_version import WorkflowDeploymentReleaseWorkflowVersion
|
527
535
|
from .workflow_error import WorkflowError
|
528
536
|
from .workflow_event_display_context import WorkflowEventDisplayContext
|
529
537
|
from .workflow_event_error import WorkflowEventError
|
@@ -916,6 +924,11 @@ __all__ = [
|
|
916
924
|
"RejectedExecuteWorkflowWorkflowResultEvent",
|
917
925
|
"RejectedPromptExecutionMeta",
|
918
926
|
"RejectedWorkflowNodeResultEvent",
|
927
|
+
"ReleaseCreatedBy",
|
928
|
+
"ReleaseEnvironment",
|
929
|
+
"ReleaseReleaseTag",
|
930
|
+
"ReleaseReviewReviewer",
|
931
|
+
"ReleaseReviewState",
|
919
932
|
"ReleaseTagRelease",
|
920
933
|
"ReleaseTagSource",
|
921
934
|
"ReplaceTestSuiteTestCaseRequest",
|
@@ -950,6 +963,7 @@ __all__ = [
|
|
950
963
|
"SlimDeploymentRead",
|
951
964
|
"SlimDocument",
|
952
965
|
"SlimDocumentDocumentToDocumentIndex",
|
966
|
+
"SlimReleaseReview",
|
953
967
|
"SlimWorkflowDeployment",
|
954
968
|
"SlimWorkflowExecutionRead",
|
955
969
|
"SpanLink",
|
@@ -1093,6 +1107,8 @@ __all__ = [
|
|
1093
1107
|
"WorkflowDeploymentHistoryItem",
|
1094
1108
|
"WorkflowDeploymentParentContext",
|
1095
1109
|
"WorkflowDeploymentRead",
|
1110
|
+
"WorkflowDeploymentRelease",
|
1111
|
+
"WorkflowDeploymentReleaseWorkflowVersion",
|
1096
1112
|
"WorkflowError",
|
1097
1113
|
"WorkflowEventDisplayContext",
|
1098
1114
|
"WorkflowEventError",
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import pydantic
|
7
|
+
|
8
|
+
|
9
|
+
class ReleaseCreatedBy(UniversalBaseModel):
|
10
|
+
id: str
|
11
|
+
full_name: typing.Optional[str] = None
|
12
|
+
email: str
|
13
|
+
|
14
|
+
if IS_PYDANTIC_V2:
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
16
|
+
else:
|
17
|
+
|
18
|
+
class Config:
|
19
|
+
frozen = True
|
20
|
+
smart_union = True
|
21
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
5
|
+
import typing
|
6
|
+
import pydantic
|
7
|
+
|
8
|
+
|
9
|
+
class ReleaseEnvironment(UniversalBaseModel):
|
10
|
+
id: str
|
11
|
+
name: str
|
12
|
+
label: str
|
13
|
+
|
14
|
+
if IS_PYDANTIC_V2:
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
16
|
+
else:
|
17
|
+
|
18
|
+
class Config:
|
19
|
+
frozen = True
|
20
|
+
smart_union = True
|
21
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import pydantic
|
5
|
+
from .release_tag_source import ReleaseTagSource
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import typing
|
8
|
+
|
9
|
+
|
10
|
+
class ReleaseReleaseTag(UniversalBaseModel):
|
11
|
+
name: str = pydantic.Field()
|
12
|
+
"""
|
13
|
+
The name of the Release Tag
|
14
|
+
"""
|
15
|
+
|
16
|
+
source: ReleaseTagSource = pydantic.Field()
|
17
|
+
"""
|
18
|
+
The source of how the Release Tag was originally created
|
19
|
+
|
20
|
+
* `SYSTEM` - System
|
21
|
+
* `USER` - User
|
22
|
+
"""
|
23
|
+
|
24
|
+
if IS_PYDANTIC_V2:
|
25
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
26
|
+
else:
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import typing
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import pydantic
|
7
|
+
|
8
|
+
|
9
|
+
class ReleaseReviewReviewer(UniversalBaseModel):
|
10
|
+
id: str
|
11
|
+
full_name: typing.Optional[str] = None
|
12
|
+
|
13
|
+
if IS_PYDANTIC_V2:
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
15
|
+
else:
|
16
|
+
|
17
|
+
class Config:
|
18
|
+
frozen = True
|
19
|
+
smart_union = True
|
20
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import datetime as dt
|
5
|
+
from .release_review_reviewer import ReleaseReviewReviewer
|
6
|
+
from .release_review_state import ReleaseReviewState
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
8
|
+
import typing
|
9
|
+
import pydantic
|
10
|
+
|
11
|
+
|
12
|
+
class SlimReleaseReview(UniversalBaseModel):
|
13
|
+
id: str
|
14
|
+
created: dt.datetime
|
15
|
+
reviewer: ReleaseReviewReviewer
|
16
|
+
state: ReleaseReviewState
|
17
|
+
|
18
|
+
if IS_PYDANTIC_V2:
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
20
|
+
else:
|
21
|
+
|
22
|
+
class Config:
|
23
|
+
frozen = True
|
24
|
+
smart_union = True
|
25
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
import datetime as dt
|
5
|
+
from .release_environment import ReleaseEnvironment
|
6
|
+
import typing
|
7
|
+
from .release_created_by import ReleaseCreatedBy
|
8
|
+
from .workflow_deployment_release_workflow_version import WorkflowDeploymentReleaseWorkflowVersion
|
9
|
+
from .release_release_tag import ReleaseReleaseTag
|
10
|
+
from .slim_release_review import SlimReleaseReview
|
11
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
12
|
+
import pydantic
|
13
|
+
|
14
|
+
|
15
|
+
class WorkflowDeploymentRelease(UniversalBaseModel):
|
16
|
+
id: str
|
17
|
+
created: dt.datetime
|
18
|
+
environment: ReleaseEnvironment
|
19
|
+
created_by: typing.Optional[ReleaseCreatedBy] = None
|
20
|
+
workflow_version: WorkflowDeploymentReleaseWorkflowVersion
|
21
|
+
description: typing.Optional[str] = None
|
22
|
+
release_tags: typing.List[ReleaseReleaseTag]
|
23
|
+
reviews: typing.List[SlimReleaseReview]
|
24
|
+
|
25
|
+
if IS_PYDANTIC_V2:
|
26
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
27
|
+
else:
|
28
|
+
|
29
|
+
class Config:
|
30
|
+
frozen = True
|
31
|
+
smart_union = True
|
32
|
+
extra = pydantic.Extra.allow
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
5
|
+
import typing
|
6
|
+
import pydantic
|
7
|
+
|
8
|
+
|
9
|
+
class WorkflowDeploymentReleaseWorkflowVersion(UniversalBaseModel):
|
10
|
+
id: str
|
11
|
+
|
12
|
+
if IS_PYDANTIC_V2:
|
13
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
14
|
+
else:
|
15
|
+
|
16
|
+
class Config:
|
17
|
+
frozen = True
|
18
|
+
smart_union = True
|
19
|
+
extra = pydantic.Extra.allow
|
@@ -75,7 +75,9 @@ class InlineSubworkflowNode(
|
|
75
75
|
with execution_context(parent_context=get_parent_context()):
|
76
76
|
subworkflow = self.subworkflow(
|
77
77
|
parent_state=self.state,
|
78
|
-
context=WorkflowContext(
|
78
|
+
context=WorkflowContext(
|
79
|
+
vellum_client=self._context.vellum_client, generated_files=self._context.generated_files
|
80
|
+
),
|
79
81
|
)
|
80
82
|
subworkflow_stream = subworkflow.stream(
|
81
83
|
inputs=self._compile_subworkflow_inputs(),
|
@@ -171,7 +171,9 @@ class MapNode(BaseAdornmentNode[StateType], Generic[StateType, MapNodeItemType])
|
|
171
171
|
self._run_subworkflow(item=item, index=index)
|
172
172
|
|
173
173
|
def _run_subworkflow(self, *, item: MapNodeItemType, index: int) -> None:
|
174
|
-
context = WorkflowContext(
|
174
|
+
context = WorkflowContext(
|
175
|
+
vellum_client=self._context.vellum_client, generated_files=self._context.generated_files
|
176
|
+
)
|
175
177
|
subworkflow = self.subworkflow(
|
176
178
|
parent_state=self.state,
|
177
179
|
context=context,
|
@@ -45,7 +45,9 @@ class RetryNode(BaseAdornmentNode[StateType], Generic[StateType]):
|
|
45
45
|
with execution_context(parent_context=parent_context):
|
46
46
|
subworkflow = self.subworkflow(
|
47
47
|
parent_state=self.state,
|
48
|
-
context=WorkflowContext(
|
48
|
+
context=WorkflowContext(
|
49
|
+
vellum_client=self._context.vellum_client, generated_files=self._context.generated_files
|
50
|
+
),
|
49
51
|
)
|
50
52
|
subworkflow_stream = subworkflow.stream(
|
51
53
|
inputs=self.SubworkflowInputs(attempt_number=attempt_number),
|
@@ -32,7 +32,9 @@ class TryNode(BaseAdornmentNode[StateType], Generic[StateType]):
|
|
32
32
|
with execution_context(parent_context=parent_context):
|
33
33
|
subworkflow = self.subworkflow(
|
34
34
|
parent_state=self.state,
|
35
|
-
context=WorkflowContext(
|
35
|
+
context=WorkflowContext(
|
36
|
+
vellum_client=self._context.vellum_client, generated_files=self._context.generated_files
|
37
|
+
),
|
36
38
|
)
|
37
39
|
subworkflow_stream = subworkflow.stream(
|
38
40
|
event_filter=all_workflow_event_filter,
|
@@ -24,7 +24,7 @@ class GuardrailNode(BaseNode[StateType], Generic[StateType]):
|
|
24
24
|
|
25
25
|
metric_definition: ClassVar[Union[UUID, str]]
|
26
26
|
|
27
|
-
metric_inputs: ClassVar[EntityInputsInterface]
|
27
|
+
metric_inputs: ClassVar[EntityInputsInterface] = {}
|
28
28
|
release_tag: str = LATEST_RELEASE_TAG
|
29
29
|
|
30
30
|
request_options: Optional[RequestOptions] = None
|
@@ -6,8 +6,8 @@ vellum_cli/config.py,sha256=aKnhvM5B8QdPA4cQC5Sqg7ImP-vNcVdSkZmk_OBpQTw,9309
|
|
6
6
|
vellum_cli/image_push.py,sha256=8DDvRDJEZ-FukUCqGW1827bg1ybF4xBbx9WyqWYQE-g,6816
|
7
7
|
vellum_cli/init.py,sha256=WpnMXPItPmh0f0bBGIer3p-e5gu8DUGwSArT_FuoMEw,5093
|
8
8
|
vellum_cli/logger.py,sha256=PuRFa0WCh4sAGFS5aqWB0QIYpS6nBWwPJrIXpWxugV4,1022
|
9
|
-
vellum_cli/ping.py,sha256=
|
10
|
-
vellum_cli/pull.py,sha256=
|
9
|
+
vellum_cli/ping.py,sha256=p_BCCRjgPhng6JktuECtkDQLbhopt6JpmrtGoLnLJT8,1161
|
10
|
+
vellum_cli/pull.py,sha256=OfP2FIChfYzi7ksWObnvmkibln0JubMQftr1TZL-Bxk,10061
|
11
11
|
vellum_cli/push.py,sha256=xjTNbLwOVFNU3kpBrm56Bk5QkSRrJ9z86qceghCzfIA,9655
|
12
12
|
vellum_cli/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
vellum_cli/tests/conftest.py,sha256=AFYZryKA2qnUuCPBxBKmHLFoPiE0WhBFFej9tNwSHdc,1526
|
@@ -15,8 +15,8 @@ vellum_cli/tests/test_config.py,sha256=uvKGDc8BoVyT9_H0Z-g8469zVxomn6Oi3Zj-vK7O_
|
|
15
15
|
vellum_cli/tests/test_image_push.py,sha256=i3lJuW8nFRwL1M1OF6752IZYvGAFgKmkB2hd_rYlsmg,2028
|
16
16
|
vellum_cli/tests/test_init.py,sha256=8UOc_ThfouR4ja5cCl_URuLk7ohr9JXfCnG4yka1OUQ,18754
|
17
17
|
vellum_cli/tests/test_main.py,sha256=qDZG-aQauPwBwM6A2DIu1494n47v3pL28XakTbLGZ-k,272
|
18
|
-
vellum_cli/tests/test_ping.py,sha256=
|
19
|
-
vellum_cli/tests/test_pull.py,sha256=
|
18
|
+
vellum_cli/tests/test_ping.py,sha256=3ucVRThEmTadlV9LrJdCCrr1Ofj3rOjG6ue0BNR2UC0,2523
|
19
|
+
vellum_cli/tests/test_pull.py,sha256=UmgQwtv8J7U2zkbTvOPbxi6ozvAec1Fo1b2E5Fc9gWU,34625
|
20
20
|
vellum_cli/tests/test_push.py,sha256=zDv_Q1hbXtLwmTJDPRAvwDjbuHC09uNRYOy4FQujUow,23476
|
21
21
|
vellum_ee/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
vellum_ee/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -40,7 +40,7 @@ vellum_ee/workflows/display/nodes/vellum/code_execution_node.py,sha256=IYx0nll0t
|
|
40
40
|
vellum_ee/workflows/display/nodes/vellum/conditional_node.py,sha256=ybLIa4uclqVIy3VAQvI1ivg2tnK5Ug_1R5a69DFqL7E,11104
|
41
41
|
vellum_ee/workflows/display/nodes/vellum/error_node.py,sha256=I1Jkp2htRINJATtv1e-zs9BrReFX842djpiVgBPHDYg,2186
|
42
42
|
vellum_ee/workflows/display/nodes/vellum/final_output_node.py,sha256=BJ--Y-LCbGFJve3OFEKHVxrw8TKvgb342opYLJibToc,3128
|
43
|
-
vellum_ee/workflows/display/nodes/vellum/guardrail_node.py,sha256=
|
43
|
+
vellum_ee/workflows/display/nodes/vellum/guardrail_node.py,sha256=IuJPKZoZT7lXhQkPH-wlut9-FsGtr8dIHM4jz8rp7BU,2228
|
44
44
|
vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py,sha256=86hkneLIBS4Jel3GWsPVIIFqXGD3RHIpXw0iGa_Zues,8843
|
45
45
|
vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py,sha256=MU9I8CB1X1TgL1aa1eT6DHWwNJ-2v79t74xl0oy-fBo,5510
|
46
46
|
vellum_ee/workflows/display/nodes/vellum/map_node.py,sha256=8CPnn06HIBxBOiECevUffeVmQmCpec6WtPQnNl9gj9Y,3748
|
@@ -71,13 +71,13 @@ vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attr
|
|
71
71
|
vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_outputs_serialization.py,sha256=s6_mnk0pkztU59wYpSfOFpMhAJaRjmyfxM6WJGtnD4Y,6456
|
72
72
|
vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py,sha256=PkSgghJDz0fpDB72HHPjLjo8LkZk-HpUkCQzRLX-iVw,40611
|
73
73
|
vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_trigger_serialization.py,sha256=dsJr8I9AdPwMOGszirfNDzZP2Ychd94aAKuPXAzknMk,4632
|
74
|
-
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py,sha256=
|
74
|
+
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py,sha256=EdLwx6iUEMrQd68UIlACa9DQguomcu621MOYuXmunig,15908
|
75
75
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py,sha256=V__y7uu-dy6TJjPeu4UDvaoO2yYwBRbPiW9uJdzWRx4,29828
|
76
76
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py,sha256=6ejs_C1cuaRHtc8Qb2qh8-b-juDwLwdfTBd-6CSDDYw,47672
|
77
77
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_default_state_serialization.py,sha256=WebMmamSwRykxcilhiNG1XTxI88VydCgPFavF-gSqWk,8820
|
78
78
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_error_node_serialization.py,sha256=wgedEa2IVP2ssH_FLghoEmLgpJR41AY-iNIw1SESeqA,6106
|
79
79
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_generic_node_serialization.py,sha256=THQB73vAgdiRRk7GKWwzw99G-X3LLgEEVCb4QCQrrMQ,5773
|
80
|
-
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py,sha256=
|
80
|
+
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py,sha256=aWZ3XIquyKeS199VayYVA7qVjXdvPepGG8UkNt0osIU,7446
|
81
81
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_prompt_node_serialization.py,sha256=XRtXTWtNXHe1g8E_mNcAhYZVjc0UcGlJRjq34_sd0jo,787
|
82
82
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subworkflow_serialization.py,sha256=nZ3IOZSX3cOg4XV5-PW-Hsu806vfzmOZyCpZyl1I50w,20605
|
83
83
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py,sha256=8GakAJmf140XzQRZyr-BbZUt22h0lZKUFhNZY4zlD4g,16172
|
@@ -123,12 +123,12 @@ vellum_ee/workflows/tests/local_workflow/workflow.py,sha256=A4qOzOPNwePYxWbcAgIP
|
|
123
123
|
vellum_ee/workflows/tests/test_display_meta.py,sha256=C25dErwghPNXio49pvSRxyOuc96srH6eYEwTAWdE2zY,2258
|
124
124
|
vellum_ee/workflows/tests/test_server.py,sha256=Q9XD93jMwYjZOkcwMPNM2F4BWvcY71wxkYp8HgMgGFU,4435
|
125
125
|
vellum_ee/workflows/tests/test_virtual_files.py,sha256=TJEcMR0v2S8CkloXNmCHA0QW0K6pYNGaIjraJz7sFvY,2762
|
126
|
-
vellum/__init__.py,sha256=
|
126
|
+
vellum/__init__.py,sha256=Ur02Hk_LtwXW45f-LBBtBhRX1xJRSq05ytaQUfgIGmc,40970
|
127
127
|
vellum/client/README.md,sha256=JkCJjmMZl4jrPj46pkmL9dpK4gSzQQmP5I7z4aME4LY,4749
|
128
|
-
vellum/client/__init__.py,sha256=
|
128
|
+
vellum/client/__init__.py,sha256=ki-TDOmYzC0FePN7swDyE6UpHFQV_4dK7lqy4h-3s1Y,118148
|
129
129
|
vellum/client/core/__init__.py,sha256=SQ85PF84B9MuKnBwHNHWemSGuy-g_515gFYNFhvEE0I,1438
|
130
130
|
vellum/client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
131
|
-
vellum/client/core/client_wrapper.py,sha256=
|
131
|
+
vellum/client/core/client_wrapper.py,sha256=jPo42cS6hlGPneWIZtcMfaVmCbt4TEQwCPgoWxxCTUw,1869
|
132
132
|
vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
133
133
|
vellum/client/core/file.py,sha256=X9IbmkZmB2bB_DpmZAO3crWdXagOakAyn6UCOCImCPg,2322
|
134
134
|
vellum/client/core/http_client.py,sha256=R0pQpCppnEtxccGvXl4uJ76s7ro_65Fo_erlNNLp_AI,19228
|
@@ -144,7 +144,7 @@ vellum/client/errors/bad_request_error.py,sha256=_EbO8mWqN9kFZPvIap8qa1lL_EWkRcs
|
|
144
144
|
vellum/client/errors/forbidden_error.py,sha256=QO1kKlhClAPES6zsEK7g9pglWnxn3KWaOCAawWOg6Aw,263
|
145
145
|
vellum/client/errors/internal_server_error.py,sha256=8USCagXyJJ1MOm9snpcXIUt6eNXvrd_aq7Gfcu1vlOI,268
|
146
146
|
vellum/client/errors/not_found_error.py,sha256=tBVCeBC8n3C811WHRj_n-hs3h8MqwR5gp0vLiobk7W8,262
|
147
|
-
vellum/client/resources/__init__.py,sha256=
|
147
|
+
vellum/client/resources/__init__.py,sha256=XgQao4rJxyYu71j64RFIsshz4op9GE8-i-C5GCv-KVE,1555
|
148
148
|
vellum/client/resources/ad_hoc/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
149
149
|
vellum/client/resources/ad_hoc/client.py,sha256=_liorv4AsoJ55kVu0a5oWB3Qeff0iUKXqoHEIyDWLxc,14173
|
150
150
|
vellum/client/resources/container_images/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
@@ -172,6 +172,8 @@ vellum/client/resources/organizations/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKT
|
|
172
172
|
vellum/client/resources/organizations/client.py,sha256=Uye92moqjAcOCs4astmuFpT92QdC5SLMunA-C8_G-gA,3675
|
173
173
|
vellum/client/resources/prompts/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
174
174
|
vellum/client/resources/prompts/client.py,sha256=_rNTUjhl_ZF3vyQa_M1BSTrX4DlFXU_SXkwwCEYKD2s,6598
|
175
|
+
vellum/client/resources/release_reviews/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
176
|
+
vellum/client/resources/release_reviews/client.py,sha256=6u7qYK_fpRZzizYnFtUS06Q41RqEzSsre6RQwRimf8w,5088
|
175
177
|
vellum/client/resources/sandboxes/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
176
178
|
vellum/client/resources/sandboxes/client.py,sha256=SG4BV0NG1Ow10mXSu52ybj-c6hR7wcNxfGJK4eiHu_8,17670
|
177
179
|
vellum/client/resources/test_suite_runs/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
@@ -193,7 +195,7 @@ vellum/client/resources/workspace_secrets/__init__.py,sha256=FTtvy8EDg9nNNg9WCat
|
|
193
195
|
vellum/client/resources/workspace_secrets/client.py,sha256=h7UzXLyTttPq1t-JZGMg1BWxypxJvBGUdqg7KGT7MK4,8027
|
194
196
|
vellum/client/resources/workspaces/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
195
197
|
vellum/client/resources/workspaces/client.py,sha256=RthwzN1o-Jxwg5yyNNodavFyNUSxfLoTv26w3mRR5g8,3595
|
196
|
-
vellum/client/types/__init__.py,sha256=
|
198
|
+
vellum/client/types/__init__.py,sha256=ZGqDXdE0b5IdJIYVcPEUZ33lgiV5Jy47KM1c5OzyDok,61976
|
197
199
|
vellum/client/types/ad_hoc_execute_prompt_event.py,sha256=bCjujA2XsOgyF3bRZbcEqV2rOIymRgsLoIRtZpB14xg,607
|
198
200
|
vellum/client/types/ad_hoc_expand_meta.py,sha256=1gv-NCsy_6xBYupLvZH979yf2VMdxAU-l0y0ynMKZaw,1331
|
199
201
|
vellum/client/types/ad_hoc_fulfilled_prompt_execution_meta.py,sha256=Bfvf1d_dkmshxRACVM5vcxbH_7AQY23RmrrnPc0ytYY,939
|
@@ -513,6 +515,11 @@ vellum/client/types/rejected_execute_prompt_response.py,sha256=YyY9KGTbJ53DmwiXH
|
|
513
515
|
vellum/client/types/rejected_execute_workflow_workflow_result_event.py,sha256=6k6GRr2TnVSM0DxS3H3hczwV7962UDG92yLh6j8OjcM,882
|
514
516
|
vellum/client/types/rejected_prompt_execution_meta.py,sha256=4Oidh3XBBHzgjOys2kuETxqWc_MOqS50UpB0o8YNZd8,844
|
515
517
|
vellum/client/types/rejected_workflow_node_result_event.py,sha256=o9AUc9hT60F8ckMkCx8HtKxtj4y82LBoJduB9u8w0TM,1319
|
518
|
+
vellum/client/types/release_created_by.py,sha256=Oc5Yz1I-zQ3Uv5Rz6bVULC3DvX-edwco3ohSKjxo2NI,615
|
519
|
+
vellum/client/types/release_environment.py,sha256=7EwrbP527MSeaNm5jBRNfEVEh2o6GMx4TzS_S4xIU4g,588
|
520
|
+
vellum/client/types/release_release_tag.py,sha256=Q6jMTXcwjke8_L75zZhKmJMlO_lSgF0vzyyjFi1a2oQ,851
|
521
|
+
vellum/client/types/release_review_reviewer.py,sha256=hxF8h5IYfiebvvln-cBisnjZr68pTWsKFBDqCu-tgZg,605
|
522
|
+
vellum/client/types/release_review_state.py,sha256=fKlFAdEcgmCzFizCTZVSAOvHCRrhSwA4whGaENihlWo,188
|
516
523
|
vellum/client/types/release_tag_release.py,sha256=FG3gagTgqy2eG7XYRFQkOQroMgG4N8uc2h5e6jb8ab4,607
|
517
524
|
vellum/client/types/release_tag_source.py,sha256=YavosOXZ976yfXTNWRTZwh2HhRiYmSDk0bQCkl-jCoQ,158
|
518
525
|
vellum/client/types/replace_test_suite_test_case_request.py,sha256=c1GT1RUCei1yWxyZy4Gv40PkXYisvK5OkzlqQ6WeBYA,1906
|
@@ -547,6 +554,7 @@ vellum/client/types/sentence_chunking_request.py,sha256=77gv1fVc9IaTuGGx3O1HB0LF
|
|
547
554
|
vellum/client/types/slim_deployment_read.py,sha256=Xqwjx1QSpWzEXx5QPrBv5UT1QrwTrxoL2jpzOcf94Zc,1826
|
548
555
|
vellum/client/types/slim_document.py,sha256=HJiymYPvRxfxhBUkD8epW0hQ2Vt9PQtv398QsRb4DsI,2395
|
549
556
|
vellum/client/types/slim_document_document_to_document_index.py,sha256=vo7WbRRzbApQxT0MZu_NkjQmsFD8LoezmyeKBeGZpI8,1346
|
557
|
+
vellum/client/types/slim_release_review.py,sha256=7DXmD1AVa_Wj7e0qiR7GUN9cSqwkk1JloYmp_3oluQQ,783
|
550
558
|
vellum/client/types/slim_workflow_deployment.py,sha256=p8nVtnAjPYZArkuVZE40qDjXRXHPpEKvIngKE2NAmLE,2189
|
551
559
|
vellum/client/types/slim_workflow_execution_read.py,sha256=MvBIOlqunAYVmG-SUu4dIsz2LycBEE29WtHWmzpfPmw,2836
|
552
560
|
vellum/client/types/span_link.py,sha256=jVuwL7ki3UtoIRpcshXO1zGa_sGj2N5b8vPNKCqlto0,1748
|
@@ -690,6 +698,8 @@ vellum/client/types/workflow_deployment_event_executions_response.py,sha256=x7mZ
|
|
690
698
|
vellum/client/types/workflow_deployment_history_item.py,sha256=4WUPzcthBvEZ7iaisKfEg0soUtHjcTEnL_VUVaKpTyw,1420
|
691
699
|
vellum/client/types/workflow_deployment_parent_context.py,sha256=QNyPj2o-jauaC48KrRjCWan1IKIbDgyuxLxURmhXsXM,2347
|
692
700
|
vellum/client/types/workflow_deployment_read.py,sha256=tp1WaojTVE_dz1oiZ97h8ixMbIWDgy2yRu08A7wPMpw,2363
|
701
|
+
vellum/client/types/workflow_deployment_release.py,sha256=pLkRtkCIEUUZuYxdfXELddVKkljqt42OG7fUA8HXt4M,1209
|
702
|
+
vellum/client/types/workflow_deployment_release_workflow_version.py,sha256=kTZbVa6KAtAD_nCfea3QlQrZTH2AYP9tbaOKimHp9jg,581
|
693
703
|
vellum/client/types/workflow_error.py,sha256=EQajkEmLS64T0wYm0goHQl0rT7Lguurk8pLwkhjsgAI,282
|
694
704
|
vellum/client/types/workflow_event_display_context.py,sha256=tnO9lgIJKnLtuS6xum_QilI83LjOmnWCLtnSHLn1oNo,929
|
695
705
|
vellum/client/types/workflow_event_error.py,sha256=HIewu_kh3KNPpWegAQArvAGHCp-cBIXqlUAAc_dBZhc,687
|
@@ -827,6 +837,8 @@ vellum/resources/organizations/__init__.py,sha256=FD1umjszsErkQIAI6aZ7Lv_T6iN5Ia
|
|
827
837
|
vellum/resources/organizations/client.py,sha256=68HAX4pswpJDH0-Yjc3teoloSJBUGRv8O1V8tCqFSuk,162
|
828
838
|
vellum/resources/prompts/__init__.py,sha256=CtN_jI0nc0C3yqxUPR1uWs5Mvxhlce5c-d8E96GVt4g,149
|
829
839
|
vellum/resources/prompts/client.py,sha256=9S00NNuuiz41m6-kOL6KCxu9bnYMORrXrXVWfFEeW5o,156
|
840
|
+
vellum/resources/release_reviews/__init__.py,sha256=KchzMayHdTI-aK1Q1ZorHyET_DMV9Sx_0NyJGTeXU7o,157
|
841
|
+
vellum/resources/release_reviews/client.py,sha256=UMJSHGN2g-TPB4MajT0VBAP9eG5pQajxZbi9UZhIZxA,164
|
830
842
|
vellum/resources/sandboxes/__init__.py,sha256=sycp4Bgvj9GzBGjiXhtmKFjOdBsIoDfMFaQrvDK_lGo,151
|
831
843
|
vellum/resources/sandboxes/client.py,sha256=PBpYOg43HN-9B4YKtPqmE1aFag39ypLc5UWSxixUJjo,158
|
832
844
|
vellum/resources/test_suite_runs/__init__.py,sha256=PfRYjodfN_rYZlUTiBnVXxdwQNcdmI-qT6MCqubd3ug,157
|
@@ -1168,6 +1180,11 @@ vellum/types/rejected_execute_prompt_response.py,sha256=hznSDSGod3eOrTS6Z-8EUDnG
|
|
1168
1180
|
vellum/types/rejected_execute_workflow_workflow_result_event.py,sha256=zyaUrnK5FRxkK8iQ71Il8exrNjC6W6lWsleJk6SSBxM,185
|
1169
1181
|
vellum/types/rejected_prompt_execution_meta.py,sha256=ev1iT8IFkHn7YGg04DHdOGinBHQfIaKa0sEa2yuOjTw,168
|
1170
1182
|
vellum/types/rejected_workflow_node_result_event.py,sha256=RbaaRh7xZUueiyOzfPZqwfYiRdRgeudbvk8jhqmBrew,173
|
1183
|
+
vellum/types/release_created_by.py,sha256=3N9aHI6kGPb1xz5V-7VFkQrXqAM9ffVfYInr1B3uMCw,156
|
1184
|
+
vellum/types/release_environment.py,sha256=D9pQV0GRLgeBMHB4BhUNBRzqpRDKn12BE5Fhe1KZGE0,157
|
1185
|
+
vellum/types/release_release_tag.py,sha256=yqfhgZjJA4VToV__mZm_BhR2YYGM4chAc2f0gtcK1UM,157
|
1186
|
+
vellum/types/release_review_reviewer.py,sha256=Iz-8d-R6e1myU_UAhjxl-_-pErMkq8IKwLfW7KaYz6s,161
|
1187
|
+
vellum/types/release_review_state.py,sha256=ACiClYc8S0JBcfCZx8ihuGj6t0c_4IQZT6vhpSJc0Pc,158
|
1171
1188
|
vellum/types/release_tag_release.py,sha256=qp65-5Y8HQoYpgh0bLsYGtsX_Z_U2A-hipTY81oa3vg,157
|
1172
1189
|
vellum/types/release_tag_source.py,sha256=71AVUOydv6hauj65Wj5l2qBa35jTLTheLpMIsgz3noI,156
|
1173
1190
|
vellum/types/replace_test_suite_test_case_request.py,sha256=qMI4-4s_EXTOo29mZR14opoOTPp5_zIylPJU5ZPCvAc,174
|
@@ -1202,6 +1219,7 @@ vellum/types/sentence_chunking_request.py,sha256=f0am6XafUmK3Ok3dEy2cqeeqds63XF9
|
|
1202
1219
|
vellum/types/slim_deployment_read.py,sha256=grU1w1TDVLwQqbklQaoShBRwIjeurD5ZadeK_ABP-VU,158
|
1203
1220
|
vellum/types/slim_document.py,sha256=yhPuWFL65jMKdCEcMNBDqJZQc1UdYlH7tFJ1nkGwDL0,151
|
1204
1221
|
vellum/types/slim_document_document_to_document_index.py,sha256=3FwldvGhBc0pkccorIE3eMi8hQ0swgCWgKQJ6-jIff0,178
|
1222
|
+
vellum/types/slim_release_review.py,sha256=g8uRHBq4J5XIffToAlHRgclrKQvJ0G1M37nz3gL-JJM,157
|
1205
1223
|
vellum/types/slim_workflow_deployment.py,sha256=wRfaObu07ouUTNln4QZuBiye2uuKh3kPPvz2h9sbmJU,162
|
1206
1224
|
vellum/types/slim_workflow_execution_read.py,sha256=nQcAhL7OJu2ptMGgJsnG6FmNINR-ooJNhIRMVQFXQbI,166
|
1207
1225
|
vellum/types/span_link.py,sha256=x4-yBxQD8ItR8c_nvdOeWfYtBOxJhrnAavrhKU65K3Y,147
|
@@ -1345,6 +1363,8 @@ vellum/types/workflow_deployment_event_executions_response.py,sha256=375mHiA7suc
|
|
1345
1363
|
vellum/types/workflow_deployment_history_item.py,sha256=dp5pwzOVO83KPwAbYeO3NXlKKHswGa0MTGX82nIhAIg,170
|
1346
1364
|
vellum/types/workflow_deployment_parent_context.py,sha256=kB0eeRXagHqRnuDVA9B8aDlvBZVOmQ702JYXD8evh24,172
|
1347
1365
|
vellum/types/workflow_deployment_read.py,sha256=dDGG27VP0bvC565JzeSOHJ-5Pvs7eCF4R8F9k8316bo,162
|
1366
|
+
vellum/types/workflow_deployment_release.py,sha256=lBnOc5Tw2-jLGWmthzkwdaLGvylcDiarO-maZSote0A,165
|
1367
|
+
vellum/types/workflow_deployment_release_workflow_version.py,sha256=l5SJrY9z3lG5K82V2wY2sY50V40CQWKl95nDjnHu4Dc,182
|
1348
1368
|
vellum/types/workflow_error.py,sha256=7rZcYJG5jYr4IbEvgv57G6Lxutrdg43SD8mUerd58_A,152
|
1349
1369
|
vellum/types/workflow_event_display_context.py,sha256=jiH4vHlWYdT_2zM8yxPox3fXjnFStzIO46N90B2TdNA,168
|
1350
1370
|
vellum/types/workflow_event_error.py,sha256=n8yzIuTmfxKyGBKellmMhnCgi1d4fPkr0MvjR3sKOAI,158
|
@@ -1503,22 +1523,22 @@ vellum/workflows/nodes/core/__init__.py,sha256=5zDMCmyt1v0HTJzlUBwq3U9L825yZGZhT
|
|
1503
1523
|
vellum/workflows/nodes/core/error_node/__init__.py,sha256=g7RRnlHhqu4qByfLjBwCunmgGA8dI5gNsjS3h6TwlSI,60
|
1504
1524
|
vellum/workflows/nodes/core/error_node/node.py,sha256=MFHU5vITYSK-L9CuMZ49In2ZeNLWnhZD0f8r5dWvb5Y,1270
|
1505
1525
|
vellum/workflows/nodes/core/inline_subworkflow_node/__init__.py,sha256=nKNEH1QTl-1PcvmYoqSWEl0-t6gAur8GLTXHzklRQfM,84
|
1506
|
-
vellum/workflows/nodes/core/inline_subworkflow_node/node.py,sha256=
|
1526
|
+
vellum/workflows/nodes/core/inline_subworkflow_node/node.py,sha256=gumdZs50XGpnFvKxde-WAu6NqH7ImwRf3gK6c7B46W0,6696
|
1507
1527
|
vellum/workflows/nodes/core/inline_subworkflow_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1508
1528
|
vellum/workflows/nodes/core/inline_subworkflow_node/tests/test_node.py,sha256=kUqwcRMMxjTHALbwGUXCJT_aJBrHS1bkg49oL8R0JO8,4337
|
1509
1529
|
vellum/workflows/nodes/core/map_node/__init__.py,sha256=MXpZYmGfhsMJHqqlpd64WiJRtbAtAMQz-_3fCU_cLV0,56
|
1510
|
-
vellum/workflows/nodes/core/map_node/node.py,sha256=
|
1530
|
+
vellum/workflows/nodes/core/map_node/node.py,sha256=8AOHvV1TR8Tr4IyDjdIk6Jzi86KJpg_wS9gp30tDRLQ,9312
|
1511
1531
|
vellum/workflows/nodes/core/map_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1512
1532
|
vellum/workflows/nodes/core/map_node/tests/test_node.py,sha256=uMR0AyIFn539LqTKHdwuBswnx1i-PHyqPpgtYrnmYMY,3496
|
1513
1533
|
vellum/workflows/nodes/core/retry_node/__init__.py,sha256=lN2bIy5a3Uzhs_FYCrooADyYU6ZGShtvLKFWpelwPvo,60
|
1514
|
-
vellum/workflows/nodes/core/retry_node/node.py,sha256=
|
1534
|
+
vellum/workflows/nodes/core/retry_node/node.py,sha256=UmTxbxom2VPBoJLk75gXdMa300JJ-1rkW0rh2MeF3jE,5354
|
1515
1535
|
vellum/workflows/nodes/core/retry_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1516
1536
|
vellum/workflows/nodes/core/retry_node/tests/test_node.py,sha256=RM_OHwxrHwyxvlQQBJPqVBxpedFuWQ9h2-Xa3kP75sc,4399
|
1517
1537
|
vellum/workflows/nodes/core/templating_node/__init__.py,sha256=GmyuYo81_A1_Bz6id69ozVFS6FKiuDsZTiA3I6MaL2U,70
|
1518
1538
|
vellum/workflows/nodes/core/templating_node/node.py,sha256=iqBmr2i-f-BqhisNQJiDfewjol0ur7-XpupLStyMJsg,3731
|
1519
1539
|
vellum/workflows/nodes/core/templating_node/tests/test_templating_node.py,sha256=nXkgGDBg4wP36NwykdMEVWwx_xjv8oGT2rYkwuCB_VU,10075
|
1520
1540
|
vellum/workflows/nodes/core/try_node/__init__.py,sha256=JVD4DrldTIqFQQFrubs9KtWCCc0YCAc7Fzol5ZWIWeM,56
|
1521
|
-
vellum/workflows/nodes/core/try_node/node.py,sha256
|
1541
|
+
vellum/workflows/nodes/core/try_node/node.py,sha256=-fHfcgI9RFQobNyiugP2dow4ahqY7iDd1LObJw5aB8k,4530
|
1522
1542
|
vellum/workflows/nodes/core/try_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1523
1543
|
vellum/workflows/nodes/core/try_node/tests/test_node.py,sha256=h6eUc3SggvhzBWlOD0PrPUlkoCSQHwjqYn81VkxSIxU,4948
|
1524
1544
|
vellum/workflows/nodes/displayable/__init__.py,sha256=6F_4DlSwvHuilWnIalp8iDjjDXl0Nmz4QzJV2PYe5RI,1023
|
@@ -1557,7 +1577,7 @@ vellum/workflows/nodes/displayable/final_output_node/node.py,sha256=PuQ0RvtAmoSI
|
|
1557
1577
|
vellum/workflows/nodes/displayable/final_output_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1558
1578
|
vellum/workflows/nodes/displayable/final_output_node/tests/test_node.py,sha256=E6LQ74qZjY4Xi4avx2qdOCgGhF8pEcNLBh8cqYRkzMI,709
|
1559
1579
|
vellum/workflows/nodes/displayable/guardrail_node/__init__.py,sha256=Ab5eXmOoBhyV4dMWdzh32HLUmnPIBEK_zFCT38C4Fng,68
|
1560
|
-
vellum/workflows/nodes/displayable/guardrail_node/node.py,sha256=
|
1580
|
+
vellum/workflows/nodes/displayable/guardrail_node/node.py,sha256=A9_vuahgKSemPAZdrDJilWwciLhOBTcxINXRnUHQl_g,4427
|
1561
1581
|
vellum/workflows/nodes/displayable/guardrail_node/test_node.py,sha256=1yPIAt4_GWiUKT6u3rTW2XKp62b8xG8Jj3JWeCm5ZDM,1368
|
1562
1582
|
vellum/workflows/nodes/displayable/inline_prompt_node/__init__.py,sha256=gSUOoEZLlrx35-tQhSAd3An8WDwBqyiQh-sIebLU9wU,74
|
1563
1583
|
vellum/workflows/nodes/displayable/inline_prompt_node/node.py,sha256=8RXZqWMzViUjFfbpmcy1gkSsKnEpci8BGwsuPYv4xMQ,3380
|
@@ -1650,8 +1670,8 @@ vellum/workflows/workflows/event_filters.py,sha256=GSxIgwrX26a1Smfd-6yss2abGCnad
|
|
1650
1670
|
vellum/workflows/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1651
1671
|
vellum/workflows/workflows/tests/test_base_workflow.py,sha256=tCxrV3QBHL8wfdEO3bvKteDdw32xBlUl1_WxkAwaONw,8344
|
1652
1672
|
vellum/workflows/workflows/tests/test_context.py,sha256=VJBUcyWVtMa_lE5KxdhgMu0WYNYnUQUDvTF7qm89hJ0,2333
|
1653
|
-
vellum_ai-0.14.
|
1654
|
-
vellum_ai-0.14.
|
1655
|
-
vellum_ai-0.14.
|
1656
|
-
vellum_ai-0.14.
|
1657
|
-
vellum_ai-0.14.
|
1673
|
+
vellum_ai-0.14.33.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
|
1674
|
+
vellum_ai-0.14.33.dist-info/METADATA,sha256=8j_YxkXJ0HIBjUZszx0257w_iMhp8KxdW3Y3pUmabMs,5484
|
1675
|
+
vellum_ai-0.14.33.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
1676
|
+
vellum_ai-0.14.33.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
|
1677
|
+
vellum_ai-0.14.33.dist-info/RECORD,,
|
vellum_cli/ping.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
from dotenv import load_dotenv
|
2
2
|
|
3
|
+
from vellum.client.core.api_error import ApiError
|
3
4
|
from vellum.workflows.vellum_client import create_vellum_client
|
4
5
|
from vellum_cli.logger import load_cli_logger
|
5
6
|
|
@@ -10,8 +11,18 @@ def ping_command():
|
|
10
11
|
|
11
12
|
client = create_vellum_client()
|
12
13
|
|
13
|
-
|
14
|
-
|
14
|
+
try:
|
15
|
+
workspace = client.workspaces.workspace_identity()
|
16
|
+
organization = client.organizations.organization_identity()
|
17
|
+
except ApiError as e:
|
18
|
+
# If user did not provide an API key, we will get a 403 error
|
19
|
+
if e.status_code == 401 or e.status_code == 403:
|
20
|
+
raise Exception(
|
21
|
+
"Please make sure your `VELLUM_API_KEY` environment variable is set correctly." # noqa: E501
|
22
|
+
) from e
|
23
|
+
raise Exception(
|
24
|
+
"The API we tried to ping returned an invalid response. Please make sure your `VELLUM_API_URL` environment variable is set correctly." # noqa: E501
|
25
|
+
)
|
15
26
|
|
16
27
|
logger.info(
|
17
28
|
f"""\
|
vellum_cli/pull.py
CHANGED
@@ -8,6 +8,7 @@ from typing import Optional
|
|
8
8
|
from dotenv import load_dotenv
|
9
9
|
from pydash import snake_case
|
10
10
|
|
11
|
+
from vellum.client.core.api_error import ApiError
|
11
12
|
from vellum.client.core.pydantic_utilities import UniversalBaseModel
|
12
13
|
from vellum.workflows.vellum_client import create_vellum_client
|
13
14
|
from vellum_cli.config import VellumCliConfig, WorkflowConfig, load_vellum_cli_config
|
@@ -146,11 +147,17 @@ def pull_command(
|
|
146
147
|
request_options={"additional_query_parameters": query_parameters},
|
147
148
|
)
|
148
149
|
|
149
|
-
|
150
|
-
|
150
|
+
try:
|
151
|
+
zip_bytes = b"".join(response)
|
152
|
+
except ApiError as e:
|
153
|
+
if e.status_code == 401 or e.status_code == 403:
|
154
|
+
raise Exception("Please make sure your `VELLUM_API_KEY` environment variable is set correctly.")
|
155
|
+
raise Exception(
|
156
|
+
"The API we tried to pull is invalid. Please make sure your `VELLUM_API_URL` environment variable is set correctly." # noqa: E501
|
157
|
+
)
|
151
158
|
|
159
|
+
zip_buffer = io.BytesIO(zip_bytes)
|
152
160
|
error_content = ""
|
153
|
-
|
154
161
|
try:
|
155
162
|
with zipfile.ZipFile(zip_buffer) as zip_file:
|
156
163
|
if METADATA_FILE_NAME in zip_file.namelist():
|
vellum_cli/tests/test_ping.py
CHANGED
@@ -2,6 +2,7 @@ from datetime import datetime
|
|
2
2
|
|
3
3
|
from click.testing import CliRunner
|
4
4
|
|
5
|
+
from vellum.client.core.api_error import ApiError
|
5
6
|
from vellum.client.types.organization_read import OrganizationRead
|
6
7
|
from vellum.client.types.workspace_read import WorkspaceRead
|
7
8
|
from vellum_cli import main as cli_main
|
@@ -45,3 +46,37 @@ Workspace:
|
|
45
46
|
\x1b[0m
|
46
47
|
"""
|
47
48
|
)
|
49
|
+
|
50
|
+
|
51
|
+
def test_ping__error_path(vellum_client):
|
52
|
+
# GIVEN a cli
|
53
|
+
runner = CliRunner()
|
54
|
+
|
55
|
+
vellum_client.workspaces.workspace_identity.side_effect = ApiError(status_code=400, body="Invalid JSON")
|
56
|
+
|
57
|
+
# WHEN the user runs the ping command
|
58
|
+
result = runner.invoke(cli_main, ["ping"])
|
59
|
+
|
60
|
+
# THEN the command returns an error
|
61
|
+
assert result.exit_code == 1
|
62
|
+
assert (
|
63
|
+
str(result.exception)
|
64
|
+
== "The API we tried to ping returned an invalid response. Please make sure your `VELLUM_API_URL` environment variable is set correctly." # noqa: E501
|
65
|
+
)
|
66
|
+
|
67
|
+
|
68
|
+
def test_ping__unauthorized_error_path(vellum_client):
|
69
|
+
# GIVEN a cli
|
70
|
+
runner = CliRunner()
|
71
|
+
|
72
|
+
# GIVEN an unauthorized error with the error message from the API
|
73
|
+
vellum_client.workspaces.workspace_identity.side_effect = ApiError(
|
74
|
+
status_code=403, body={"detail": "Authentication credentials were not provided."}
|
75
|
+
)
|
76
|
+
|
77
|
+
# WHEN the user runs the ping command
|
78
|
+
result = runner.invoke(cli_main, ["ping"])
|
79
|
+
|
80
|
+
# THEN the command returns an error
|
81
|
+
assert result.exit_code == 1
|
82
|
+
assert str(result.exception) == "Please make sure your `VELLUM_API_KEY` environment variable is set correctly."
|
vellum_cli/tests/test_pull.py
CHANGED
@@ -8,6 +8,7 @@ import zipfile
|
|
8
8
|
|
9
9
|
from click.testing import CliRunner
|
10
10
|
|
11
|
+
from vellum.client.core.api_error import ApiError
|
11
12
|
from vellum_cli import main as cli_main
|
12
13
|
|
13
14
|
|
@@ -893,3 +894,46 @@ def test_pull__invalid_zip_file(vellum_client):
|
|
893
894
|
str(result.exception)
|
894
895
|
== "The API we tried to pull from returned an invalid zip file. Please make sure your `VELLUM_API_URL` environment variable is set correctly." # noqa: E501
|
895
896
|
)
|
897
|
+
|
898
|
+
|
899
|
+
def test_pull__json_decode_error(vellum_client):
|
900
|
+
workflow_deployment = "test-workflow-deployment-id"
|
901
|
+
|
902
|
+
# GIVEN a workflow pull API call that returns a generator which raises an error when consumed
|
903
|
+
def mock_error_generator():
|
904
|
+
# This generator yields nothing but raises when consumed
|
905
|
+
if False: # This ensures the generator is created but yields nothing
|
906
|
+
yield b""
|
907
|
+
raise ApiError(status_code=400, body="Invalid JSON")
|
908
|
+
|
909
|
+
vellum_client.workflows.pull.return_value = mock_error_generator()
|
910
|
+
|
911
|
+
# WHEN the user runs the pull command
|
912
|
+
runner = CliRunner()
|
913
|
+
result = runner.invoke(cli_main, ["workflows", "pull", "--workflow-deployment", workflow_deployment])
|
914
|
+
|
915
|
+
# THEN the command returns an error
|
916
|
+
assert result.exit_code == 1
|
917
|
+
assert (
|
918
|
+
str(result.exception)
|
919
|
+
== "The API we tried to pull is invalid. Please make sure your `VELLUM_API_URL` environment variable is set correctly." # noqa: E501
|
920
|
+
)
|
921
|
+
|
922
|
+
|
923
|
+
def test_pull__unauthorized_error_path(vellum_client):
|
924
|
+
workflow_deployment = "test-workflow-deployment-id"
|
925
|
+
|
926
|
+
# GIVEN an unauthorized error with the error message from the API
|
927
|
+
def mock_error_generator():
|
928
|
+
yield b""
|
929
|
+
raise ApiError(status_code=403, body={"detail": "Authentication credentials were not provided."})
|
930
|
+
|
931
|
+
vellum_client.workflows.pull.return_value = mock_error_generator()
|
932
|
+
|
933
|
+
# WHEN the user runs the pull command
|
934
|
+
runner = CliRunner()
|
935
|
+
result = runner.invoke(cli_main, ["workflows", "pull", "--workflow-deployment", workflow_deployment])
|
936
|
+
|
937
|
+
# THEN the command returns an error
|
938
|
+
assert result.exit_code == 1
|
939
|
+
assert str(result.exception) == "Please make sure your `VELLUM_API_KEY` environment variable is set correctly."
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from uuid import UUID
|
2
|
-
from typing import
|
2
|
+
from typing import Generic, Optional, TypeVar
|
3
3
|
|
4
4
|
from vellum.workflows.nodes import GuardrailNode
|
5
5
|
from vellum.workflows.types.core import JsonObject
|
@@ -12,8 +12,6 @@ _GuardrailNodeType = TypeVar("_GuardrailNodeType", bound=GuardrailNode)
|
|
12
12
|
|
13
13
|
|
14
14
|
class BaseGuardrailNodeDisplay(BaseNodeVellumDisplay[_GuardrailNodeType], Generic[_GuardrailNodeType]):
|
15
|
-
metric_input_ids_by_name: ClassVar[Dict[str, UUID]] = {}
|
16
|
-
|
17
15
|
def serialize(
|
18
16
|
self, display_context: WorkflowDisplayContext, error_output_id: Optional[UUID] = None, **kwargs
|
19
17
|
) -> JsonObject:
|
@@ -27,7 +25,8 @@ class BaseGuardrailNodeDisplay(BaseNodeVellumDisplay[_GuardrailNodeType], Generi
|
|
27
25
|
input_name=variable_name,
|
28
26
|
value=variable_value,
|
29
27
|
display_context=display_context,
|
30
|
-
input_id=self.
|
28
|
+
input_id=self.node_input_ids_by_name.get(f"{GuardrailNode.metric_inputs.name}.{variable_name}")
|
29
|
+
or self.node_input_ids_by_name.get(variable_name),
|
31
30
|
)
|
32
31
|
for variable_name, variable_value in metric_inputs.items()
|
33
32
|
]
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py
CHANGED
@@ -7,7 +7,7 @@ from vellum import WorkspaceSecretRead
|
|
7
7
|
from vellum_ee.workflows.display.workflows import VellumWorkflowDisplay
|
8
8
|
from vellum_ee.workflows.display.workflows.get_vellum_workflow_display_class import get_workflow_display
|
9
9
|
|
10
|
-
from tests.workflows.
|
10
|
+
from tests.workflows.basic_api_node.workflow import SimpleAPIWorkflow
|
11
11
|
|
12
12
|
|
13
13
|
def test_serialize_workflow(vellum_client):
|
@@ -99,7 +99,7 @@ def test_serialize_workflow(vellum_client):
|
|
99
99
|
"id": "c3a17ceb-e201-4025-b18a-9162aac7705e",
|
100
100
|
"key": "body",
|
101
101
|
"value": {
|
102
|
-
"rules": [{"type": "CONSTANT_VALUE", "data": {"type": "JSON", "value":
|
102
|
+
"rules": [{"type": "CONSTANT_VALUE", "data": {"type": "JSON", "value": {"key": "value"}}}],
|
103
103
|
"combinator": "OR",
|
104
104
|
},
|
105
105
|
},
|
@@ -193,7 +193,7 @@ def test_serialize_workflow(vellum_client):
|
|
193
193
|
},
|
194
194
|
"definition": {
|
195
195
|
"name": "SimpleAPINode",
|
196
|
-
"module": ["tests", "workflows", "
|
196
|
+
"module": ["tests", "workflows", "basic_api_node", "workflow"],
|
197
197
|
},
|
198
198
|
},
|
199
199
|
api_node,
|
@@ -373,7 +373,7 @@ def test_serialize_workflow(vellum_client):
|
|
373
373
|
"module": [
|
374
374
|
"tests",
|
375
375
|
"workflows",
|
376
|
-
"
|
376
|
+
"basic_api_node",
|
377
377
|
"workflow",
|
378
378
|
],
|
379
379
|
}
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py
CHANGED
@@ -73,7 +73,7 @@ def test_serialize_workflow():
|
|
73
73
|
"type": "METRIC",
|
74
74
|
"inputs": [
|
75
75
|
{
|
76
|
-
"id": "
|
76
|
+
"id": "e5e9757e-27db-4200-a650-2f7bb2cd61f5",
|
77
77
|
"key": "expected",
|
78
78
|
"value": {
|
79
79
|
"rules": [
|
@@ -86,7 +86,7 @@ def test_serialize_workflow():
|
|
86
86
|
},
|
87
87
|
},
|
88
88
|
{
|
89
|
-
"id": "
|
89
|
+
"id": "f5cd9336-e8e9-429e-b7bc-785402e31bfb",
|
90
90
|
"key": "actual",
|
91
91
|
"value": {
|
92
92
|
"rules": [
|
File without changes
|
File without changes
|
File without changes
|