vellum-ai 0.3.7__py3-none-any.whl → 0.3.9__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. vellum/__init__.py +64 -0
  2. vellum/client.py +8 -8
  3. vellum/core/client_wrapper.py +1 -1
  4. vellum/resources/deployments/client.py +2 -2
  5. vellum/resources/workflow_deployments/client.py +65 -8
  6. vellum/types/__init__.py +66 -0
  7. vellum/types/array_enum.py +5 -0
  8. vellum/types/array_variable_value_item.py +89 -0
  9. vellum/types/chat_history_variable_value.py +29 -0
  10. vellum/types/code_execution_node_result_data.py +1 -0
  11. vellum/types/node_input_compiled_array_value.py +31 -0
  12. vellum/types/node_input_variable_compiled_value.py +11 -0
  13. vellum/types/node_output_compiled_array_value.py +30 -0
  14. vellum/types/node_output_compiled_function_value.py +30 -0
  15. vellum/types/node_output_compiled_value.py +22 -0
  16. vellum/types/number_variable_value.py +28 -0
  17. vellum/types/prompt_node_result_data.py +1 -0
  18. vellum/types/search_results_variable_value.py +29 -0
  19. vellum/types/subworkflow_enum.py +5 -0
  20. vellum/types/subworkflow_node_result.py +30 -0
  21. vellum/types/terminal_node_array_result.py +31 -0
  22. vellum/types/terminal_node_function_call_result.py +31 -0
  23. vellum/types/terminal_node_result_output.py +22 -0
  24. vellum/types/vellum_error_code_enum.py +5 -0
  25. vellum/types/workflow_deployment_read.py +57 -0
  26. vellum/types/workflow_execution_event_error_code.py +5 -0
  27. vellum/types/workflow_node_result_data.py +11 -0
  28. vellum/types/workflow_output.py +11 -0
  29. vellum/types/workflow_output_array.py +35 -0
  30. vellum/types/workflow_request_chat_history_input_request.py +4 -0
  31. vellum/types/workflow_request_json_input_request.py +4 -0
  32. vellum/types/workflow_request_number_input_request.py +4 -0
  33. vellum/types/workflow_request_string_input_request.py +4 -0
  34. vellum/types/workflow_result_event_output_data.py +22 -0
  35. vellum/types/workflow_result_event_output_data_array.py +41 -0
  36. vellum/types/workflow_result_event_output_data_function_call.py +41 -0
  37. {vellum_ai-0.3.7.dist-info → vellum_ai-0.3.9.dist-info}/METADATA +1 -1
  38. {vellum_ai-0.3.7.dist-info → vellum_ai-0.3.9.dist-info}/RECORD +40 -24
  39. {vellum_ai-0.3.7.dist-info → vellum_ai-0.3.9.dist-info}/LICENSE +0 -0
  40. {vellum_ai-0.3.7.dist-info → vellum_ai-0.3.9.dist-info}/WHEEL +0 -0
