vellum-ai 0.12.17__py3-none-any.whl → 0.13.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. vellum/__init__.py +10 -22
  2. vellum/client/__init__.py +8 -0
  3. vellum/client/core/client_wrapper.py +1 -1
  4. vellum/client/resources/__init__.py +4 -0
  5. vellum/client/resources/organizations/__init__.py +2 -0
  6. vellum/client/resources/organizations/client.py +116 -0
  7. vellum/client/resources/workspaces/__init__.py +2 -0
  8. vellum/client/resources/workspaces/client.py +114 -0
  9. vellum/client/types/__init__.py +6 -22
  10. vellum/client/types/new_member_join_behavior_enum.py +8 -0
  11. vellum/client/types/{function_call_variable_value.py → organization_read.py} +6 -4
  12. vellum/client/types/workflow_execution_workflow_result_event.py +0 -2
  13. vellum/client/types/workflow_result_event.py +0 -2
  14. vellum/client/types/workflow_result_event_output_data_array.py +4 -4
  15. vellum/client/types/{string_variable_value.py → workspace_read.py} +12 -5
  16. vellum/{types/json_variable_value.py → resources/organizations/__init__.py} +1 -1
  17. vellum/resources/organizations/client.py +3 -0
  18. vellum/{types/image_variable_value.py → resources/workspaces/__init__.py} +1 -1
  19. vellum/{types/array_variable_value.py → resources/workspaces/client.py} +1 -1
  20. vellum/types/{array_variable_value_item.py → new_member_join_behavior_enum.py} +1 -1
  21. vellum/types/{audio_variable_value.py → organization_read.py} +1 -1
  22. vellum/types/{error_variable_value.py → workspace_read.py} +1 -1
  23. vellum/workflows/workflows/base.py +0 -32
  24. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/METADATA +1 -1
  25. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/RECORD +69 -76
  26. vellum_ee/workflows/display/nodes/base_node_display.py +17 -10
  27. vellum_ee/workflows/display/nodes/vellum/api_node.py +1 -0
  28. vellum_ee/workflows/display/nodes/vellum/base_node.py +97 -2
  29. vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -0
  30. vellum_ee/workflows/display/nodes/vellum/conditional_node.py +5 -62
  31. vellum_ee/workflows/display/nodes/vellum/error_node.py +1 -0
  32. vellum_ee/workflows/display/nodes/vellum/final_output_node.py +1 -0
  33. vellum_ee/workflows/display/nodes/vellum/guardrail_node.py +1 -0
  34. vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py +1 -0
  35. vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py +1 -0
  36. vellum_ee/workflows/display/nodes/vellum/map_node.py +1 -0
  37. vellum_ee/workflows/display/nodes/vellum/merge_node.py +1 -0
  38. vellum_ee/workflows/display/nodes/vellum/note_node.py +1 -0
  39. vellum_ee/workflows/display/nodes/vellum/prompt_deployment_node.py +1 -0
  40. vellum_ee/workflows/display/nodes/vellum/search_node.py +1 -0
  41. vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py +1 -0
  42. vellum_ee/workflows/display/nodes/vellum/templating_node.py +1 -0
  43. vellum_ee/workflows/display/nodes/vellum/utils.py +63 -0
  44. vellum_ee/workflows/display/tests/test_vellum_workflow_display.py +2 -5
  45. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/conftest.py +18 -2
  46. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py +355 -0
  47. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_trigger_serialization.py +37 -22
  48. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py +12 -56
  49. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py +43 -93
  50. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py +31 -151
  51. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_error_node_serialization.py +8 -26
  52. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_generic_node_serialization.py +4 -15
  53. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py +9 -44
  54. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subworkflow_serialization.py +19 -101
  55. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py +19 -73
  56. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_merge_node_serialization.py +9 -44
  57. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_prompt_deployment_serialization.py +9 -44
  58. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py +8 -6
  59. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_subworkflow_deployment_serialization.py +11 -58
  60. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_templating_node_serialization.py +8 -11
  61. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_terminal_node_serialization.py +7 -30
  62. vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_serialization.py +2 -11
  63. vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py +9 -44
  64. vellum_ee/workflows/display/vellum.py +2 -7
  65. vellum_ee/workflows/display/workflows/vellum_workflow_display.py +5 -9
  66. vellum_ee/workflows/server/virtual_file_loader.py +3 -3
  67. vellum/client/types/array_variable_value.py +0 -27
  68. vellum/client/types/array_variable_value_item.py +0 -29
  69. vellum/client/types/audio_variable_value.py +0 -25
  70. vellum/client/types/chat_history_variable_value.py +0 -21
  71. vellum/client/types/error_variable_value.py +0 -21
  72. vellum/client/types/image_variable_value.py +0 -25
  73. vellum/client/types/json_variable_value.py +0 -20
  74. vellum/client/types/number_variable_value.py +0 -20
  75. vellum/client/types/search_results_variable_value.py +0 -21
  76. vellum/types/chat_history_variable_value.py +0 -3
  77. vellum/types/function_call_variable_value.py +0 -3
  78. vellum/types/number_variable_value.py +0 -3
  79. vellum/types/search_results_variable_value.py +0 -3
  80. vellum/types/string_variable_value.py +0 -3
  81. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/LICENSE +0 -0
  82. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/WHEEL +0 -0
  83. {vellum_ai-0.12.17.dist-info → vellum_ai-0.13.0.dist-info}/entry_points.txt +0 -0
