vellum-ai 0.2.2__py3-none-any.whl → 0.3.2__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.
Files changed (46) hide show
  1. vellum/__init__.py +42 -40
  2. vellum/client.py +6 -52
  3. vellum/core/client_wrapper.py +1 -1
  4. vellum/resources/deployments/client.py +2 -6
  5. vellum/resources/document_indexes/client.py +50 -6
  6. vellum/resources/documents/client.py +16 -0
  7. vellum/resources/registered_prompts/client.py +4 -44
  8. vellum/resources/sandboxes/client.py +20 -47
  9. vellum/types/__init__.py +47 -43
  10. vellum/types/api_node_result.py +4 -0
  11. vellum/types/code_execution_node_result.py +4 -0
  12. vellum/types/conditional_node_result.py +4 -0
  13. vellum/types/{array_variable_value.py → fulfilled_workflow_node_result_event.py} +13 -9
  14. vellum/types/initiated_workflow_node_result_event.py +39 -0
  15. vellum/types/{chat_history_variable_value.py → node_output_compiled_chat_history_value.py} +2 -1
  16. vellum/types/node_output_compiled_error_value.py +30 -0
  17. vellum/types/{sandbox_metric_input_params.py → node_output_compiled_json_value.py} +3 -3
  18. vellum/types/{number_variable_value.py → node_output_compiled_number_value.py} +2 -1
  19. vellum/types/{search_results_variable_value.py → node_output_compiled_search_results_value.py} +2 -1
  20. vellum/types/node_output_compiled_string_value.py +29 -0
  21. vellum/types/node_output_compiled_value.py +78 -0
  22. vellum/types/prompt_node_result.py +4 -0
  23. vellum/types/{workflow_output_array.py → rejected_workflow_node_result_event.py} +9 -5
  24. vellum/types/sandbox_scenario.py +0 -2
  25. vellum/types/search_node_result.py +4 -0
  26. vellum/types/{evaluation_params.py → streaming_workflow_node_result_event.py} +14 -4
  27. vellum/types/templating_node_result.py +4 -0
  28. vellum/types/terminal_node_result.py +4 -0
  29. vellum/types/workflow_execution_node_result_event.py +4 -0
  30. vellum/types/workflow_execution_workflow_result_event.py +4 -0
  31. vellum/types/workflow_node_result_event.py +43 -26
  32. vellum/types/workflow_output.py +0 -11
  33. vellum/types/workflow_result_event_output_data_chat_history.py +4 -0
  34. vellum/types/workflow_result_event_output_data_error.py +4 -0
  35. vellum/types/workflow_result_event_output_data_json.py +4 -0
  36. vellum/types/workflow_result_event_output_data_number.py +4 -0
  37. vellum/types/workflow_result_event_output_data_search_results.py +4 -0
  38. vellum/types/workflow_result_event_output_data_string.py +4 -0
  39. {vellum_ai-0.2.2.dist-info → vellum_ai-0.3.2.dist-info}/METADATA +1 -1
  40. {vellum_ai-0.2.2.dist-info → vellum_ai-0.3.2.dist-info}/RECORD +42 -42
  41. vellum/types/array_enum.py +0 -5
  42. vellum/types/evaluation_params_request.py +0 -30
  43. vellum/types/sandbox_metric_input_params_request.py +0 -29
  44. vellum/types/variable_value.py +0 -102
  45. {vellum_ai-0.2.2.dist-info → vellum_ai-0.3.2.dist-info}/LICENSE +0 -0
  46. {vellum_ai-0.2.2.dist-info → vellum_ai-0.3.2.dist-info}/WHEEL +0 -0
@@ -7,7 +7,6 @@ from json.decoder import JSONDecodeError
7
7
  from ...core.api_error import ApiError
8
8
  from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
9
  from ...core.jsonable_encoder import jsonable_encoder
10
- from ...types.sandbox_metric_input_params_request import SandboxMetricInputParamsRequest
11
10
  from ...types.sandbox_scenario import SandboxScenario