vellum/__init__.py CHANGED
@@ -13,9 +13,19 @@ from .types import (
13
13
  ArrayChatMessageContentItem_Image,
14
14
  ArrayChatMessageContentItem_String,
15
15
  ArrayChatMessageContentRequest,
16
+ ArrayEnum,
17
+ ArrayVariableValueItem,
18
+ ArrayVariableValueItem_ChatHistory,
19
+ ArrayVariableValueItem_Error,
20
+ ArrayVariableValueItem_FunctionCall,
21
+ ArrayVariableValueItem_Json,
22
+ ArrayVariableValueItem_Number,
23
+ ArrayVariableValueItem_SearchResults,
24
+ ArrayVariableValueItem_String,
16
25
  BlockTypeEnum,
17
26
  ChatHistoryEnum,
18
27
  ChatHistoryInputRequest,
28
+ ChatHistoryVariableValue,
19
29
  ChatMessage,
20
30
  ChatMessageContent,
21
31
  ChatMessageContentRequest,
@@ -134,6 +144,7 @@ from .types import (
134
144
  NamedTestCaseVariableValueRequest_Number,
135
145
  NamedTestCaseVariableValueRequest_SearchResults,
136
146
  NamedTestCaseVariableValueRequest_String,
147
+ NodeInputCompiledArrayValue,
137
148
  NodeInputCompiledChatHistoryValue,
138
149
  NodeInputCompiledErrorValue,
139
150
  NodeInputCompiledJsonValue,
@@ -141,21 +152,26 @@ from .types import (
141
152
  NodeInputCompiledSearchResultsValue,
142
153
  NodeInputCompiledStringValue,
143
154
  NodeInputVariableCompiledValue,
155
+ NodeInputVariableCompiledValue_Array,
144
156
  NodeInputVariableCompiledValue_ChatHistory,
145
157
  NodeInputVariableCompiledValue_Error,
146
158
  NodeInputVariableCompiledValue_Json,
147
159
  NodeInputVariableCompiledValue_Number,
148
160
  NodeInputVariableCompiledValue_SearchResults,
149
161
  NodeInputVariableCompiledValue_String,
162
+ NodeOutputCompiledArrayValue,
150
163
  NodeOutputCompiledChatHistoryValue,
151
164
  NodeOutputCompiledErrorValue,
165
+ NodeOutputCompiledFunctionValue,
152
166
  NodeOutputCompiledJsonValue,
153
167
  NodeOutputCompiledNumberValue,
154
168
  NodeOutputCompiledSearchResultsValue,
155
169
  NodeOutputCompiledStringValue,
156
170
  NodeOutputCompiledValue,
171
+ NodeOutputCompiledValue_Array,
157
172
  NodeOutputCompiledValue_ChatHistory,
158
173
  NodeOutputCompiledValue_Error,
174
+ NodeOutputCompiledValue_FunctionCall,
159
175
  NodeOutputCompiledValue_Json,
160
176
  NodeOutputCompiledValue_Number,
161
177
  NodeOutputCompiledValue_SearchResults,
@@ -163,6 +179,7 @@ from .types import (
163
179
  NormalizedLogProbs,
164
180
  NormalizedTokenLogProbs,
165
181
  NumberEnum,
182
+ NumberVariableValue,
166
183
  PaginatedSlimDeploymentReadList,
167
184
  PaginatedSlimDocumentList,
168
185
  PaginatedSlimWorkflowDeploymentList,
@@ -222,6 +239,7 @@ from .types import (
222
239
  SearchResultMergingRequest,
223
240
  SearchResultRequest,
224
241
  SearchResultsEnum,
242
+ SearchResultsVariableValue,
225
243
  SearchWeightsRequest,
226
244
  SlimDeploymentRead,
227
245
  SlimDocument,
@@ -241,6 +259,8 @@ from .types import (
241
259
  SubmitWorkflowExecutionActualRequest_ChatHistory,
242
260
  SubmitWorkflowExecutionActualRequest_Json,
243
261
  SubmitWorkflowExecutionActualRequest_String,
262
+ SubworkflowEnum,
263
+ SubworkflowNodeResult,
244
264
  TemplatingNodeChatHistoryResult,
245
265
  TemplatingNodeErrorResult,
246
266
  TemplatingNodeJsonResult,
@@ -256,15 +276,19 @@ from .types import (
256
276
  TemplatingNodeResultOutput_String,
257
277
  TemplatingNodeSearchResultsResult,
258
278
  TemplatingNodeStringResult,
279
+ TerminalNodeArrayResult,
259
280
  TerminalNodeChatHistoryResult,
260
281
  TerminalNodeErrorResult,
282
+ TerminalNodeFunctionCallResult,
261
283
  TerminalNodeJsonResult,
262
284
  TerminalNodeNumberResult,
263
285
  TerminalNodeResult,
264
286
  TerminalNodeResultData,
265
287
  TerminalNodeResultOutput,
288
+ TerminalNodeResultOutput_Array,
266
289
  TerminalNodeResultOutput_ChatHistory,
267
290
  TerminalNodeResultOutput_Error,
291
+ TerminalNodeResultOutput_FunctionCall,
268
292
  TerminalNodeResultOutput_Json,
269
293
  TerminalNodeResultOutput_Number,
270
294
  TerminalNodeResultOutput_SearchResults,
@@ -294,6 +318,7 @@ from .types import (
294
318
  VellumImageRequest,
295
319
  VellumVariable,
296
320
  VellumVariableType,
321
+ WorkflowDeploymentRead,
297
322
  WorkflowEventError,
298
323
  WorkflowExecutionActualChatHistoryRequest,
299
324
  WorkflowExecutionActualJsonRequest,
@@ -308,6 +333,7 @@ from .types import (
308
333
  WorkflowNodeResultData_Conditional,
309
334
  WorkflowNodeResultData_Prompt,
310
335
  WorkflowNodeResultData_Search,
336
+ WorkflowNodeResultData_Subworkflow,
311
337
  WorkflowNodeResultData_Templating,
312
338
  WorkflowNodeResultData_Terminal,
313
339
  WorkflowNodeResultEvent,
@@ -317,6 +343,7 @@ from .types import (
317
343
  WorkflowNodeResultEvent_Rejected,
318
344
  WorkflowNodeResultEvent_Streaming,
319
345
  WorkflowOutput,
346
+ WorkflowOutputArray,
320
347
  WorkflowOutputChatHistory,
321
348
  WorkflowOutputError,
322
349
  WorkflowOutputFunctionCall,
@@ -325,6 +352,7 @@ from .types import (
325
352
  WorkflowOutputNumber,
326
353
  WorkflowOutputSearchResults,
327
354
  WorkflowOutputString,
355
+ WorkflowOutput_Array,
328
356
  WorkflowOutput_ChatHistory,
329
357
  WorkflowOutput_Error,
330
358
  WorkflowOutput_FunctionCall,
@@ -344,14 +372,18 @@ from .types import (
344
372
  WorkflowRequestStringInputRequest,
345
373
  WorkflowResultEvent,
346
374
  WorkflowResultEventOutputData,
375
+ WorkflowResultEventOutputDataArray,
347
376
  WorkflowResultEventOutputDataChatHistory,
348
377
  WorkflowResultEventOutputDataError,
378
+ WorkflowResultEventOutputDataFunctionCall,
349
379
  WorkflowResultEventOutputDataJson,
350
380
  WorkflowResultEventOutputDataNumber,
351
381
  WorkflowResultEventOutputDataSearchResults,
352
382
  WorkflowResultEventOutputDataString,
383
+ WorkflowResultEventOutputData_Array,
353
384
  WorkflowResultEventOutputData_ChatHistory,
354
385
  WorkflowResultEventOutputData_Error,
386
+ WorkflowResultEventOutputData_FunctionCall,
355
387
  WorkflowResultEventOutputData_Json,
356
388
  WorkflowResultEventOutputData_Number,
357
389
  WorkflowResultEventOutputData_SearchResults,
@@ -389,10 +421,20 @@ __all__ = [
389
421
  "ArrayChatMessageContentItem_Image",
390
422
  "ArrayChatMessageContentItem_String",
391
423
  "ArrayChatMessageContentRequest",
424
+ "ArrayEnum",
425
+ "ArrayVariableValueItem",
426
+ "ArrayVariableValueItem_ChatHistory",
427
+ "ArrayVariableValueItem_Error",
428
+ "ArrayVariableValueItem_FunctionCall",
429
+ "ArrayVariableValueItem_Json",
430
+ "ArrayVariableValueItem_Number",
431
+ "ArrayVariableValueItem_SearchResults",
432
+ "ArrayVariableValueItem_String",
392
433
  "BadRequestError",
393
434
  "BlockTypeEnum",
394
435
  "ChatHistoryEnum",
395
436
  "ChatHistoryInputRequest",
437
+ "ChatHistoryVariableValue",
396
438
  "ChatMessage",
397
439
  "ChatMessageContent",
398
440
  "ChatMessageContentRequest",
@@ -515,6 +557,7 @@ __all__ = [
515
557
  "NamedTestCaseVariableValueRequest_Number",
516
558
  "NamedTestCaseVariableValueRequest_SearchResults",
517
559
  "NamedTestCaseVariableValueRequest_String",
560
+ "NodeInputCompiledArrayValue",
518
561
  "NodeInputCompiledChatHistoryValue",
519
562
  "NodeInputCompiledErrorValue",
520
563
  "NodeInputCompiledJsonValue",
@@ -522,21 +565,26 @@ __all__ = [
522
565
  "NodeInputCompiledSearchResultsValue",
523
566
  "NodeInputCompiledStringValue",
524
567
  "NodeInputVariableCompiledValue",
568
+ "NodeInputVariableCompiledValue_Array",
525
569
  "NodeInputVariableCompiledValue_ChatHistory",
526
570
  "NodeInputVariableCompiledValue_Error",
527
571
  "NodeInputVariableCompiledValue_Json",
528
572
  "NodeInputVariableCompiledValue_Number",
529
573
  "NodeInputVariableCompiledValue_SearchResults",
530
574
  "NodeInputVariableCompiledValue_String",
575
+ "NodeOutputCompiledArrayValue",
531
576
  "NodeOutputCompiledChatHistoryValue",
532
577
  "NodeOutputCompiledErrorValue",
578
+ "NodeOutputCompiledFunctionValue",
533
579
  "NodeOutputCompiledJsonValue",
534
580
  "NodeOutputCompiledNumberValue",
535
581
  "NodeOutputCompiledSearchResultsValue",
536
582
  "NodeOutputCompiledStringValue",
537
583
  "NodeOutputCompiledValue",
584
+ "NodeOutputCompiledValue_Array",
538
585
  "NodeOutputCompiledValue_ChatHistory",
539
586
  "NodeOutputCompiledValue_Error",
587
+ "NodeOutputCompiledValue_FunctionCall",
540
588
  "NodeOutputCompiledValue_Json",
541
589
  "NodeOutputCompiledValue_Number",
542
590
  "NodeOutputCompiledValue_SearchResults",
@@ -545,6 +593,7 @@ __all__ = [
545
593
  "NormalizedTokenLogProbs",
546
594
  "NotFoundError",
547
595
  "NumberEnum",
596
+ "NumberVariableValue",
548
597
  "PaginatedSlimDeploymentReadList",
549
598
  "PaginatedSlimDocumentList",
550
599
  "PaginatedSlimWorkflowDeploymentList",
@@ -604,6 +653,7 @@ __all__ = [
604
653
  "SearchResultMergingRequest",
605
654
  "SearchResultRequest",
606
655
  "SearchResultsEnum",
656
+ "SearchResultsVariableValue",
607
657
  "SearchWeightsRequest",
608
658
  "SlimDeploymentRead",
609
659
  "SlimDocument",
@@ -623,6 +673,8 @@ __all__ = [
623
673
  "SubmitWorkflowExecutionActualRequest_ChatHistory",
624
674
  "SubmitWorkflowExecutionActualRequest_Json",
625
675
  "SubmitWorkflowExecutionActualRequest_String",
676
+ "SubworkflowEnum",
677
+ "SubworkflowNodeResult",
626
678
  "TemplatingNodeChatHistoryResult",
627
679
  "TemplatingNodeErrorResult",
628
680
  "TemplatingNodeJsonResult",
@@ -638,15 +690,19 @@ __all__ = [
638
690
  "TemplatingNodeResultOutput_String",
639
691
  "TemplatingNodeSearchResultsResult",
640
692
  "TemplatingNodeStringResult",
693
+ "TerminalNodeArrayResult",
641
694
  "TerminalNodeChatHistoryResult",
642
695
  "TerminalNodeErrorResult",
696
+ "TerminalNodeFunctionCallResult",
643
697
  "TerminalNodeJsonResult",
644
698
  "TerminalNodeNumberResult",
645
699
  "TerminalNodeResult",
646
700
  "TerminalNodeResultData",
647
701
  "TerminalNodeResultOutput",
702
+ "TerminalNodeResultOutput_Array",
648
703
  "TerminalNodeResultOutput_ChatHistory",
649
704
  "TerminalNodeResultOutput_Error",
705
+ "TerminalNodeResultOutput_FunctionCall",
650
706
  "TerminalNodeResultOutput_Json",
651
707
  "TerminalNodeResultOutput_Number",
652
708
  "TerminalNodeResultOutput_SearchResults",
@@ -677,6 +733,7 @@ __all__ = [
677
733
  "VellumImageRequest",
678
734
  "VellumVariable",
679
735
  "VellumVariableType",
736
+ "WorkflowDeploymentRead",
680
737
  "WorkflowDeploymentsListRequestStatus",
681
738
  "WorkflowEventError",
682
739
  "WorkflowExecutionActualChatHistoryRequest",
@@ -692,6 +749,7 @@ __all__ = [
692
749
  "WorkflowNodeResultData_Conditional",
693
750
  "WorkflowNodeResultData_Prompt",
694
751
  "WorkflowNodeResultData_Search",
752
+ "WorkflowNodeResultData_Subworkflow",
695
753
  "WorkflowNodeResultData_Templating",
696
754
  "WorkflowNodeResultData_Terminal",
697
755
  "WorkflowNodeResultEvent",
@@ -701,6 +759,7 @@ __all__ = [
701
759
  "WorkflowNodeResultEvent_Rejected",
702
760
  "WorkflowNodeResultEvent_Streaming",
703
761
  "WorkflowOutput",
762
+ "WorkflowOutputArray",
704
763
  "WorkflowOutputChatHistory",
705
764
  "WorkflowOutputError",
706
765
  "WorkflowOutputFunctionCall",
@@ -709,6 +768,7 @@ __all__ = [
709
768
  "WorkflowOutputNumber",
710
769
  "WorkflowOutputSearchResults",
711
770
  "WorkflowOutputString",
771
+ "WorkflowOutput_Array",
712
772
  "WorkflowOutput_ChatHistory",
713
773
  "WorkflowOutput_Error",
714
774
  "WorkflowOutput_FunctionCall",
@@ -728,14 +788,18 @@ __all__ = [
728
788
  "WorkflowRequestStringInputRequest",
729
789
  "WorkflowResultEvent",
730
790
  "WorkflowResultEventOutputData",
791
+ "WorkflowResultEventOutputDataArray",
731
792
  "WorkflowResultEventOutputDataChatHistory",
732
793
  "WorkflowResultEventOutputDataError",
794
+ "WorkflowResultEventOutputDataFunctionCall",
733
795
  "WorkflowResultEventOutputDataJson",
734
796
  "WorkflowResultEventOutputDataNumber",
735
797
  "WorkflowResultEventOutputDataSearchResults",
736
798
  "WorkflowResultEventOutputDataString",
799
+ "WorkflowResultEventOutputData_Array",
737
800
  "WorkflowResultEventOutputData_ChatHistory",
738
801
  "WorkflowResultEventOutputData_Error",
802
+ "WorkflowResultEventOutputData_FunctionCall",
739
803
  "WorkflowResultEventOutputData_Json",
740
804
  "WorkflowResultEventOutputData_Number",
741
805
  "WorkflowResultEventOutputData_SearchResults",
vellum/client.py CHANGED
@@ -100,7 +100,7 @@ class Vellum:
100
100
 
101
101
  - release_tag: typing.Optional[str]. Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment
102
102
 
103
- - external_id: typing.Optional[str].
103
+ - external_id: typing.Optional[str]. "Optionally include a unique identifier for tracking purposes. Must be unique for a given prompt deployment.
104
104
 
105
105
  - expand_meta: typing.Optional[PromptDeploymentExpandMetaRequestRequest]. The name of the Prompt Deployment. Must provide either this or prompt_deployment_id.
106
106
 
@@ -175,7 +175,7 @@ class Vellum:
175
175
 
176
176
  - release_tag: typing.Optional[str]. Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment
177
177
 
178
- - external_id: typing.Optional[str].
178
+ - external_id: typing.Optional[str]. "Optionally include a unique identifier for tracking purposes. Must be unique for a given prompt deployment.
179
179
 
180
180
  - expand_meta: typing.Optional[PromptDeploymentExpandMetaRequestRequest]. The name of the Prompt Deployment. Must provide either this or prompt_deployment_id.
181
181
 
@@ -251,7 +251,7 @@ class Vellum:
251
251
 
252
252
  - inputs: typing.List[WorkflowRequestInputRequest]. The list of inputs defined in the Workflow's Deployment with their corresponding values.
253
253
 
254
- - external_id: typing.Optional[str]. Optionally include a unique identifier for monitoring purposes.
254
+ - external_id: typing.Optional[str]. Optionally include a unique identifier for monitoring purposes. Must be unique for a given workflow deployment.
255
255
  """
256
256
  _request: typing.Dict[str, typing.Any] = {"inputs": inputs}
257
257
  if workflow_deployment_id is not OMIT:
@@ -305,7 +305,7 @@ class Vellum:
305
305
 
306
306
  - inputs: typing.List[WorkflowRequestInputRequest]. The list of inputs defined in the Workflow's deployment with their corresponding values.
307
307
 
308
- - external_id: typing.Optional[str]. Optionally include a unique identifier for tracking purposes.
308
+ - external_id: typing.Optional[str]. Optionally include a unique identifier for tracking purposes. Must be unique for a given workflow deployment.
309
309
 
310
310
  - event_types: typing.Optional[typing.List[WorkflowExecutionEventType]]. Optionally specify which events you want to receive. Defaults to only WORKFLOW events. Note that the schema of non-WORKFLOW events is unstable and should be used with caution.
311
311
  """
@@ -683,7 +683,7 @@ class AsyncVellum:
683
683
 
684
684
  - release_tag: typing.Optional[str]. Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment
685
685
 
686
- - external_id: typing.Optional[str].
686
+ - external_id: typing.Optional[str]. "Optionally include a unique identifier for tracking purposes. Must be unique for a given prompt deployment.
687
687
 
688
688
  - expand_meta: typing.Optional[PromptDeploymentExpandMetaRequestRequest]. The name of the Prompt Deployment. Must provide either this or prompt_deployment_id.
689
689
 
@@ -758,7 +758,7 @@ class AsyncVellum:
758
758
 
759
759
  - release_tag: typing.Optional[str]. Optionally specify a release tag if you want to pin to a specific release of the Prompt Deployment
760
760
 
761
- - external_id: typing.Optional[str].
761
+ - external_id: typing.Optional[str]. "Optionally include a unique identifier for tracking purposes. Must be unique for a given prompt deployment.
762
762
 
763
763
  - expand_meta: typing.Optional[PromptDeploymentExpandMetaRequestRequest]. The name of the Prompt Deployment. Must provide either this or prompt_deployment_id.
764
764
 
@@ -834,7 +834,7 @@ class AsyncVellum:
834
834
 
835
835
  - inputs: typing.List[WorkflowRequestInputRequest]. The list of inputs defined in the Workflow's Deployment with their corresponding values.
836
836
 
837
- - external_id: typing.Optional[str]. Optionally include a unique identifier for monitoring purposes.
837
+ - external_id: typing.Optional[str]. Optionally include a unique identifier for monitoring purposes. Must be unique for a given workflow deployment.
838
838
  """
839
839
  _request: typing.Dict[str, typing.Any] = {"inputs": inputs}
840
840
  if workflow_deployment_id is not OMIT:
@@ -888,7 +888,7 @@ class AsyncVellum:
888
888
 
889
889
  - inputs: typing.List[WorkflowRequestInputRequest]. The list of inputs defined in the Workflow's deployment with their corresponding values.
890
890
 
891
- - external_id: typing.Optional[str]. Optionally include a unique identifier for tracking purposes.
891
+ - external_id: typing.Optional[str]. Optionally include a unique identifier for tracking purposes. Must be unique for a given workflow deployment.
892
892
 
893
893
  - event_types: typing.Optional[typing.List[WorkflowExecutionEventType]]. Optionally specify which events you want to receive. Defaults to only WORKFLOW events. Note that the schema of non-WORKFLOW events is unstable and should be used with caution.
894
894
  """
@@ -16,7 +16,7 @@ class BaseClientWrapper:
16
16
  headers: typing.Dict[str, str] = {
17
17
  "X-Fern-Language": "Python",
18
18
  "X-Fern-SDK-Name": "vellum-ai",
19
- "X-Fern-SDK-Version": "0.3.7",
19
+ "X-Fern-SDK-Version": "0.3.9",
20
20
  }
21
21
  headers["X_API_KEY"] = self.api_key
22
22
  return headers
@@ -43,7 +43,7 @@ class DeploymentsClient:
43
43
 
44
44
  - ordering: typing.Optional[str]. Which field to use when ordering the results.
45
45
 
46
- - status: typing.Optional[DeploymentsListRequestStatus]. The current status of the deployment
46
+ - status: typing.Optional[DeploymentsListRequestStatus]. status
47
47
  ---
48
48
  from vellum.client import Vellum
49
49
 
@@ -164,7 +164,7 @@ class AsyncDeploymentsClient:
164
164
 
165
165
  - ordering: typing.Optional[str]. Which field to use when ordering the results.
166
166
 
167
- - status: typing.Optional[DeploymentsListRequestStatus]. The current status of the deployment
167
+ - status: typing.Optional[DeploymentsListRequestStatus]. status
168
168
  ---
169
169
  from vellum.client import AsyncVellum
170
170
 
@@ -8,6 +8,7 @@ from ...core.api_error import ApiError
8
8
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
9
  from ...core.remove_none_from_dict import remove_none_from_dict
10
10
  from ...types.paginated_slim_workflow_deployment_list import PaginatedSlimWorkflowDeploymentList
11
+ from ...types.workflow_deployment_read import WorkflowDeploymentRead
11
12
  from .types.workflow_deployments_list_request_status import WorkflowDeploymentsListRequestStatus
12
13
 
13
14
  try:
@@ -36,10 +37,8 @@ class WorkflowDeploymentsClient:
36
37
 
37
38
  - ordering: typing.Optional[str]. Which field to use when ordering the results.
38
39
 
39
- - status: typing.Optional[WorkflowDeploymentsListRequestStatus]. The current status of the workflow deployment
40
-
41
- - `ACTIVE` - Active
42
- - `ARCHIVED` - Archived---
40
+ - status: typing.Optional[WorkflowDeploymentsListRequestStatus]. status
41
+ ---
43
42
  from vellum.client import Vellum
44
43
 
45
44
  client = Vellum(
@@ -62,6 +61,36 @@ class WorkflowDeploymentsClient:
62
61
  raise ApiError(status_code=_response.status_code, body=_response.text)
63
62
  raise ApiError(status_code=_response.status_code, body=_response_json)
64
63
 
64
+ def retrieve(self, id: str) -> WorkflowDeploymentRead:
65
+ """
66
+ Used to retrieve a workflow deployment given its ID or name.
67
+
68
+ Parameters:
69
+ - id: str. Either the Workflow Deployment's ID or its unique name
70
+ ---
71
+ from vellum.client import Vellum
72
+
73
+ client = Vellum(
74
+ api_key="YOUR_API_KEY",
75
+ )
76
+ client.workflow_deployments.retrieve(
77
+ id="id",
78
+ )
79
+ """
80
+ _response = self._client_wrapper.httpx_client.request(
81
+ "GET",
82
+ urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/workflow-deployments/{id}"),
83
+ headers=self._client_wrapper.get_headers(),
84
+ timeout=None,
85
+ )
86
+ if 200 <= _response.status_code < 300:
87
+ return pydantic.parse_obj_as(WorkflowDeploymentRead, _response.json()) # type: ignore
88
+ try:
89
+ _response_json = _response.json()
90
+ except JSONDecodeError:
91
+ raise ApiError(status_code=_response.status_code, body=_response.text)
92
+ raise ApiError(status_code=_response.status_code, body=_response_json)
93
+
65
94
 
66
95
  class AsyncWorkflowDeploymentsClient:
67
96
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -83,10 +112,8 @@ class AsyncWorkflowDeploymentsClient:
83
112
 
84
113
  - ordering: typing.Optional[str]. Which field to use when ordering the results.
85
114
 
86
- - status: typing.Optional[WorkflowDeploymentsListRequestStatus]. The current status of the workflow deployment
87
-
88
- - `ACTIVE` - Active
89
- - `ARCHIVED` - Archived---
115
+ - status: typing.Optional[WorkflowDeploymentsListRequestStatus]. status
116
+ ---
90
117
  from vellum.client import AsyncVellum
91
118
 
92
119
  client = AsyncVellum(
@@ -108,3 +135,33 @@ class AsyncWorkflowDeploymentsClient:
108
135
  except JSONDecodeError:
109
136
  raise ApiError(status_code=_response.status_code, body=_response.text)
110
137
  raise ApiError(status_code=_response.status_code, body=_response_json)
138
+
139
+ async def retrieve(self, id: str) -> WorkflowDeploymentRead:
140
+ """
141
+ Used to retrieve a workflow deployment given its ID or name.
142
+
143
+ Parameters:
144
+ - id: str. Either the Workflow Deployment's ID or its unique name
145
+ ---
146
+ from vellum.client import AsyncVellum
147
+
148
+ client = AsyncVellum(
149
+ api_key="YOUR_API_KEY",
150
+ )
151
+ await client.workflow_deployments.retrieve(
152
+ id="id",
153
+ )
154
+ """
155
+ _response = await self._client_wrapper.httpx_client.request(
156
+ "GET",
157
+ urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/workflow-deployments/{id}"),
158
+ headers=self._client_wrapper.get_headers(),
159
+ timeout=None,
160
+ )
161
+ if 200 <= _response.status_code < 300:
162
+ return pydantic.parse_obj_as(WorkflowDeploymentRead, _response.json()) # type: ignore
163
+ try:
164
+ _response_json = _response.json()
165
+ except JSONDecodeError:
166
+ raise ApiError(status_code=_response.status_code, body=_response.text)
167
+ raise ApiError(status_code=_response.status_code, body=_response_json)