@@ -94,17 +94,8 @@ def test_serialize_workflow(vellum_client):
94
94
  assert entrypoint_node == {
95
95
  "id": "f0eea82b-39cc-44e3-9c0d-12205ed5652c",
96
96
  "type": "ENTRYPOINT",
97
- "definition": {
98
- "bases": [],
99
- "module": [
100
- "vellum",
101
- "workflows",
102
- "nodes",
103
- "bases",
104
- "base",
105
- ],
106
- "name": "BaseNode",
107
- },
97
+ "base": None,
98
+ "definition": None,
108
99
  "inputs": [],
109
100
  "data": {
110
101
  "label": "Entrypoint Node",
@@ -157,26 +148,12 @@ def test_serialize_workflow(vellum_client):
157
148
  "release_tag": "LATEST",
158
149
  },
159
150
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
151
+ "base": {
152
+ "module": ["vellum", "workflows", "nodes", "displayable", "subworkflow_deployment_node", "node"],
153
+ "name": "SubworkflowDeploymentNode",
154
+ },
160
155
  "definition": {
161
- "bases": [
162
- {
163
- "module": [
164
- "vellum",
165
- "workflows",
166
- "nodes",
167
- "displayable",
168
- "subworkflow_deployment_node",
169
- "node",
170
- ],
171
- "name": "SubworkflowDeploymentNode",
172
- }
173
- ],
174
- "module": [
175
- "tests",
176
- "workflows",
177
- "basic_subworkflow_deployment",
178
- "workflow",
179
- ],
156
+ "module": ["tests", "workflows", "basic_subworkflow_deployment", "workflow"],
180
157
  "name": "ExampleSubworkflowDeploymentNode",
181
158
  },
182
159
  }
