vellum-workflow-server 1.7.5.post2__py3-none-any.whl → 1.7.5.post4__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.

Potentially problematic release.


This version of vellum-workflow-server might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-workflow-server
3
- Version: 1.7.5.post2
3
+ Version: 1.7.5.post4
4
4
  Summary:
5
5
  License: AGPL
6
6
  Requires-Python: >=3.9.0,<4
@@ -6,15 +6,15 @@ workflow_server/api/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
6
6
  workflow_server/api/tests/test_input_display_mapping.py,sha256=drBZqMudFyB5wgiUOcMgRXz7E7ge-Qgxbstw4E4f0zE,2211
7
7
  workflow_server/api/tests/test_workflow_view.py,sha256=XfsW8_hFKN5rzp2UFVviVoLW-8FD-nvD6mSZHnIyrWM,30483
8
8
  workflow_server/api/tests/test_workflow_view_stream_workflow_route.py,sha256=l4sfma1uNB2CtFjxKTIQ2SSn-PpyxaSWJZyy7VYSDYM,37311
9
- workflow_server/api/workflow_view.py,sha256=WJC8wfdgqIDk5LLdRN2rom1M4qKvqHroxXpCjYczmjg,19859
9
+ workflow_server/api/workflow_view.py,sha256=u58JmPlAnN-Ktyh0lchNzachZ-36jMPd-4PXwX_umOw,19897
10
10
  workflow_server/code_exec_runner.py,sha256=DLNNrinCRbnkSvlqVvSZ1wv_etI7r_kKAXNPGMj3jBk,2196
11
- workflow_server/config.py,sha256=CKU7qKC5k1_M1AFOJn_nUqntA46KPk_Z7fblfQaGC-0,1877
11
+ workflow_server/config.py,sha256=cUdI_lEovV7e7lwCkGJ1eM9R4OZVJw5R5zT1eG1SzQQ,2122
12
12
  workflow_server/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  workflow_server/core/cancel_workflow.py,sha256=QcEeYUIrxq4pub-z9BlGi5fLI3gVRml-56rMCW7j5Hc,2212
14
14
  workflow_server/core/events.py,sha256=24MA66DVQuaLJJcZrS8IL1Zq4Ohi9CoouKZ5VgoH3Cs,1402
15
15
  workflow_server/core/executor.py,sha256=IazlinBkJ9kTqhB-6iiCozB2mblc0CshDEChVml_CZ4,17630
16
16
  workflow_server/core/utils.py,sha256=si0NB4Suurc-mn8NYdn59xM9CkPrfOP1aWEVrZvifDI,1929
17
- workflow_server/core/workflow_executor_context.py,sha256=rSjgkWenRGpFOwioRXNnUhGnEI7isOB-Qk7Tw-2JwnM,4521
17
+ workflow_server/core/workflow_executor_context.py,sha256=Q2R0T2KkYZ1z52v8erDMysJfxSODbzPhDxBxX--k4Zw,3202
18
18
  workflow_server/server.py,sha256=lhHPmK1PhRZd6eCkj1C0acK3YwaApZgoPHghMChw0fc,1461
19
19
  workflow_server/start.py,sha256=WHZEsLen8mtGX-wF3xUbB91_NpC_GBRtOEi87OR1rv4,2360
20
20
  workflow_server/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -28,7 +28,7 @@ workflow_server/utils/tests/test_sentry_integration.py,sha256=14PfuW8AaQNNtqLmBs
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=m7iMJtor5SQLWu7jlJw-X5Q3nmbq69BCxTMv6qnFYrA,4835
31
- vellum_workflow_server-1.7.5.post2.dist-info/METADATA,sha256=5F0-6hoq-F-F3cYDh9j_pDxewl3jMAYee3J_DPUQxy8,2273
32
- vellum_workflow_server-1.7.5.post2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
- vellum_workflow_server-1.7.5.post2.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
34
- vellum_workflow_server-1.7.5.post2.dist-info/RECORD,,
31
+ vellum_workflow_server-1.7.5.post4.dist-info/METADATA,sha256=MhbDgG4fzb_n217miF5ynSx1zIQ9ETfF87N-3qk47LY,2273
32
+ vellum_workflow_server-1.7.5.post4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
33
+ vellum_workflow_server-1.7.5.post4.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
34
+ vellum_workflow_server-1.7.5.post4.dist-info/RECORD,,
@@ -22,6 +22,7 @@ from vellum_ee.workflows.server.virtual_file_loader import VirtualFileFinder
22
22
 
23
23
  from vellum.workflows.exceptions import WorkflowInitializationException
24
24
  from vellum.workflows.nodes import BaseNode
