vellum-workflow-server 1.5.3__py3-none-any.whl → 1.5.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-workflow-server
3
- Version: 1.5.3
3
+ Version: 1.5.4
4
4
  Summary:
5
5
  License: AGPL
6
6
  Requires-Python: >=3.9.0,<4
@@ -29,7 +29,7 @@ Requires-Dist: pyjwt (==2.10.0)
29
29
  Requires-Dist: python-dotenv (==1.0.1)
30
30
  Requires-Dist: retrying (==1.3.4)
31
31
  Requires-Dist: sentry-sdk[flask] (==2.20.0)
32
- Requires-Dist: vellum-ai (==1.5.3)
32
+ Requires-Dist: vellum-ai (==1.5.4)
33
33
  Description-Content-Type: text/markdown
34
34
 
35
35
  # Vellum Workflow Runner Server
@@ -12,7 +12,7 @@ workflow_server/config.py,sha256=qmmTr6ty3ZN5LDOFs3TfUxYshYe6Mmn_LanplHHeE9Q,179
12
12
  workflow_server/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  workflow_server/core/cancel_workflow.py,sha256=Ffkc3mzmrdMEUcD-sHfEhX4IwVrka-E--SxKA1dUfIU,2185
14
14
  workflow_server/core/events.py,sha256=24MA66DVQuaLJJcZrS8IL1Zq4Ohi9CoouKZ5VgoH3Cs,1402
15
- workflow_server/core/executor.py,sha256=zr5iruCsAMI5yHoW_yWzAhCo1U4Si9Kr9tjOmBKQf4A,20102
15
+ workflow_server/core/executor.py,sha256=Bw6luelJs84-_fBIG9VvxYFxeha4DmwxDpslVeqr2I8,18411
16
16
  workflow_server/core/utils.py,sha256=si0NB4Suurc-mn8NYdn59xM9CkPrfOP1aWEVrZvifDI,1929
17
17
  workflow_server/core/workflow_executor_context.py,sha256=w0nFhtu54GX36ZzmaqLTD3-ssPtoFd9QX02dPgeIbBM,3615
18
18
  workflow_server/server.py,sha256=QBU12AaAfAgLqfCDBd24qIJl_mbheiq0-hfcWV7rZM4,1234
@@ -28,7 +28,7 @@ workflow_server/utils/tests/test_sentry_integration.py,sha256=LGmWiaLhFrx-jslrRj
28
28
  workflow_server/utils/tests/test_system_utils.py,sha256=_4GwXvVvU5BrATxUEWwQIPg0bzQXMWBtiBmjP8MTxJM,4314
29
29
  workflow_server/utils/tests/test_utils.py,sha256=0Nq6du8o-iBtTrip9_wgHES53JSiJbVdSXaBnPobw3s,6930
30
30
  workflow_server/utils/utils.py,sha256=ZPoM1Suhid22dpB8oEFLux8wx-9iyzmSfWuYxSCrgWk,4774
31
- vellum_workflow_server-1.5.3.dist-info/METADATA,sha256=C5KSsVZqP-H0jzKalUsiOnYdxcGIf6GcxJwcm1SPWvI,2267
32
- vellum_workflow_server-1.5.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
- vellum_workflow_server-1.5.3.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
34
- vellum_workflow_server-1.5.3.dist-info/RECORD,,
31
+ vellum_workflow_server-1.5.4.dist-info/METADATA,sha256=4dW7Mupn81DeVG3BVZcETkVlr7lkX_cUG6AnHwhGQB0,2267
32
+ vellum_workflow_server-1.5.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
+ vellum_workflow_server-1.5.4.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
34
+ vellum_workflow_server-1.5.4.dist-info/RECORD,,
@@ -23,14 +23,6 @@ from vellum.workflows import BaseWorkflow
23
23
  from vellum.workflows.emitters.base import BaseWorkflowEmitter
24
24
  from vellum.workflows.emitters.vellum_emitter import VellumEmitter
25
25
  from vellum.workflows.events.exception_handling import stream_initialization_exception
26
- from vellum.workflows.events.node import (
27
- NodeExecutionFulfilledBody,
28
- NodeExecutionFulfilledEvent,
29
- NodeExecutionInitiatedBody,
30
- NodeExecutionInitiatedEvent,
31
- NodeExecutionStreamingBody,
32
- NodeExecutionStreamingEvent,
33
- )
34
26
  from vellum.workflows.events.types import BaseEvent
35
27
  from vellum.workflows.events.workflow import WorkflowEventDisplayContext
36
28
  from vellum.workflows.exceptions import WorkflowInitializationException
@@ -290,51 +282,11 @@ def stream_node(
290
282
  workflow_definition=workflow.__class__,
291
283
  )
292
284
 
293
- workflow_inputs = _get_workflow_inputs(executor_context, workflow.__class__)
294
- workflow_state = _get_workflow_state(executor_context, workflow_inputs=workflow_inputs)
295
- node = Node(
296
- state=workflow_state,
297
- context=workflow._context,
298
- )
299
-
300
285
  def call_node() -> Generator[dict[str, Any], Any, None]:
301
286
  executor_context.stream_start_time = time.time_ns()
302
- span_id = uuid4()
303
- yield NodeExecutionInitiatedEvent(
304
- id=uuid4(),
305
- timestamp=datetime.now(),
306
- trace_id=executor_context.trace_id,
307
- span_id=span_id,
308
- body=NodeExecutionInitiatedBody(
309
- node_definition=Node,
310
- inputs=node._inputs,
311
- ),
312
- ).model_dump(mode="json")
313
- node_outputs = node.run()
314
-
315
- if isinstance(node_outputs, (Iterator)):
316
- for node_output in node_outputs:
317
- yield NodeExecutionStreamingEvent(
318
- id=uuid4(),
319
- timestamp=datetime.now(),
320
- trace_id=executor_context.trace_id,
321
- span_id=span_id,
322
- body=NodeExecutionStreamingBody(
323
- node_definition=Node,
324
- output=node_output,
325
- ),
326
- ).model_dump(mode="json")
327
- else:
328
- yield NodeExecutionFulfilledEvent(
329
- id=uuid4(),
330
- timestamp=datetime.now(),
331
- trace_id=executor_context.trace_id,
332
- span_id=span_id,
333
- body=NodeExecutionFulfilledBody(
334
- node_definition=Node,
335
- outputs=node_outputs,
336
- ),
337
- ).model_dump(mode="json")
287
+
288
+ for event in workflow.run_node(Node, inputs=executor_context.inputs): # type: ignore[arg-type]
289
+ yield event.model_dump(mode="json")
338
290
 
339
291
  return _call_stream(
340
292
  executor_context=executor_context,