@@ -186,20 +163,7 @@ def test_serialize_workflow(vellum_client):
186
163
  {
187
164
  "id": "18170041-1a70-4836-9fa0-adceba2a1f4f",
188
165
  "type": "TERMINAL",
189
- "definition": {
190
- "bases": [
191
- {
192
- "bases": [],
193
- "module": [
194
- "vellum",
195
- "workflows",
196
- "nodes",
197
- "bases",
198
- "base",
199
- ],
200
- "name": "BaseNode",
201
- },
202
- ],
166
+ "base": {
203
167
  "module": [
204
168
  "vellum",
205
169
  "workflows",
@@ -210,6 +174,7 @@ def test_serialize_workflow(vellum_client):
210
174
  ],
211
175
  "name": "FinalOutputNode",
212
176
  },
177
+ "definition": None,
213
178
  "data": {
214
179
  "label": "Final Output",
215
180
  "name": "temperature",
@@ -241,20 +206,7 @@ def test_serialize_workflow(vellum_client):
241
206
  {
242
207
  "id": "94afd0ac-1ec4-486b-a6fb-fa1ec7029d19",
243
208
  "type": "TERMINAL",
244
- "definition": {
245
- "bases": [
246
- {
247
- "bases": [],
248
- "module": [
249
- "vellum",
250
- "workflows",
251
- "nodes",
252
- "bases",
253
- "base",
254
- ],
255
- "name": "BaseNode",
256
- },
257
- ],
209
+ "base": {
258
210
  "module": [
259
211
  "vellum",
260
212
  "workflows",
@@ -265,6 +217,7 @@ def test_serialize_workflow(vellum_client):
265
217
  ],
266
218
  "name": "FinalOutputNode",
267
219
  },
220
+ "definition": None,
268
221
  "data": {
269
222
  "label": "Final Output",
270
223
  "name": "reasoning",
@@ -60,7 +60,8 @@ def test_serialize_workflow():
60
60
  "inputs": [],
61
61
  "data": {"label": "Entrypoint Node", "source_handle_id": "34069190-0942-4e0c-8700-b33b9dea4ea0"},
62
62
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
63
- "definition": {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []},
63
+ "base": None,
64
+ "definition": None,
64
65
  }
65
66
 
66
67
  templating_node = workflow_raw_data["nodes"][1]
@@ -106,15 +107,13 @@ def test_serialize_workflow():
106
107
  "output_type": "JSON",
107
108
  },
108
109
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
110
+ "base": {
111
+ "name": "TemplatingNode",
112
+ "module": ["vellum", "workflows", "nodes", "core", "templating_node", "node"],
113
+ },
109
114
  "definition": {
110
115
  "name": "ExampleTemplatingNode",
111
116
  "module": ["tests", "workflows", "basic_templating_node", "workflow_with_json_input"],
112
- "bases": [
113
- {
114
- "name": "TemplatingNode",
115
- "module": ["vellum", "workflows", "nodes", "core", "templating_node", "node"],
116
- }
117
- ],
118
117
  },
119
118
  },
120
119
  templating_node,
@@ -152,13 +151,11 @@ def test_serialize_workflow():
152
151
  }
153
152
  ],
154
153
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
155
- "definition": {
154
+ "base": {
156
155
  "name": "FinalOutputNode",
157
156
  "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
158
- "bases": [
159
- {"name": "BaseNode", "module": ["vellum", "workflows", "nodes", "bases", "base"], "bases": []}
160
- ],
161
157
  },
158
+ "definition": None,
162
159
  },
163
160
  final_output_node,
164
161
  ignore_order=True,
@@ -58,17 +58,8 @@ def test_serialize_workflow():
58
58
  "inputs": [],
59
59
  "data": {"label": "Entrypoint Node", "source_handle_id": "8b8d52a2-844f-44fe-a6c4-142fa70d391b"},
60
60
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
61
- "definition": {
62
- "name": "BaseNode",
63
- "module": [
64
- "vellum",
65
- "workflows",
66
- "nodes",
67
- "bases",
68
- "base",
69
- ],
70
- "bases": [],
71
- },
61
+ "base": None,
62
+ "definition": None,
72
63
  }
73
64
 
74
65
  final_output_node = workflow_raw_data["nodes"][1]
@@ -99,26 +90,12 @@ def test_serialize_workflow():
99
90
  }
100
91
  ],
101
92
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
93
+ "base": {
94
+ "name": "FinalOutputNode",
95
+ "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
96
+ },
102
97
  "definition": {
103
98
  "name": "BasicFinalOutputNode",
104
- "module": [
105
- "tests",
106
- "workflows",
107
- "basic_final_output_node",
108
- "workflow",
109
- ],
110
- "bases": [
111
- {
112
- "name": "FinalOutputNode",
113
- "module": [
114
- "vellum",
115
- "workflows",
116
- "nodes",
117
- "displayable",
118
- "final_output_node",
119
- "node",
120
- ],
121
- }
122
- ],
99
+ "module": ["tests", "workflows", "basic_final_output_node", "workflow"],
123
100
  },
