vellum-ai 0.10.0__py3-none-any.whl → 0.10.2__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. vellum/__init__.py +8 -0
  2. vellum/client/README.md +1 -1
  3. vellum/client/__init__.py +4 -0
  4. vellum/client/core/client_wrapper.py +1 -1
  5. vellum/client/resources/__init__.py +2 -0
  6. vellum/client/resources/deployments/client.py +117 -0
  7. vellum/client/resources/ml_models/__init__.py +2 -0
  8. vellum/client/resources/ml_models/client.py +125 -0
  9. vellum/client/resources/workflow_deployments/client.py +117 -0
  10. vellum/client/types/__init__.py +6 -0
  11. vellum/client/types/deployment_history_item.py +44 -0
  12. vellum/client/types/ml_model_read.py +27 -0
  13. vellum/client/types/workflow_deployment_history_item.py +45 -0
  14. vellum/resources/ml_models/__init__.py +3 -0
  15. vellum/resources/ml_models/client.py +3 -0
  16. vellum/types/deployment_history_item.py +3 -0
  17. vellum/types/ml_model_read.py +3 -0
  18. vellum/types/workflow_deployment_history_item.py +3 -0
  19. vellum/workflows/nodes/__init__.py +4 -3
  20. vellum/workflows/nodes/core/__init__.py +2 -0
  21. vellum/workflows/nodes/displayable/bases/search_node.py +10 -3
  22. vellum/workflows/nodes/displayable/search_node/node.py +12 -5
  23. vellum/workflows/references/execution_count.py +4 -0
  24. {vellum_ai-0.10.0.dist-info → vellum_ai-0.10.2.dist-info}/METADATA +3 -3
  25. {vellum_ai-0.10.0.dist-info → vellum_ai-0.10.2.dist-info}/RECORD +36 -25
  26. vellum_cli/__init__.py +3 -2
  27. vellum_cli/pull.py +17 -4
  28. vellum_cli/tests/test_pull.py +18 -0
  29. vellum_ee/py.typed +0 -0
  30. vellum_ee/workflows/display/nodes/vellum/conditional_node.py +20 -2
  31. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py +148 -42
  32. vellum_ee/workflows/display/utils/vellum.py +16 -11
  33. vellum_ee/workflows/display/vellum.py +10 -1
  34. {vellum_ai-0.10.0.dist-info → vellum_ai-0.10.2.dist-info}/LICENSE +0 -0
  35. {vellum_ai-0.10.0.dist-info → vellum_ai-0.10.2.dist-info}/WHEEL +0 -0
  36. {vellum_ai-0.10.0.dist-info → vellum_ai-0.10.2.dist-info}/entry_points.txt +0 -0