12
11
  from ...types.scenario_input_request import ScenarioInputRequest
13
12
 
@@ -31,7 +30,6 @@ class SandboxesClient:
31
30
  label: typing.Optional[str] = OMIT,
32
31
  inputs: typing.List[ScenarioInputRequest],
33
32
  scenario_id: typing.Optional[str] = OMIT,
34
- metric_input_params: typing.Optional[SandboxMetricInputParamsRequest] = OMIT,
35
33
  ) -> SandboxScenario:
36
34
  """
37
35
  Upserts a new scenario for a sandbox, keying off of the optionally provided scenario id.
@@ -50,17 +48,8 @@ class SandboxesClient:
50
48
  - inputs: typing.List[ScenarioInputRequest]. The inputs for the scenario
51
49
 
52
50
  - scenario_id: typing.Optional[str]. The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
53
-
54
- - metric_input_params: typing.Optional[SandboxMetricInputParamsRequest].
55
51
  ---
56
- from vellum import (
57
- ChatMessageRequest,
58
- ChatMessageRole,
59
- EvaluationParamsRequest,
60
- SandboxMetricInputParamsRequest,
61
- ScenarioInputRequest,
62
- ScenarioInputTypeEnum,
63
- )
52
+ from vellum import ScenarioInputRequest, ScenarioInputTypeEnum
64
53
  from vellum.client import Vellum
65
54
 
66
55
  client = Vellum(
@@ -68,20 +57,19 @@ class SandboxesClient:
68
57
  )
69
58
  client.sandboxes.upsert_sandbox_scenario(
70
59
  id="string",
60
+ label="Scenario 1",
71
61
  inputs=[
72
62
  ScenarioInputRequest(
73
- key="string",
63
+ key="var_1",
74
64
  type=ScenarioInputTypeEnum.TEXT,
75
- chat_history=[
76
- ChatMessageRequest(
77
- role=ChatMessageRole.SYSTEM,
78
- )
79
- ],
80
- )
65
+ value="Hello, world!",
66
+ ),
67
+ ScenarioInputRequest(
68
+ key="var_2",
69
+ type=ScenarioInputTypeEnum.TEXT,
70
+ value="Why hello, there!",
71
+ ),
81
72
  ],
82
- metric_input_params=SandboxMetricInputParamsRequest(
83
- params=EvaluationParamsRequest(),
84
- ),
85
73
  )
86
74
  """
87
75
  _request: typing.Dict[str, typing.Any] = {"inputs": inputs}
@@ -89,8 +77,6 @@ class SandboxesClient:
89
77
  _request["label"] = label
90
78
  if scenario_id is not OMIT:
91
79
  _request["scenario_id"] = scenario_id
92
- if metric_input_params is not OMIT:
93
- _request["metric_input_params"] = metric_input_params
94
80
  _response = self._client_wrapper.httpx_client.request(
95
81
  "POST",
96
82
  urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/sandboxes/{id}/scenarios"),
@@ -153,7 +139,6 @@ class AsyncSandboxesClient:
153
139
  label: typing.Optional[str] = OMIT,
154
140
  inputs: typing.List[ScenarioInputRequest],
155
141
  scenario_id: typing.Optional[str] = OMIT,
156
- metric_input_params: typing.Optional[SandboxMetricInputParamsRequest] = OMIT,
157
142
  ) -> SandboxScenario:
158
143
  """
159
144
  Upserts a new scenario for a sandbox, keying off of the optionally provided scenario id.
@@ -172,17 +157,8 @@ class AsyncSandboxesClient:
172
157
  - inputs: typing.List[ScenarioInputRequest]. The inputs for the scenario
173
158
 
174
159
  - scenario_id: typing.Optional[str]. The id of the scenario to update. If none is provided, an id will be generated and a new scenario will be appended.
175
-
176
- - metric_input_params: typing.Optional[SandboxMetricInputParamsRequest].
177
160
  ---
178
- from vellum import (
179
- ChatMessageRequest,
180
- ChatMessageRole,
181
- EvaluationParamsRequest,
182
- SandboxMetricInputParamsRequest,
183
- ScenarioInputRequest,
184
- ScenarioInputTypeEnum,
185
- )
161
+ from vellum import ScenarioInputRequest, ScenarioInputTypeEnum
186
162
  from vellum.client import AsyncVellum
187
163
 
188
164
  client = AsyncVellum(
@@ -190,20 +166,19 @@ class AsyncSandboxesClient:
190
166
  )
191
167
  await client.sandboxes.upsert_sandbox_scenario(
192
168
  id="string",
169
+ label="Scenario 1",
193
170
  inputs=[
194
171
  ScenarioInputRequest(
195
- key="string",
172
+ key="var_1",
196
173
  type=ScenarioInputTypeEnum.TEXT,
197
- chat_history=[
198
- ChatMessageRequest(
199
- role=ChatMessageRole.SYSTEM,
200
- )
201
- ],
202
- )
174
+ value="Hello, world!",
175
+ ),
176
+ ScenarioInputRequest(
177
+ key="var_2",
178
+ type=ScenarioInputTypeEnum.TEXT,
179
+ value="Why hello, there!",
180
+ ),
203
181
  ],
204
- metric_input_params=SandboxMetricInputParamsRequest(
205
- params=EvaluationParamsRequest(),
206
- ),
207
182
  )
208
183
  """
209
184
  _request: typing.Dict[str, typing.Any] = {"inputs": inputs}
@@ -211,8 +186,6 @@ class AsyncSandboxesClient:
211
186
  _request["label"] = label
212
187
  if scenario_id is not OMIT:
213
188
  _request["scenario_id"] = scenario_id