25
+ from vellum.workflows.vellum_client import create_vellum_client
25
26
  from workflow_server.config import ENABLE_PROCESS_WRAPPER, MEMORY_LIMIT_MB
26
27
  from workflow_server.core.events import (
27
28
  SPAN_ID_EVENT,
@@ -47,7 +48,6 @@ from workflow_server.core.workflow_executor_context import (
47
48
  DEFAULT_TIMEOUT_SECONDS,
48
49
  NodeExecutorContext,
49
50
  WorkflowExecutorContext,
50
- create_vellum_client,
51
51
  )
52
52
  from workflow_server.utils.oom_killer import get_is_oom_killed
53
53
  from workflow_server.utils.system_utils import (
workflow_server/config.py CHANGED
@@ -27,6 +27,11 @@ MEMORY_LIMIT_MB = int(os.getenv("MEMORY_LIMIT_MB", "2048"))
27
27
  PORT = os.getenv("PORT", "8000")
28
28
  VELLUM_API_URL_HOST = os.getenv("VELLUM_API_URL_HOST", "localhost")
29
29
  VELLUM_API_URL_PORT = os.getenv("VELLUM_API_URL_PORT", 8000)
30
+
31
+ # Set VELLUM_API_URL for SDK when using local Vellum API
32
+ if os.getenv("USE_LOCAL_VELLUM_API") == "true" and "VELLUM_API_URL" not in os.environ:
33
+ os.environ["VELLUM_API_URL"] = "http://{}:{}".format(VELLUM_API_URL_HOST, VELLUM_API_URL_PORT)
34
+
30
35
  CONCURRENCY = int(os.getenv("CONCURRENCY", "8"))
31
36
  CONTAINER_IMAGE = os.getenv("CONTAINER_IMAGE", "python-workflow-runtime:latest")
32
37
  ENABLE_PROCESS_WRAPPER = os.getenv("ENABLE_PROCESS_WRAPPER", "true").lower() == "true"
@@ -9,54 +9,15 @@ from typing_extensions import Self
9
9
  from flask import has_request_context, request
10
10
  from pydantic import Field, field_validator, model_validator
11
11
 
12
- from vellum import ApiVersionEnum, Vellum, VellumEnvironment
12
+ from vellum import ApiVersionEnum, Vellum
13
13
  from vellum.client.core import UniversalBaseModel
14
14
  from vellum.workflows.context import ExecutionContext
15
- from workflow_server.config import IS_VPC, VELLUM_API_URL_HOST, VELLUM_API_URL_PORT
15
+ from vellum.workflows.vellum_client import create_vellum_client
16
16
  from workflow_server.utils.utils import convert_json_inputs_to_vellum
17
17
 
18
18
  DEFAULT_TIMEOUT_SECONDS = int(os.getenv("MAX_WORKFLOW_RUNTIME_SECONDS", 1800))
19
19
 
20
20
 
21
- def create_vellum_client(
22
- api_key: str,
23
- api_version: Optional[ApiVersionEnum] = None,
24
- ) -> Vellum:
25
- """
26
- Create a VellumClient with proper environment configuration.
27
-
28
- Args:
29
- api_key: The API key for the Vellum client
30
- api_version: Optional API version to use
31
-
32
- Returns:
33
- Configured Vellum client instance
34
-
35
- Note: Ideally we replace this with `vellum.workflows.vellum_client.create_vellum_client`
36
- """
37
- if IS_VPC:
38
- environment = VellumEnvironment(
39
- default=os.getenv("VELLUM_DEFAULT_API_URL", VellumEnvironment.PRODUCTION.default),
40
- documents=os.getenv("VELLUM_DOCUMENTS_API_URL", VellumEnvironment.PRODUCTION.documents),
41
- predict=os.getenv("VELLUM_PREDICT_API_URL", VellumEnvironment.PRODUCTION.predict),
42
- )
43
- elif os.getenv("USE_LOCAL_VELLUM_API") == "true":
44
- VELLUM_API_URL = f"http://{VELLUM_API_URL_HOST}:{VELLUM_API_URL_PORT}"
45
- environment = VellumEnvironment(
46
- default=VELLUM_API_URL,
47
- documents=VELLUM_API_URL,
48
- predict=VELLUM_API_URL,
49
- )
50
- else:
51
- environment = VellumEnvironment.PRODUCTION
52
-
53
- return Vellum(
54
- api_key=api_key,
55
- environment=environment,
56
- api_version=api_version,
57
- )
58
-
59
-
60
21
  class BaseExecutorContext(UniversalBaseModel):
61
22
  inputs: dict = Field(default_factory=dict)
62
23
  state: Optional[dict] = None