124
101
  }
@@ -55,17 +55,8 @@ def test_serialize_workflow():
55
55
  "id": "c238508d-85ab-4644-8cbb-88eae457fe12",
56
56
  "type": "ENTRYPOINT",
57
57
  "inputs": [],
58
- "definition": {
59
- "bases": [],
60
- "module": [
61
- "vellum",
62
- "workflows",
63
- "nodes",
64
- "bases",
65
- "base",
66
- ],
67
- "name": "BaseNode",
68
- },
58
+ "base": None,
59
+ "definition": None,
69
60
  "data": {
70
61
  "label": "Entrypoint Node",
71
62
  "source_handle_id": "04da0bb6-5b42-4dd1-a4e4-08f3ab03e1a3",
@@ -77,17 +77,8 @@ def test_serialize_workflow__missing_final_output_node():
77
77
  "inputs": [],
78
78
  "data": {"label": "Entrypoint Node", "source_handle_id": "943ac183-d107-4604-aed1-619bd7fef09c"},
79
79
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
80
- "definition": {
81
- "name": "BaseNode",
82
- "module": [
83
- "vellum",
84
- "workflows",
85
- "nodes",
86
- "bases",
87
- "base",
88
- ],
89
- "bases": [],
90
- },
80
+ "base": None,
81
+ "definition": None,
91
82
  }
92
83
 
93
84
  passthrough_node = next(node for node in workflow_raw_data["nodes"] if node["type"] == "GENERIC")
@@ -123,27 +114,13 @@ def test_serialize_workflow__missing_final_output_node():
123
114
  }
124
115
  ],
125
116
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
117
+ "base": {
118
+ "name": "FinalOutputNode",
119
+ "module": ["vellum", "workflows", "nodes", "displayable", "final_output_node", "node"],
120
+ },
126
121
  "definition": {
127
122
  "name": "FirstFinalOutputNode",
128
- "module": [
129
- "tests",
130
- "workflows",
131
- "complex_final_output_node",
132
- "missing_final_output_node",
133
- ],
134
- "bases": [
135
- {
136
- "name": "FinalOutputNode",
137
- "module": [
138
- "vellum",
139
- "workflows",
140
- "nodes",
141
- "displayable",
142
- "final_output_node",
143
- "node",
144
- ],
145
- }
146
- ],
123
+ "module": ["tests", "workflows", "complex_final_output_node", "missing_final_output_node"],
147
124
  },
148
125
  },
149
126
  {
@@ -176,7 +153,7 @@ def test_serialize_workflow__missing_final_output_node():
176
153
  }
177
154
  ],
178
155
  "display_data": {"position": {"x": 0.0, "y": 0.0}},
179
- "definition": {
156
+ "base": {
180
157
  "name": "FinalOutputNode",
181
158
  "module": [
182
159
  "vellum",
@@ -186,20 +163,8 @@ def test_serialize_workflow__missing_final_output_node():
186
163
  "final_output_node",
187
164
  "node",
188
165
  ],
189
- "bases": [
190
- {
191
- "name": "BaseNode",
192
- "module": [
193
- "vellum",
194
- "workflows",
195
- "nodes",
196
- "bases",
197
- "base",
198
- ],
199
- "bases": [],
200
- }
201
- ],
202
166
  },
167
+ "definition": None,
203
168
  },
204
169
  ],
205
170
  final_output_nodes,
@@ -47,12 +47,6 @@ class CodeResourceDefinition(UniversalBaseModel):
47
47
  module: List[str]
48
48
 
49
49
 
50
- class NodeDefinition(UniversalBaseModel):
51
- name: str
52
- module: List[str]
53
- bases: List[CodeResourceDefinition]
54
-
55
-
56
50
  class WorkflowDisplayDataViewport(UniversalBaseModel):
57
51
  x: float = 0.0
58
52
  y: float = 0.0
@@ -248,7 +242,8 @@ class BaseWorkflowNode(UniversalBaseModel):
248
242
  inputs: List[NodeInput]