214
- if metric_input_params is not OMIT:
215
- _request["metric_input_params"] = metric_input_params
216
189
  _response = await self._client_wrapper.httpx_client.request(
217
190
  "POST",
218
191
  urllib.parse.urljoin(f"{self._client_wrapper.get_environment().default}/", f"v1/sandboxes/{id}/scenarios"),
vellum/types/__init__.py CHANGED
@@ -16,12 +16,9 @@ from .array_chat_message_content_item_request import (
16
16
  ArrayChatMessageContentItemRequest_String,
17
17
  )
18
18
  from .array_chat_message_content_request import ArrayChatMessageContentRequest
19
- from .array_enum import ArrayEnum
20
- from .array_variable_value import ArrayVariableValue
21
19
  from .block_type_enum import BlockTypeEnum
22
20
  from .chat_history_enum import ChatHistoryEnum
23
21
  from .chat_history_input_request import ChatHistoryInputRequest
24
- from .chat_history_variable_value import ChatHistoryVariableValue
25
22
  from .chat_message import ChatMessage
26
23
  from .chat_message_content import (
27
24
  ChatMessageContent,
@@ -69,8 +66,6 @@ from .entity_status import EntityStatus
69
66
  from .environment_enum import EnvironmentEnum
70
67
  from .error_enum import ErrorEnum
71
68
  from .error_variable_value import ErrorVariableValue
72
- from .evaluation_params import EvaluationParams
73
- from .evaluation_params_request import EvaluationParamsRequest
74
69
  from .execute_prompt_api_error_response import ExecutePromptApiErrorResponse
75
70
  from .execute_prompt_event import (
76
71
  ExecutePromptEvent,
@@ -99,6 +94,7 @@ from .fulfilled_execute_prompt_response import FulfilledExecutePromptResponse
99
94
  from .fulfilled_execute_workflow_workflow_result_event import FulfilledExecuteWorkflowWorkflowResultEvent
100
95
  from .fulfilled_function_call import FulfilledFunctionCall
101
96
  from .fulfilled_prompt_execution_meta import FulfilledPromptExecutionMeta
97
+ from .fulfilled_workflow_node_result_event import FulfilledWorkflowNodeResultEvent
102
98
  from .function_call import FunctionCall, FunctionCall_Fulfilled, FunctionCall_Rejected
103
99
  from .function_call_chat_message_content import FunctionCallChatMessageContent
104
100
  from .function_call_chat_message_content_request import FunctionCallChatMessageContentRequest
@@ -123,6 +119,7 @@ from .indexing_state_enum import IndexingStateEnum
123
119
  from .initiated_enum import InitiatedEnum
124
120
  from .initiated_execute_prompt_event import InitiatedExecutePromptEvent
125
121
  from .initiated_prompt_execution_meta import InitiatedPromptExecutionMeta
122
+ from .initiated_workflow_node_result_event import InitiatedWorkflowNodeResultEvent
126
123
  from .json_enum import JsonEnum
127
124
  from .json_input_request import JsonInputRequest
128
125
  from .json_variable_value import JsonVariableValue
@@ -167,10 +164,24 @@ from .node_input_variable_compiled_value import (
167
164
  NodeInputVariableCompiledValue_SearchResults,
168
165
  NodeInputVariableCompiledValue_String,
169
166
  )
167
+ from .node_output_compiled_chat_history_value import NodeOutputCompiledChatHistoryValue
168
+ from .node_output_compiled_error_value import NodeOutputCompiledErrorValue
169
+ from .node_output_compiled_json_value import NodeOutputCompiledJsonValue
170
+ from .node_output_compiled_number_value import NodeOutputCompiledNumberValue
171
+ from .node_output_compiled_search_results_value import NodeOutputCompiledSearchResultsValue
172
+ from .node_output_compiled_string_value import NodeOutputCompiledStringValue
173
+ from .node_output_compiled_value import (
174
+ NodeOutputCompiledValue,
175
+ NodeOutputCompiledValue_ChatHistory,
176
+ NodeOutputCompiledValue_Error,
177
+ NodeOutputCompiledValue_Json,
178
+ NodeOutputCompiledValue_Number,
179
+ NodeOutputCompiledValue_SearchResults,
180
+ NodeOutputCompiledValue_String,
181
+ )
170
182
  from .normalized_log_probs import NormalizedLogProbs
171
183
  from .normalized_token_log_probs import NormalizedTokenLogProbs
172
184
  from .number_enum import NumberEnum
173
- from .number_variable_value import NumberVariableValue
174
185
  from .paginated_slim_deployment_read_list import PaginatedSlimDeploymentReadList
175
186
  from .paginated_slim_document_list import PaginatedSlimDocumentList
176
187
  from .paginated_slim_workflow_deployment_list import PaginatedSlimWorkflowDeploymentList
@@ -217,8 +228,7 @@ from .rejected_execute_prompt_response import RejectedExecutePromptResponse
217
228
  from .rejected_execute_workflow_workflow_result_event import RejectedExecuteWorkflowWorkflowResultEvent
218
229
  from .rejected_function_call import RejectedFunctionCall
219
230
  from .rejected_prompt_execution_meta import RejectedPromptExecutionMeta
220
- from .sandbox_metric_input_params import SandboxMetricInputParams
221
- from .sandbox_metric_input_params_request import SandboxMetricInputParamsRequest
231
+ from .rejected_workflow_node_result_event import RejectedWorkflowNodeResultEvent
222
232
  from .sandbox_scenario import SandboxScenario
223
233
  from .scenario_input import ScenarioInput
224
234
  from .scenario_input_request import ScenarioInputRequest
@@ -235,7 +245,6 @@ from .search_result_document_request import SearchResultDocumentRequest
235
245
  from .search_result_merging_request import SearchResultMergingRequest
236
246
  from .search_result_request import SearchResultRequest
237
247
  from .search_results_enum import SearchResultsEnum
238
- from .search_results_variable_value import SearchResultsVariableValue
239
248
  from .search_weights_request import SearchWeightsRequest
240
249
  from .slim_deployment_read import SlimDeploymentRead
241
250
  from .slim_document import SlimDocument
@@ -243,6 +252,7 @@ from .slim_workflow_deployment import SlimWorkflowDeployment
243
252
  from .streaming_enum import StreamingEnum
244
253
  from .streaming_execute_prompt_event import StreamingExecutePromptEvent
245
254
  from .streaming_prompt_execution_meta import StreamingPromptExecutionMeta
255
+ from .streaming_workflow_node_result_event import StreamingWorkflowNodeResultEvent
246
256
  from .string_chat_message_content import StringChatMessageContent
247
257
  from .string_chat_message_content_request import StringChatMessageContentRequest
248
258
  from .string_enum import StringEnum
@@ -308,17 +318,6 @@ from .test_case_variable_value import (
308
318
  from .test_suite_test_case import TestSuiteTestCase
309
319
  from .upload_document_error_response import UploadDocumentErrorResponse
310
320
  from .upload_document_response import UploadDocumentResponse
311
- from .variable_value import (
312
- VariableValue,
313
- VariableValue_Array,
314
- VariableValue_ChatHistory,
315
- VariableValue_Error,
316
- VariableValue_FunctionCall,
317
- VariableValue_Json,
318
- VariableValue_Number,
319
- VariableValue_SearchResults,
320
- VariableValue_String,
321
- )
322
321
  from .vellum_error import VellumError
323
322
  from .vellum_error_code_enum import VellumErrorCodeEnum
324
323
  from .vellum_error_request import VellumErrorRequest
@@ -344,11 +343,16 @@ from .workflow_node_result_data import (
344
343
  WorkflowNodeResultData_Templating,
345
344
  WorkflowNodeResultData_Terminal,
346
345
  )
347
- from .workflow_node_result_event import WorkflowNodeResultEvent
346
+ from .workflow_node_result_event import (
347
+ WorkflowNodeResultEvent,
348
+ WorkflowNodeResultEvent_Fulfilled,
349
+ WorkflowNodeResultEvent_Initiated,
350
+ WorkflowNodeResultEvent_Rejected,
351
+ WorkflowNodeResultEvent_Streaming,
352
+ )
348
353
  from .workflow_node_result_event_state import WorkflowNodeResultEventState
349
354
  from .workflow_output import (
350
355
  WorkflowOutput,
351
- WorkflowOutput_Array,
352
356
  WorkflowOutput_ChatHistory,
353
357
  WorkflowOutput_Error,
354
358
  WorkflowOutput_FunctionCall,
@@ -358,7 +362,6 @@ from .workflow_output import (
358
362
  WorkflowOutput_SearchResults,
359
363
  WorkflowOutput_String,
360
364
  )
361
- from .workflow_output_array import WorkflowOutputArray
362
365
  from .workflow_output_chat_history import WorkflowOutputChatHistory
363
366
  from .workflow_output_error import WorkflowOutputError
364
367
  from .workflow_output_function_call import WorkflowOutputFunctionCall
@@ -409,12 +412,9 @@ __all__ = [
409
412
  "ArrayChatMessageContentItem_Image",
410
413
  "ArrayChatMessageContentItem_String",
411
414
  "ArrayChatMessageContentRequest",
412
- "ArrayEnum",
413
- "ArrayVariableValue",
414
415
  "BlockTypeEnum",
415
416
  "ChatHistoryEnum",
416
417
  "ChatHistoryInputRequest",
417
- "ChatHistoryVariableValue",
418
418
  "ChatMessage",
419
419
  "ChatMessageContent",
420
420
  "ChatMessageContentRequest",
@@ -456,8 +456,6 @@ __all__ = [
456
456
  "EnvironmentEnum",
457
457
  "ErrorEnum",
458
458
  "ErrorVariableValue",
459
- "EvaluationParams",
460
- "EvaluationParamsRequest",
461
459
  "ExecutePromptApiErrorResponse",
462
460
  "ExecutePromptEvent",
463
461
  "ExecutePromptEvent_Fulfilled",
@@ -480,6 +478,7 @@ __all__ = [
480
478
  "FulfilledExecuteWorkflowWorkflowResultEvent",
481
479
  "FulfilledFunctionCall",
482
480
  "FulfilledPromptExecutionMeta",
481
+ "FulfilledWorkflowNodeResultEvent",
483
482
  "FunctionCall",
484
483
  "FunctionCallChatMessageContent",
485
484
  "FunctionCallChatMessageContentRequest",
@@ -506,6 +505,7 @@ __all__ = [
506
505
  "InitiatedEnum",
507
506
  "InitiatedExecutePromptEvent",
508
507
  "InitiatedPromptExecutionMeta",
508
+ "InitiatedWorkflowNodeResultEvent",
509
509
  "JsonEnum",
510
510
  "JsonInputRequest",
511
511
  "JsonVariableValue",
@@ -546,10 +546,22 @@ __all__ = [
546
546
  "NodeInputVariableCompiledValue_Number",
547
547
  "NodeInputVariableCompiledValue_SearchResults",
548
548
  "NodeInputVariableCompiledValue_String",
549
+ "NodeOutputCompiledChatHistoryValue",
550
+ "NodeOutputCompiledErrorValue",
551
+ "NodeOutputCompiledJsonValue",
552
+ "NodeOutputCompiledNumberValue",
553
+ "NodeOutputCompiledSearchResultsValue",
554
+ "NodeOutputCompiledStringValue",
555
+ "NodeOutputCompiledValue",
556
+ "NodeOutputCompiledValue_ChatHistory",
557
+ "NodeOutputCompiledValue_Error",
558
+ "NodeOutputCompiledValue_Json",
559
+ "NodeOutputCompiledValue_Number",
560
+ "NodeOutputCompiledValue_SearchResults",
561
+ "NodeOutputCompiledValue_String",
549
562
  "NormalizedLogProbs",
550
563
  "NormalizedTokenLogProbs",
551
564
  "NumberEnum",
552
- "NumberVariableValue",
553
565
  "PaginatedSlimDeploymentReadList",
554
566
  "PaginatedSlimDocumentList",
555
567
  "PaginatedSlimWorkflowDeploymentList",
@@ -592,8 +604,7 @@ __all__ = [
592
604
  "RejectedExecuteWorkflowWorkflowResultEvent",
593
605
  "RejectedFunctionCall",
594
606
  "RejectedPromptExecutionMeta",
595
- "SandboxMetricInputParams",
596
- "SandboxMetricInputParamsRequest",
607
+ "RejectedWorkflowNodeResultEvent",
597
608
  "SandboxScenario",
598
609
  "ScenarioInput",
599
610
  "ScenarioInputRequest",
@@ -610,7 +621,6 @@ __all__ = [
610
621
  "SearchResultMergingRequest",
611
622
  "SearchResultRequest",
612
623
  "SearchResultsEnum",
613
- "SearchResultsVariableValue",
614
624
  "SearchWeightsRequest",
615
625
  "SlimDeploymentRead",
616
626
  "SlimDocument",
@@ -618,6 +628,7 @@ __all__ = [
618
628
  "StreamingEnum",
619
629
  "StreamingExecutePromptEvent",
620
630
  "StreamingPromptExecutionMeta",
631
+ "StreamingWorkflowNodeResultEvent",
621
632
  "StringChatMessageContent",
622
633
  "StringChatMessageContentRequest",
623
634
  "StringEnum",
@@ -675,15 +686,6 @@ __all__ = [
675
686
  "TestSuiteTestCase",
676
687
  "UploadDocumentErrorResponse",
677
688
  "UploadDocumentResponse",
678
- "VariableValue",
679
- "VariableValue_Array",
680
- "VariableValue_ChatHistory",
681
- "VariableValue_Error",
682
- "VariableValue_FunctionCall",
683
- "VariableValue_Json",
684
- "VariableValue_Number",
685
- "VariableValue_SearchResults",
686
- "VariableValue_String",
687
689
  "VellumError",
688
690
  "VellumErrorCodeEnum",
689
691
  "VellumErrorRequest",
@@ -709,8 +711,11 @@ __all__ = [
709
711
  "WorkflowNodeResultData_Terminal",
710
712
  "WorkflowNodeResultEvent",
711
713
  "WorkflowNodeResultEventState",
714
+ "WorkflowNodeResultEvent_Fulfilled",
715
+ "WorkflowNodeResultEvent_Initiated",
716
+ "WorkflowNodeResultEvent_Rejected",
717
+ "WorkflowNodeResultEvent_Streaming",
712
718
  "WorkflowOutput",
713
- "WorkflowOutputArray",
714
719
  "WorkflowOutputChatHistory",
715
720
  "WorkflowOutputError",
716
721
  "WorkflowOutputFunctionCall",
@@ -719,7 +724,6 @@ __all__ = [
719
724
  "WorkflowOutputNumber",
720
725
  "WorkflowOutputSearchResults",
721
726
  "WorkflowOutputString",
722
- "WorkflowOutput_Array",
723
727
  "WorkflowOutput_ChatHistory",
724
728
  "WorkflowOutput_Error",
725
729
  "WorkflowOutput_FunctionCall",
@@ -13,6 +13,10 @@ except ImportError:
13
13
 
14
14
 
15
15
  class ApiNodeResult(pydantic.BaseModel):
16
+ """
17
+ A Node Result Event emitted from an API Node.
18
+ """
19
+
16
20
  data: ApiNodeResultData
17
21
 
18
22
  def json(self, **kwargs: typing.Any) -> str:
@@ -13,6 +13,10 @@ except ImportError:
13
13
 
14
14
 
15
15
  class CodeExecutionNodeResult(pydantic.BaseModel):
16
+ """
17
+ A Node Result Event emitted from a Code Execution Node.
18
+ """
19
+
16
20
  data: CodeExecutionNodeResultData
17
21
 
18
22
  def json(self, **kwargs: typing.Any) -> str:
@@ -13,6 +13,10 @@ except ImportError:
13
13
 
14
14
 
15
15
  class ConditionalNodeResult(pydantic.BaseModel):
16
+ """
17
+ A Node Result Event emitted from a Conditional Node.
18
+ """
19
+
16
20
  data: ConditionalNodeResultData
17
21
 
18
22
  def json(self, **kwargs: typing.Any) -> str:
@@ -1,11 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from __future__ import annotations
4
-
5
3
  import datetime as dt
6
4
  import typing
7
5
 
8
6
  from ..core.datetime_utils import serialize_datetime
7
+ from .node_output_compiled_value import NodeOutputCompiledValue
8
+ from .workflow_node_result_data import WorkflowNodeResultData
9
9
 
10
10
  try:
11
11
  import pydantic.v1 as pydantic # type: ignore
@@ -13,8 +13,17 @@ except ImportError:
13
13
  import pydantic # type: ignore
14
14
 
15
15
 
16
- class ArrayVariableValue(pydantic.BaseModel):
17
- value: typing.List[VariableValue]
16
+ class FulfilledWorkflowNodeResultEvent(pydantic.BaseModel):
17
+ """
18
+ An event that indicates that the node has fulfilled its execution.
19
+ """
20
+
21
+ id: str
22
+ node_id: str
23
+ node_result_id: str
24
+ ts: typing.Optional[dt.datetime]
25
+ data: typing.Optional[WorkflowNodeResultData]
26
+ output_values: typing.Optional[typing.List[NodeOutputCompiledValue]]
18
27
 
19
28
  def json(self, **kwargs: typing.Any) -> str:
20
29
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -28,8 +37,3 @@ class ArrayVariableValue(pydantic.BaseModel):
28
37
  frozen = True
29
38
  smart_union = True
30
39
  json_encoders = {dt.datetime: serialize_datetime}
31
-
32
-
33
- from .variable_value import VariableValue # noqa: E402
34
-
35
- ArrayVariableValue.update_forward_refs()
@@ -0,0 +1,39 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .node_input_variable_compiled_value import NodeInputVariableCompiledValue
8
+ from .workflow_node_result_data import WorkflowNodeResultData
9
+
10
+ try:
11
+ import pydantic.v1 as pydantic # type: ignore
12
+ except ImportError:
13
+ import pydantic # type: ignore
14
+
15
+
16
+ class InitiatedWorkflowNodeResultEvent(pydantic.BaseModel):
17
+ """
18
+ An event that indicates that the node has initiated its execution.
19
+ """
20
+
21
+ id: str
22
+ node_id: str
23
+ node_result_id: str
24
+ ts: typing.Optional[dt.datetime]
25
+ data: typing.Optional[WorkflowNodeResultData]
26
+ input_values: typing.Optional[typing.List[NodeInputVariableCompiledValue]]
27
+
28
+ def json(self, **kwargs: typing.Any) -> str:
29
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
30
+ return super().json(**kwargs_with_defaults)
31
+
32
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
33
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
34
+ return super().dict(**kwargs_with_defaults)
35
+
36
+ class Config:
37
+ frozen = True
38
+ smart_union = True
39
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -12,7 +12,8 @@ except ImportError:
12
12
  import pydantic # type: ignore
13
13
 
14
14
 
15
- class ChatHistoryVariableValue(pydantic.BaseModel):
15
+ class NodeOutputCompiledChatHistoryValue(pydantic.BaseModel):
16
+ node_output_id: str
16
17
  value: typing.Optional[typing.List[ChatMessage]]
17
18
 
18
19
  def json(self, **kwargs: typing.Any) -> str:
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .vellum_error import VellumError
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class NodeOutputCompiledErrorValue(pydantic.BaseModel):
16
+ node_output_id: str
17
+ value: typing.Optional[VellumError]
18
+
19
+ def json(self, **kwargs: typing.Any) -> str:
20
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
+ return super().json(**kwargs_with_defaults)
22
+
23
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
+ return super().dict(**kwargs_with_defaults)
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -4,7 +4,6 @@ import datetime as dt
4
4
  import typing
5
5
 
6
6
  from ..core.datetime_utils import serialize_datetime
7
- from .evaluation_params import EvaluationParams
8
7
 
9
8
  try:
10
9
  import pydantic.v1 as pydantic # type: ignore
@@ -12,8 +11,9 @@ except ImportError:
12
11
  import pydantic # type: ignore
13
12
 
14
13
 
15
- class SandboxMetricInputParams(pydantic.BaseModel):
16
- params: typing.Optional[EvaluationParams]
14
+ class NodeOutputCompiledJsonValue(pydantic.BaseModel):
15
+ node_output_id: str
16
+ value: typing.Optional[typing.Dict[str, typing.Any]]
17
17
 
18
18
  def json(self, **kwargs: typing.Any) -> str:
19
19
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -11,7 +11,8 @@ except ImportError:
11
11
  import pydantic # type: ignore
12
12
 
13
13
 
14
- class NumberVariableValue(pydantic.BaseModel):
14
+ class NodeOutputCompiledNumberValue(pydantic.BaseModel):
15
+ node_output_id: str
15
16
  value: typing.Optional[float]
16
17
 
17
18
  def json(self, **kwargs: typing.Any) -> str:
@@ -12,7 +12,8 @@ except ImportError:
12
12
  import pydantic # type: ignore
13
13
 
14
14
 
15
- class SearchResultsVariableValue(pydantic.BaseModel):
15
+ class NodeOutputCompiledSearchResultsValue(pydantic.BaseModel):
16
+ node_output_id: str
16
17
  value: typing.Optional[typing.List[SearchResult]]
17
18
 
18
19
  def json(self, **kwargs: typing.Any) -> str:
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+
8
+ try:
9
+ import pydantic.v1 as pydantic # type: ignore
10
+ except ImportError:
11
+ import pydantic # type: ignore
12
+
13
+
14
+ class NodeOutputCompiledStringValue(pydantic.BaseModel):
15
+ node_output_id: str
16
+ value: typing.Optional[str]
17
+
18
+ def json(self, **kwargs: typing.Any) -> str:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().json(**kwargs_with_defaults)
21
+
22
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
+ return super().dict(**kwargs_with_defaults)
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ json_encoders = {dt.datetime: serialize_datetime}