vellum/__init__.py CHANGED
@@ -66,6 +66,7 @@ from .types import (
66
66
  ConditionalNodeResultData,
67
67
  ContainerImageRead,
68
68
  CreateTestSuiteTestCaseRequest,
69
+ DeploymentHistoryItem,
69
70
  DeploymentProviderPayloadResponse,
70
71
  DeploymentProviderPayloadResponsePayload,
71
72
  DeploymentRead,
@@ -187,6 +188,7 @@ from .types import (
187
188
  MetricDefinitionExecution,
188
189
  MetricDefinitionInput,
189
190
  MetricNodeResult,
191
+ MlModelRead,
190
192
  MlModelUsage,
191
193
  NamedScenarioInputChatHistoryVariableValueRequest,
192
194
  NamedScenarioInputJsonVariableValueRequest,
@@ -435,6 +437,7 @@ from .types import (
435
437
  VellumVariable,
436
438
  VellumVariableExtensions,
437
439
  VellumVariableType,
440
+ WorkflowDeploymentHistoryItem,
438
441
  WorkflowDeploymentRead,
439
442
  WorkflowEventError,
440
443
  WorkflowExecutionActualChatHistoryRequest,
@@ -497,6 +500,7 @@ from .resources import (
497
500
  documents,
498
501
  folder_entities,
499
502
  metric_definitions,
503
+ ml_models,
500
504
  sandboxes,
501
505
  test_suite_runs,
502
506
  test_suites,
@@ -577,6 +581,7 @@ __all__ = [
577
581
  "ConditionalNodeResultData",
578
582
  "ContainerImageRead",
579
583
  "CreateTestSuiteTestCaseRequest",
584
+ "DeploymentHistoryItem",
580
585
  "DeploymentProviderPayloadResponse",
581
586
  "DeploymentProviderPayloadResponsePayload",
582
587
  "DeploymentRead",
@@ -705,6 +710,7 @@ __all__ = [
705
710
  "MetricDefinitionExecution",
706
711
  "MetricDefinitionInput",
707
712
  "MetricNodeResult",
713
+ "MlModelRead",
708
714
  "MlModelUsage",
709
715
  "NamedScenarioInputChatHistoryVariableValueRequest",
710
716
  "NamedScenarioInputJsonVariableValueRequest",
@@ -956,6 +962,7 @@ __all__ = [
956
962
  "VellumVariable",
957
963
  "VellumVariableExtensions",
958
964
  "VellumVariableType",
965
+ "WorkflowDeploymentHistoryItem",
959
966
  "WorkflowDeploymentRead",
960
967
  "WorkflowDeploymentsListRequestStatus",
961
968
  "WorkflowEventError",
@@ -1011,6 +1018,7 @@ __all__ = [
1011
1018
  "documents",
1012
1019
  "folder_entities",
1013
1020
  "metric_definitions",
1021
+ "ml_models",
1014
1022
  "sandboxes",
1015
1023
  "test_suite_runs",
1016
1024
  "test_suites",
vellum/client/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vellum Python Library
2
2
 
3
- [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fvellum-ai%2Fvellum-client-python)
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fvellum-ai%2Fvellum-python-sdks)
4
4
  [![pypi](https://img.shields.io/pypi/v/vellum-ai)](https://pypi.python.org/pypi/vellum-ai)
5
5
 
6
6
  The Vellum Python library provides convenient access to the Vellum API from Python.
vellum/client/__init__.py CHANGED
@@ -11,6 +11,7 @@ from .resources.document_indexes.client import DocumentIndexesClient
11
11
  from .resources.documents.client import DocumentsClient
12
12
  from .resources.folder_entities.client import FolderEntitiesClient
13
13
  from .resources.metric_definitions.client import MetricDefinitionsClient
14
+ from .resources.ml_models.client import MlModelsClient
14
15
  from .resources.sandboxes.client import SandboxesClient
15
16
  from .resources.test_suite_runs.client import TestSuiteRunsClient
16
17
  from .resources.test_suites.client import TestSuitesClient
@@ -59,6 +60,7 @@ from .resources.document_indexes.client import AsyncDocumentIndexesClient
59
60
  from .resources.documents.client import AsyncDocumentsClient
60
61
  from .resources.folder_entities.client import AsyncFolderEntitiesClient
61
62
  from .resources.metric_definitions.client import AsyncMetricDefinitionsClient
63
+ from .resources.ml_models.client import AsyncMlModelsClient
62
64
  from .resources.sandboxes.client import AsyncSandboxesClient
63
65
  from .resources.test_suite_runs.client import AsyncTestSuiteRunsClient
64
66
  from .resources.test_suites.client import AsyncTestSuitesClient
@@ -132,6 +134,7 @@ class Vellum:
132
134
  self.documents = DocumentsClient(client_wrapper=self._client_wrapper)
133
135
  self.folder_entities = FolderEntitiesClient(client_wrapper=self._client_wrapper)
134
136
  self.metric_definitions = MetricDefinitionsClient(client_wrapper=self._client_wrapper)
137
+ self.ml_models = MlModelsClient(client_wrapper=self._client_wrapper)
135
138
  self.sandboxes = SandboxesClient(client_wrapper=self._client_wrapper)
136
139
  self.test_suite_runs = TestSuiteRunsClient(client_wrapper=self._client_wrapper)
137
140
  self.test_suites = TestSuitesClient(client_wrapper=self._client_wrapper)
@@ -1451,6 +1454,7 @@ class AsyncVellum:
1451
1454
  self.documents = AsyncDocumentsClient(client_wrapper=self._client_wrapper)
1452
1455
  self.folder_entities = AsyncFolderEntitiesClient(client_wrapper=self._client_wrapper)
1453
1456
  self.metric_definitions = AsyncMetricDefinitionsClient(client_wrapper=self._client_wrapper)
1457
+ self.ml_models = AsyncMlModelsClient(client_wrapper=self._client_wrapper)
1454
1458
  self.sandboxes = AsyncSandboxesClient(client_wrapper=self._client_wrapper)
1455
1459
  self.test_suite_runs = AsyncTestSuiteRunsClient(client_wrapper=self._client_wrapper)
1456
1460
  self.test_suites = AsyncTestSuitesClient(client_wrapper=self._client_wrapper)
@@ -17,7 +17,7 @@ class BaseClientWrapper:
17
17
  headers: typing.Dict[str, str] = {
18
18
  "X-Fern-Language": "Python",
19
19
  "X-Fern-SDK-Name": "vellum-ai",
20
- "X-Fern-SDK-Version": "0.9.17",
20
+ "X-Fern-SDK-Version": "0.10.2",
21
21
  }
22
22
  headers["X_API_KEY"] = self.api_key
23
23
  return headers
@@ -8,6 +8,7 @@ from . import (
8
8
  documents,
9
9
  folder_entities,
10
10
  metric_definitions,
11
+ ml_models,
11
12
  sandboxes,
12
13
  test_suite_runs,
13
14
  test_suites,
@@ -37,6 +38,7 @@ __all__ = [
37
38
  "documents",
38
39
  "folder_entities",
39
40
  "metric_definitions",
41
+ "ml_models",
40
42
  "sandboxes",
41
43
  "test_suite_runs",
42
44
  "test_suites",
@@ -10,6 +10,7 @@ from json.decoder import JSONDecodeError
10
10
  from ...core.api_error import ApiError
11
11
  from ...types.deployment_read import DeploymentRead
12
12
  from ...core.jsonable_encoder import jsonable_encoder
13
+ from ...types.deployment_history_item import DeploymentHistoryItem
13
14
  from .types.list_deployment_release_tags_request_source import ListDeploymentReleaseTagsRequestSource
14
15
  from ...types.paginated_deployment_release_tag_read_list import PaginatedDeploymentReleaseTagReadList
15
16
  from ...types.deployment_release_tag_read import DeploymentReleaseTagRead
@@ -148,6 +149,60 @@ class DeploymentsClient:
148
149
  raise ApiError(status_code=_response.status_code, body=_response.text)
149
150
  raise ApiError(status_code=_response.status_code, body=_response_json)
150
151
 
152
+ def deployment_history_item_retrieve(
153
+ self, history_id_or_release_tag: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
154
+ ) -> DeploymentHistoryItem:
155
+ """
156
+ Retrieve a specific Deployment History Item by either its UUID or the name of a Release Tag that points to it.
157
+
158
+ Parameters
159
+ ----------
160
+ history_id_or_release_tag : str
161
+ Either the UUID of Deployment History Item you'd like to retrieve, or the name of a Release Tag that's pointing to the Deployment History Item you'd like to retrieve.
162
+
163
+ id : str
164
+ A UUID string identifying this deployment.
165
+
166
+ request_options : typing.Optional[RequestOptions]
167
+ Request-specific configuration.
168
+
169
+ Returns
170
+ -------
171
+ DeploymentHistoryItem
172
+
173
+
174
+ Examples
175
+ --------
176
+ from vellum import Vellum
177
+
178
+ client = Vellum(
179
+ api_key="YOUR_API_KEY",
180
+ )
181
+ client.deployments.deployment_history_item_retrieve(
182
+ history_id_or_release_tag="history_id_or_release_tag",
183
+ id="id",
184
+ )
185
+ """
186
+ _response = self._client_wrapper.httpx_client.request(
187
+ f"v1/deployments/{jsonable_encoder(id)}/history/{jsonable_encoder(history_id_or_release_tag)}",
188
+ base_url=self._client_wrapper.get_environment().default,
189
+ method="GET",
190
+ request_options=request_options,
191
+ )
192
+ try:
193
+ if 200 <= _response.status_code < 300:
194
+ return typing.cast(
195
+ DeploymentHistoryItem,
196
+ parse_obj_as(
197
+ type_=DeploymentHistoryItem, # type: ignore
198
+ object_=_response.json(),
199
+ ),
200
+ )
201
+ _response_json = _response.json()
202
+ except JSONDecodeError:
203
+ raise ApiError(status_code=_response.status_code, body=_response.text)
204
+ raise ApiError(status_code=_response.status_code, body=_response_json)
205
+
151
206
  def list_deployment_release_tags(
152
207
  self,
153
208
  id: str,
@@ -614,6 +669,68 @@ class AsyncDeploymentsClient:
614
669
  raise ApiError(status_code=_response.status_code, body=_response.text)
615
670
  raise ApiError(status_code=_response.status_code, body=_response_json)
616
671
 
672
+ async def deployment_history_item_retrieve(
673
+ self, history_id_or_release_tag: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
674
+ ) -> DeploymentHistoryItem:
675
+ """
676
+ Retrieve a specific Deployment History Item by either its UUID or the name of a Release Tag that points to it.
677
+
678
+ Parameters
679
+ ----------
680
+ history_id_or_release_tag : str
681
+ Either the UUID of Deployment History Item you'd like to retrieve, or the name of a Release Tag that's pointing to the Deployment History Item you'd like to retrieve.
682
+
683
+ id : str
684
+ A UUID string identifying this deployment.
685
+
686
+ request_options : typing.Optional[RequestOptions]
687
+ Request-specific configuration.
688
+
689
+ Returns
690
+ -------
691
+ DeploymentHistoryItem
692
+
693
+
694
+ Examples
695
+ --------
696
+ import asyncio
697
+
698
+ from vellum import AsyncVellum
699
+
700
+ client = AsyncVellum(
701
+ api_key="YOUR_API_KEY",
702
+ )
703
+
704
+
705
+ async def main() -> None:
706
+ await client.deployments.deployment_history_item_retrieve(
707
+ history_id_or_release_tag="history_id_or_release_tag",
708
+ id="id",
709
+ )
710
+
711
+
712
+ asyncio.run(main())
713
+ """
714
+ _response = await self._client_wrapper.httpx_client.request(
715
+ f"v1/deployments/{jsonable_encoder(id)}/history/{jsonable_encoder(history_id_or_release_tag)}",
716
+ base_url=self._client_wrapper.get_environment().default,
717
+ method="GET",
718
+ request_options=request_options,
719
+ )
720
+ try:
721
+ if 200 <= _response.status_code < 300:
722
+ return typing.cast(
723
+ DeploymentHistoryItem,
724
+ parse_obj_as(
725
+ type_=DeploymentHistoryItem, # type: ignore
726
+ object_=_response.json(),
727
+ ),
728
+ )
729
+ _response_json = _response.json()
730
+ except JSONDecodeError:
731
+ raise ApiError(status_code=_response.status_code, body=_response.text)
732
+ raise ApiError(status_code=_response.status_code, body=_response_json)
733
+
617
734
  async def list_deployment_release_tags(
618
735
  self,
619
736
  id: str,
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,125 @@
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.ml_model_read import MlModelRead
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 MlModelsClient:
15
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
16
+ self._client_wrapper = client_wrapper
17
+
18
+ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> MlModelRead:
19
+ """
20
+ Retrieve details about an ML Model
21
+
22
+ Parameters
23
+ ----------
24
+ id : str
25
+ Either the ML Model's ID, its unique name, or its ID in the workspace.
26
+
27
+ request_options : typing.Optional[RequestOptions]
28
+ Request-specific configuration.
29
+
30
+ Returns
31
+ -------
32
+ MlModelRead
33
+
34
+
35
+ Examples
36
+ --------
37
+ from vellum import Vellum
38
+
39
+ client = Vellum(
40
+ api_key="YOUR_API_KEY",
41
+ )
42
+ client.ml_models.retrieve(
43
+ id="id",
44
+ )
45
+ """
46
+ _response = self._client_wrapper.httpx_client.request(
47
+ f"v1/ml-models/{jsonable_encoder(id)}",
48
+ base_url=self._client_wrapper.get_environment().default,
49
+ method="GET",
50
+ request_options=request_options,
51
+ )
52
+ try:
53
+ if 200 <= _response.status_code < 300:
54
+ return typing.cast(
55
+ MlModelRead,
56
+ parse_obj_as(
57
+ type_=MlModelRead, # type: ignore
58
+ object_=_response.json(),
59
+ ),
60
+ )
61
+ _response_json = _response.json()
62
+ except JSONDecodeError:
63
+ raise ApiError(status_code=_response.status_code, body=_response.text)
64
+ raise ApiError(status_code=_response.status_code, body=_response_json)
65
+
66
+
67
+ class AsyncMlModelsClient:
68
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
69
+ self._client_wrapper = client_wrapper
70
+
71
+ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> MlModelRead:
72
+ """
73
+ Retrieve details about an ML Model
74
+
75
+ Parameters
76
+ ----------
77
+ id : str
78
+ Either the ML Model's ID, its unique name, or its ID in the workspace.
79
+
80
+ request_options : typing.Optional[RequestOptions]
81
+ Request-specific configuration.
82
+
83
+ Returns
84
+ -------
85
+ MlModelRead
86
+
87
+
88
+ Examples
89
+ --------
90
+ import asyncio
91
+
92
+ from vellum import AsyncVellum
93
+
94
+ client = AsyncVellum(
95
+ api_key="YOUR_API_KEY",
96
+ )
97
+
98
+
99
+ async def main() -> None:
100
+ await client.ml_models.retrieve(
101
+ id="id",
102
+ )
103
+
104
+
105
+ asyncio.run(main())
106
+ """
107
+ _response = await self._client_wrapper.httpx_client.request(
108
+ f"v1/ml-models/{jsonable_encoder(id)}",
109
+ base_url=self._client_wrapper.get_environment().default,
110
+ method="GET",
111
+ request_options=request_options,
112
+ )
113
+ try:
114
+ if 200 <= _response.status_code < 300:
115
+ return typing.cast(
116
+ MlModelRead,
117
+ parse_obj_as(
118
+ type_=MlModelRead, # type: ignore
119
+ object_=_response.json(),
120
+ ),
121
+ )
122
+ _response_json = _response.json()
123
+ except JSONDecodeError:
124
+ raise ApiError(status_code=_response.status_code, body=_response.text)
125
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -10,6 +10,7 @@ from json.decoder import JSONDecodeError
10
10
  from ...core.api_error import ApiError
11
11
  from ...types.workflow_deployment_read import WorkflowDeploymentRead
12
12
  from ...core.jsonable_encoder import jsonable_encoder
13
+ from ...types.workflow_deployment_history_item import WorkflowDeploymentHistoryItem
13
14
  from .types.list_workflow_release_tags_request_source import ListWorkflowReleaseTagsRequestSource
14
15
  from ...types.paginated_workflow_release_tag_read_list import PaginatedWorkflowReleaseTagReadList
15
16
  from ...types.workflow_release_tag_read import WorkflowReleaseTagRead
@@ -140,6 +141,60 @@ class WorkflowDeploymentsClient:
140
141
  raise ApiError(status_code=_response.status_code, body=_response.text)
141
142
  raise ApiError(status_code=_response.status_code, body=_response_json)
142
143
 
144
+ def workflow_deployment_history_item_retrieve(
145
+ self, history_id_or_release_tag: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
146
+ ) -> WorkflowDeploymentHistoryItem:
147
+ """
148
+ Retrieve a specific Workflow Deployment History Item by either its UUID or the name of a Release Tag that points to it.
149
+
150
+ Parameters
151
+ ----------
152
+ history_id_or_release_tag : str
153
+ Either the UUID of Workflow Deployment History Item you'd like to retrieve, or the name of a Release Tag that's pointing to the Workflow Deployment History Item you'd like to retrieve.
154
+
155
+ id : str
156
+ A UUID string identifying this workflow deployment.
157
+
158
+ request_options : typing.Optional[RequestOptions]
159
+ Request-specific configuration.
160
+
161
+ Returns
162
+ -------
163
+ WorkflowDeploymentHistoryItem
164
+
165
+
166
+ Examples
167
+ --------
168
+ from vellum import Vellum
169
+
170
+ client = Vellum(
171
+ api_key="YOUR_API_KEY",
172
+ )
173
+ client.workflow_deployments.workflow_deployment_history_item_retrieve(
174
+ history_id_or_release_tag="history_id_or_release_tag",
175
+ id="id",
176
+ )
177
+ """
178
+ _response = self._client_wrapper.httpx_client.request(
179
+ f"v1/workflow-deployments/{jsonable_encoder(id)}/history/{jsonable_encoder(history_id_or_release_tag)}",
180
+ base_url=self._client_wrapper.get_environment().default,
181
+ method="GET",
182
+ request_options=request_options,
183
+ )
184
+ try:
185
+ if 200 <= _response.status_code < 300:
186
+ return typing.cast(
187
+ WorkflowDeploymentHistoryItem,
188
+ parse_obj_as(
189
+ type_=WorkflowDeploymentHistoryItem, # type: ignore
190
+ object_=_response.json(),
191
+ ),
192
+ )
193
+ _response_json = _response.json()
194
+ except JSONDecodeError:
195
+ raise ApiError(status_code=_response.status_code, body=_response.text)
196
+ raise ApiError(status_code=_response.status_code, body=_response_json)
197
+
143
198
  def list_workflow_release_tags(
144
199
  self,
145
200
  id: str,
@@ -474,6 +529,68 @@ class AsyncWorkflowDeploymentsClient:
474
529
  raise ApiError(status_code=_response.status_code, body=_response.text)
475
530
  raise ApiError(status_code=_response.status_code, body=_response_json)
476
531
 
532
+ async def workflow_deployment_history_item_retrieve(
533
+ self, history_id_or_release_tag: str, id: str, *, request_options: typing.Optional[RequestOptions] = None
534
+ ) -> WorkflowDeploymentHistoryItem:
535
+ """
536
+ Retrieve a specific Workflow Deployment History Item by either its UUID or the name of a Release Tag that points to it.
537
+
538
+ Parameters
539
+ ----------
540
+ history_id_or_release_tag : str
541
+ Either the UUID of Workflow Deployment History Item you'd like to retrieve, or the name of a Release Tag that's pointing to the Workflow Deployment History Item you'd like to retrieve.
542
+
543
+ id : str
544
+ A UUID string identifying this workflow deployment.
545
+
546
+ request_options : typing.Optional[RequestOptions]
547
+ Request-specific configuration.
548
+
549
+ Returns
550
+ -------
551
+ WorkflowDeploymentHistoryItem
552
+
553
+
554
+ Examples
555
+ --------
556
+ import asyncio
557
+
558
+ from vellum import AsyncVellum
559
+
560
+ client = AsyncVellum(
561
+ api_key="YOUR_API_KEY",
562
+ )
563
+
564
+
565
+ async def main() -> None:
566
+ await client.workflow_deployments.workflow_deployment_history_item_retrieve(
567
+ history_id_or_release_tag="history_id_or_release_tag",
568
+ id="id",
569
+ )
570
+
571
+
572
+ asyncio.run(main())
573
+ """
574
+ _response = await self._client_wrapper.httpx_client.request(
575
+ f"v1/workflow-deployments/{jsonable_encoder(id)}/history/{jsonable_encoder(history_id_or_release_tag)}",
576
+ base_url=self._client_wrapper.get_environment().default,
577
+ method="GET",
578
+ request_options=request_options,
579
+ )
580
+ try:
581
+ if 200 <= _response.status_code < 300:
582
+ return typing.cast(
583
+ WorkflowDeploymentHistoryItem,
584
+ parse_obj_as(
585
+ type_=WorkflowDeploymentHistoryItem, # type: ignore
586
+ object_=_response.json(),
587
+ ),
588
+ )
589
+ _response_json = _response.json()
590
+ except JSONDecodeError:
591
+ raise ApiError(status_code=_response.status_code, body=_response.text)
592
+ raise ApiError(status_code=_response.status_code, body=_response_json)
593
+
477
594
  async def list_workflow_release_tags(
478
595
  self,
479
596
  id: str,
@@ -73,6 +73,7 @@ from .conditional_node_result import ConditionalNodeResult
73
73
  from .conditional_node_result_data import ConditionalNodeResultData
74
74
  from .container_image_read import ContainerImageRead
75
75
  from .create_test_suite_test_case_request import CreateTestSuiteTestCaseRequest
76
+ from .deployment_history_item import DeploymentHistoryItem
76
77
  from .deployment_provider_payload_response import DeploymentProviderPayloadResponse
77
78
  from .deployment_provider_payload_response_payload import DeploymentProviderPayloadResponsePayload
78
79
  from .deployment_read import DeploymentRead
@@ -198,6 +199,7 @@ from .metadata_filters_request import MetadataFiltersRequest
198
199
  from .metric_definition_execution import MetricDefinitionExecution
199
200
  from .metric_definition_input import MetricDefinitionInput
200
201
  from .metric_node_result import MetricNodeResult
202
+ from .ml_model_read import MlModelRead
201
203
  from .ml_model_usage import MlModelUsage
202
204
  from .named_scenario_input_chat_history_variable_value_request import NamedScenarioInputChatHistoryVariableValueRequest
203
205
  from .named_scenario_input_json_variable_value_request import NamedScenarioInputJsonVariableValueRequest
@@ -450,6 +452,7 @@ from .vellum_value_request import VellumValueRequest
450
452
  from .vellum_variable import VellumVariable
451
453
  from .vellum_variable_extensions import VellumVariableExtensions
452
454
  from .vellum_variable_type import VellumVariableType
455
+ from .workflow_deployment_history_item import WorkflowDeploymentHistoryItem
453
456
  from .workflow_deployment_read import WorkflowDeploymentRead
454
457
  from .workflow_event_error import WorkflowEventError
455
458
  from .workflow_execution_actual_chat_history_request import WorkflowExecutionActualChatHistoryRequest
@@ -562,6 +565,7 @@ __all__ = [
562
565
  "ConditionalNodeResultData",
563
566
  "ContainerImageRead",
564
567
  "CreateTestSuiteTestCaseRequest",
568
+ "DeploymentHistoryItem",
565
569
  "DeploymentProviderPayloadResponse",
566
570
  "DeploymentProviderPayloadResponsePayload",
567
571
  "DeploymentRead",
@@ -683,6 +687,7 @@ __all__ = [
683
687
  "MetricDefinitionExecution",
684
688
  "MetricDefinitionInput",
685
689
  "MetricNodeResult",
690
+ "MlModelRead",
686
691
  "MlModelUsage",
687
692
  "NamedScenarioInputChatHistoryVariableValueRequest",
688
693
  "NamedScenarioInputJsonVariableValueRequest",
@@ -931,6 +936,7 @@ __all__ = [
931
936
  "VellumVariable",
932
937
  "VellumVariableExtensions",
933
938
  "VellumVariableType",
939
+ "WorkflowDeploymentHistoryItem",
934
940
  "WorkflowDeploymentRead",
935
941
  "WorkflowEventError",
936
942
  "WorkflowExecutionActualChatHistoryRequest",
@@ -0,0 +1,44 @@
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
+ from .array_vellum_value import ArrayVellumValue
6
+ import datetime as dt
7
+ import pydantic
8
+ import typing
9
+ from .vellum_variable import VellumVariable
10
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
11
+ from ..core.pydantic_utilities import update_forward_refs
12
+
13
+
14
+ class DeploymentHistoryItem(UniversalBaseModel):
15
+ id: str
16
+ deployment_id: str
17
+ timestamp: dt.datetime
18
+ label: str = pydantic.Field()
19
+ """
20
+ A human-readable label for the deployment
21
+ """
22
+
23
+ name: str = pydantic.Field()
24
+ """
25
+ A name that uniquely identifies this deployment within its workspace
26
+ """
27
+
28
+ input_variables: typing.List[VellumVariable]
29
+ description: typing.Optional[str] = pydantic.Field(default=None)
30
+ """
31
+ A human-readable description of the deployment
32
+ """
33
+
34
+ if IS_PYDANTIC_V2:
35
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
36
+ else:
37
+
38
+ class Config:
39
+ frozen = True
40
+ smart_union = True
41
+ extra = pydantic.Extra.allow
42
+
43
+
44
+ update_forward_refs(ArrayVellumValue, DeploymentHistoryItem=DeploymentHistoryItem)
@@ -0,0 +1,27 @@
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 ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import typing
7
+
8
+
9
+ class MlModelRead(UniversalBaseModel):
10
+ """
11
+ An ML Model that your Workspace has access to.
12
+ """
13
+
14
+ id: str
15
+ name: str = pydantic.Field()
16
+ """
17
+ The unique name of the ML Model.
18
+ """
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
+ else:
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ extra = pydantic.Extra.allow