249
243
  type: str
250
244
  display_data: Optional[NodeDisplayData] = None
251
- definition: Optional[NodeDefinition] = None
245
+ base: CodeResourceDefinition
246
+ definition: CodeResourceDefinition
252
247
 
253
248
 
254
249
  class EntrypointNodeData(UniversalBaseModel):
@@ -78,11 +78,6 @@ class VellumWorkflowDisplay(
78
78
  edges: JsonArray = []
79
79
 
80
80
  # Add a single synthetic node for the workflow entrypoint
81
- base_node_definition: JsonObject = {
82
- "name": BaseNode.__name__,
83
- "module": cast(JsonArray, BaseNode.__module__.split(".")),
84
- "bases": [],
85
- }
86
81
  nodes.append(
87
82
  {
88
83
  "id": str(self.display_context.workflow_display.entrypoint_node_id),
@@ -93,7 +88,8 @@ class VellumWorkflowDisplay(
93
88
  "source_handle_id": str(self.display_context.workflow_display.entrypoint_node_source_handle_id),
94
89
  },
95
90
  "display_data": self.display_context.workflow_display.entrypoint_node_display.dict(),
96
- "definition": base_node_definition,
91
+ "base": None,
92
+ "definition": None,
97
93
  },
98
94
  )
99
95
 
@@ -119,10 +115,9 @@ class VellumWorkflowDisplay(
119
115
  ]
120
116
  final_output_node_outputs = {node.Outputs.value for node in final_output_nodes}
121
117
  unreferenced_final_output_node_outputs = final_output_node_outputs.copy()
122
- final_output_node_definition: JsonObject = {
118
+ final_output_node_base: JsonObject = {
123
119
  "name": FinalOutputNode.__name__,
124
120
  "module": cast(JsonArray, FinalOutputNode.__module__.split(".")),
125
- "bases": [base_node_definition],
126
121
  }
127
122
 
128
123
  # Add a synthetic Terminal Node and track the Workflow's output variables for each Workflow output
@@ -171,7 +166,8 @@ class VellumWorkflowDisplay(
171
166
  },
172
167
  "inputs": [node_input.dict()],
173
168
  "display_data": workflow_output_display.display_data.dict(),
174
- "definition": final_output_node_definition,
169
+ "base": final_output_node_base,
170
+ "definition": None,
175
171
  }
176
172
  )
177
173
 
@@ -10,7 +10,7 @@ class VirtualFileLoader(importlib.abc.Loader):
10
10
  return None # use default module creation
11
11
 
12
12
  def exec_module(self, module):
13
- if not self.is_package:
13
+ if not self.is_package or self.code:
14
14
  exec(self.code, module.__dict__)
15
15
 
16
16
 
@@ -26,13 +26,13 @@ class VirtualFileFinder(importlib.abc.MetaPathFinder, importlib.abc.Loader):
26
26
  key_name = "__init__" if fullname == self.namespace else fullname.replace(f"{self.namespace}.", "")
27
27
 
28
28
  files_key = f"{key_name.replace('.', '/')}.py"
29
- if not self.files.get(files_key):
29
+ if self.files.get(files_key) is None:
30
30
  files_key = f"{key_name.replace('.', '/')}/__init__.py"
31
31
 
32
32
  file = self.files.get(files_key)
33
33
  is_package = "__init__" in files_key
34
34
 
35
- if file:
35
+ if file is not None:
36
36
  return importlib.machinery.ModuleSpec(
37
37
  prefixed_name,
38
38
  VirtualFileLoader(file, is_package),
@@ -1,27 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from __future__ import annotations
4
- from ..core.pydantic_utilities import UniversalBaseModel
5
- import typing
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
- from ..core.pydantic_utilities import update_forward_refs
9
-
10
-
11
- class ArrayVariableValue(UniversalBaseModel):
12
- type: typing.Literal["ARRAY"] = "ARRAY"
13
- value: typing.Optional[typing.List["ArrayVariableValueItem"]] = None
14
-
15
- if IS_PYDANTIC_V2:
16
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
- else:
18
-
19
- class Config:
20
- frozen = True
21
- smart_union = True
22
- extra = pydantic.Extra.allow
23
-
24
-
25
- from .array_variable_value_item import ArrayVariableValueItem # noqa: E402
26
-
27
- update_forward_refs(ArrayVariableValue)
@@ -1,29 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from __future__ import annotations
4
- import typing
5
- from .string_variable_value import StringVariableValue
6
- from .number_variable_value import NumberVariableValue
7
- from .json_variable_value import JsonVariableValue
8
- from .error_variable_value import ErrorVariableValue
9
- from .function_call_variable_value import FunctionCallVariableValue
10
- from .image_variable_value import ImageVariableValue
11
- from .audio_variable_value import AudioVariableValue
12
- from .chat_history_variable_value import ChatHistoryVariableValue
13
- from .search_results_variable_value import SearchResultsVariableValue
14
- import typing
15
-
16
- if typing.TYPE_CHECKING:
17
- from .array_variable_value import ArrayVariableValue
18
- ArrayVariableValueItem = typing.Union[
19
- StringVariableValue,
20
- NumberVariableValue,
21
- JsonVariableValue,
22
- ErrorVariableValue,
23
- FunctionCallVariableValue,
24
- ImageVariableValue,
25
- AudioVariableValue,
26
- ChatHistoryVariableValue,
27
- SearchResultsVariableValue,
28
- "ArrayVariableValue",
29
- ]
@@ -1,25 +0,0 @@
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 .vellum_audio import VellumAudio
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class AudioVariableValue(UniversalBaseModel):
11
- """
12
- A base Vellum primitive value representing audio.
13
- """
14
-
15
- type: typing.Literal["AUDIO"] = "AUDIO"
16
- value: typing.Optional[VellumAudio] = None
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
@@ -1,21 +0,0 @@
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 .chat_message import ChatMessage
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class ChatHistoryVariableValue(UniversalBaseModel):
11
- type: typing.Literal["CHAT_HISTORY"] = "CHAT_HISTORY"
12
- value: typing.Optional[typing.List[ChatMessage]] = None
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
@@ -1,21 +0,0 @@
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 .vellum_error import VellumError
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class ErrorVariableValue(UniversalBaseModel):
11
- type: typing.Literal["ERROR"] = "ERROR"
12
- value: typing.Optional[VellumError] = None
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
@@ -1,25 +0,0 @@
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 .vellum_image import VellumImage
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class ImageVariableValue(UniversalBaseModel):
11
- """
12
- A base Vellum primitive value representing an image.
13
- """
14
-
15
- type: typing.Literal["IMAGE"] = "IMAGE"
16
- value: typing.Optional[VellumImage] = None
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
@@ -1,20 +0,0 @@
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 JsonVariableValue(UniversalBaseModel):
10
- type: typing.Literal["JSON"] = "JSON"
11
- value: typing.Optional[typing.Any] = 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
@@ -1,20 +0,0 @@
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 NumberVariableValue(UniversalBaseModel):
10
- type: typing.Literal["NUMBER"] = "NUMBER"
11
- value: typing.Optional[float] = 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
@@ -1,21 +0,0 @@
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 .search_result import SearchResult
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class SearchResultsVariableValue(UniversalBaseModel):
11
- type: typing.Literal["SEARCH_RESULTS"] = "SEARCH_RESULTS"
12
- value: typing.Optional[typing.List[SearchResult]] = None
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
@@ -1,3 +0,0 @@
1
- # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
-
3
- from vellum.client.types.chat_history_variable_value import *
@@ -1,3 +0,0 @@
1
- # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
-
3
- from vellum.client.types.function_call_variable_value import *
@@ -1,3 +0,0 @@
1
- # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
-
3
- from vellum.client.types.number_variable_value import *
@@ -1,3 +0,0 @@
1
- # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
-
3
- from vellum.client.types.search_results_variable_value import *
@@ -1,3 +0,0 @@
1
- # WARNING: This file will be removed in a future release. Please import from "vellum.client" instead.
2
-
3
- from vellum.client.types.string_variable_value import *