vellum-ai 1.6.0__py3-none-any.whl → 1.6.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.
@@ -27,10 +27,10 @@ class BaseClientWrapper:
27
27
 
28
28
  def get_headers(self) -> typing.Dict[str, str]:
29
29
  headers: typing.Dict[str, str] = {
30
- "User-Agent": "vellum-ai/1.6.0",
30
+ "User-Agent": "vellum-ai/1.6.2",
31
31
  "X-Fern-Language": "Python",
32
32
  "X-Fern-SDK-Name": "vellum-ai",
33
- "X-Fern-SDK-Version": "1.6.0",
33
+ "X-Fern-SDK-Version": "1.6.2",
34
34
  **(self.get_custom_headers() or {}),
35
35
  }
36
36
  if self._api_version is not None:
@@ -8,10 +8,10 @@ from .components_schemas_slim_composio_tool_definition import ComponentsSchemasS
8
8
 
9
9
 
10
10
  class PaginatedSlimToolDefinitionList(UniversalBaseModel):
11
- count: typing.Optional[int] = None
11
+ count: int
12
12
  next: typing.Optional[str] = None
13
13
  previous: typing.Optional[str] = None
14
- results: typing.Optional[typing.List[ComponentsSchemasSlimComposioToolDefinition]] = None
14
+ results: typing.List[ComponentsSchemasSlimComposioToolDefinition]
15
15
 
16
16
  if IS_PYDANTIC_V2:
17
17
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -1,11 +1,11 @@
1
- from typing import Any, Dict, Optional
1
+ from typing import Any, Dict
2
2
 
3
3
  from vellum.client.core.api_error import ApiError
4
4
  from vellum.workflows.constants import VellumIntegrationProviderType
5
5
  from vellum.workflows.errors.types import WorkflowErrorCode
6
6
  from vellum.workflows.exceptions import NodeException
7
7
  from vellum.workflows.types.definition import VellumIntegrationToolDetails
8
- from vellum.workflows.vellum_client import create_vellum_client
8
+ from vellum.workflows.vellum_client import Vellum
9
9
 
10
10
 
11
11
  class VellumIntegrationService:
@@ -16,9 +16,9 @@ class VellumIntegrationService:
16
16
  own integration infrastructure.
17
17
  """
18
18
 
19
- def __init__(self, client: Optional[Any] = None) -> None:
19
+ def __init__(self, client: Vellum) -> None:
20
20
  """Initialize the VellumIntegrationService with a Vellum client."""
21
- self._client = client or create_vellum_client()
21
+ self._client = client
22
22
 
23
23
  def get_tool_definition(
24
24
  self,
@@ -152,7 +152,9 @@ class BaseInlinePromptNode(BasePromptNode[StateType], Generic[StateType]):
152
152
  elif isinstance(function, ComposioToolDefinition):
153
153
  normalized_functions.append(compile_composio_tool_definition(function))
154
154
  elif isinstance(function, VellumIntegrationToolDefinition):
155
- normalized_functions.append(compile_vellum_integration_tool_definition(function))
155
+ normalized_functions.append(
156
+ compile_vellum_integration_tool_definition(function, self._context.vellum_client)
157
+ )
156
158
  elif isinstance(function, MCPServer):
157
159
  tool_definitions = compile_mcp_tool_definition(function)
158
160
  for tool_def in tool_definitions:
@@ -271,9 +271,10 @@ class VellumIntegrationNode(BaseNode[ToolCallingState], FunctionCallNodeMixin):
271
271
 
272
272
  def run(self) -> Iterator[BaseOutput]:
273
273
  arguments = self._extract_function_arguments()
274
+ vellum_client = self._context.vellum_client
274
275
 
275
276
  try:
276
- vellum_service = VellumIntegrationService()
277
+ vellum_service = VellumIntegrationService(vellum_client)
277
278
  result = vellum_service.execute_tool(
278
279
  integration=self.vellum_integration_tool.integration_name,
279
280
  provider=self.vellum_integration_tool.provider.value,
@@ -323,17 +323,21 @@ def compile_composio_tool_definition(tool_def: ComposioToolDefinition) -> Functi
323
323
  )
324
324
 
325
325
 
326
- def compile_vellum_integration_tool_definition(tool_def: VellumIntegrationToolDefinition) -> FunctionDefinition:
326
+ def compile_vellum_integration_tool_definition(
327
+ tool_def: VellumIntegrationToolDefinition,
328
+ vellum_client: Vellum,
329
+ ) -> FunctionDefinition:
327
330
  """Compile a VellumIntegrationToolDefinition into a FunctionDefinition.
328
331
 
329
332
  Args:
330
333
  tool_def: The VellumIntegrationToolDefinition to compile
334
+ vellum_client: Vellum client instance
331
335
 
332
336
  Returns:
333
337
  FunctionDefinition with tool parameters and description
334
338
  """
335
339
  try:
336
- service = VellumIntegrationService()
340
+ service = VellumIntegrationService(vellum_client)
337
341
  tool_details = service.get_tool_definition(
338
342
  integration=tool_def.integration_name,
339
343
  provider=tool_def.provider.value,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-ai
3
- Version: 1.6.0
3
+ Version: 1.6.2
4
4
  Summary:
5
5
  License: MIT
6
6
  Requires-Python: >=3.9,<4.0
@@ -46,7 +46,7 @@ vellum_ee/workflows/display/nodes/vellum/conditional_node.py,sha256=dtO9A-rjbDEJ
46
46
  vellum_ee/workflows/display/nodes/vellum/error_node.py,sha256=8tSb8qGVoRIELubu0qPeoDlt1LpiIqc6d9_30GWRd_k,2266
47
47
  vellum_ee/workflows/display/nodes/vellum/final_output_node.py,sha256=z4oeTgKnMGVaGig8XOZm5B_xYL4H7zweYlFweCbhnyA,3000
48
48
  vellum_ee/workflows/display/nodes/vellum/guardrail_node.py,sha256=9_AslWjzj4RHH2sq3SIaq9FU0NCg7ex5TIWrNMybqXg,2173
49
- vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py,sha256=muyLv3KMIsUnnXhiPbPhw5B0TO1Z8LUwytpVQKlz4tM,11906
49
+ vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py,sha256=KA4U5NADWCBBbTG0f76OOFW9HvlWd5DfZoqN5Y0ZK9c,12167
50
50
  vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py,sha256=m20_ZZ3Au0ZCpI3TNC9xh54ld1X13CNq-T51VOtP23k,6434
51
51
  vellum_ee/workflows/display/nodes/vellum/map_node.py,sha256=AW5JuHXtmtcJKeRiZKd7iB1re_D7G7jl_OlaZs8nUl0,4219
52
52
  vellum_ee/workflows/display/nodes/vellum/merge_node.py,sha256=xMHaPfTSZWYprQenlHm2g47u0a5O9Me_dhAjfqo8nKQ,3116
@@ -159,7 +159,7 @@ vellum/client/README.md,sha256=flqu57ubZNTfpq60CdLtJC9gp4WEkyjb_n_eZ4OYf9w,6497
159
159
  vellum/client/__init__.py,sha256=rMnKRqL5-356SBc-rfm56MkO87PuAi2mtcfBszcJU1M,74316
160
160
  vellum/client/core/__init__.py,sha256=lTcqUPXcx4112yLDd70RAPeqq6tu3eFMe1pKOqkW9JQ,1562
161
161
  vellum/client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
162
- vellum/client/core/client_wrapper.py,sha256=lIaqax7YzeEvA_w0qUa4z08y8ZmFFnxRnQiZtMqLJNE,2840
162
+ vellum/client/core/client_wrapper.py,sha256=YjwRn4-30uWxm0Owf9bmnnSrmjminxXkRvDqEYfProI,2840
163
163
  vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
164
164
  vellum/client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
165
165
  vellum/client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
@@ -609,7 +609,7 @@ vellum/client/types/paginated_slim_deployment_read_list.py,sha256=UYNoxFOaV8HBlM
609
609
  vellum/client/types/paginated_slim_document_list.py,sha256=xfei22LINEKDXKubCteUhzkWFg-3wJgFkLbGdmTidek,740
610
610
  vellum/client/types/paginated_slim_integration_auth_config_read_list.py,sha256=sVhFJW7fkUeSlnAh3qeDxCje4vQflWlvVp5lPxYqv5I,811
611
611
  vellum/client/types/paginated_slim_integration_read_list.py,sha256=8K8epjr-Z2bTsM0iah1wZjd_lvmoGqkYoDy2OTLru0I,769
612
- vellum/client/types/paginated_slim_tool_definition_list.py,sha256=4oCAP6oiPIYUmj4El5y-lW3mDCWEg-YVP9CfTCQ-zmU,843
612
+ vellum/client/types/paginated_slim_tool_definition_list.py,sha256=XhtwDClmShV_LTFRf1odWwsttNhXFqrjN7SNSKK6bLg,795
613
613
  vellum/client/types/paginated_slim_workflow_deployment_list.py,sha256=mIQZ1FT3qQTGG-8eMRvnSAm_u9ixlGk7b80nxoVBxCI,973
614
614
  vellum/client/types/paginated_test_suite_run_execution_list.py,sha256=sYg7pO_vCUoT0xH_a8mQAUWd8A-xEI0EEfmFKbv9U-c,921
615
615
  vellum/client/types/paginated_test_suite_test_case_list.py,sha256=gDVdq10b5u3NEzMZrjpioVDBLMKmHcsRXBi-IX2ZBL8,901
@@ -1874,7 +1874,7 @@ vellum/workflows/integrations/mcp_service.py,sha256=9DYb8dg2_kgc1UOu830kxhaFlt9y
1874
1874
  vellum/workflows/integrations/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1875
1875
  vellum/workflows/integrations/tests/test_mcp_service.py,sha256=q_DYrDkIqI4sQBNgID4YdbM4e9tneLVWY8YmI4R26d8,8859
1876
1876
  vellum/workflows/integrations/tests/test_vellum_integration_service.py,sha256=n_n42FnwbR7YMd1sEVMphdOUWsWXCPw_caY6FnxNxAU,11322
1877
- vellum/workflows/integrations/vellum_integration_service.py,sha256=xgWOpjgVT7VZJStExw0_o3egimbCt8tQHBsEbc85DP8,5256
1877
+ vellum/workflows/integrations/vellum_integration_service.py,sha256=JFkrXBhkTEn_tXnRbjt289Z56_SLDSsuU7Msx2Nh9AM,5192
1878
1878
  vellum/workflows/logging.py,sha256=_a217XogktV4Ncz6xKFz7WfYmZAzkfVRVuC0rWob8ls,437
1879
1879
  vellum/workflows/nodes/__init__.py,sha256=zymtc3_iW2rFmMR-sayTLuN6ZsAw8VnJweWPsjQk2-Q,1197
1880
1880
  vellum/workflows/nodes/bases/__init__.py,sha256=cniHuz_RXdJ4TQgD8CBzoiKDiPxg62ErdVpCbWICX64,58
@@ -1918,7 +1918,7 @@ vellum/workflows/nodes/displayable/bases/api_node/tests/test_node.py,sha256=5C59
1918
1918
  vellum/workflows/nodes/displayable/bases/base_prompt_node/__init__.py,sha256=Org3xTvgp1pA0uUXFfnJr29D3HzCey2lEdYF4zbIUgo,70
1919
1919
  vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py,sha256=w02vgydiwNoKru324QLSkH3BiGUvHTgKbf05BEx945s,4657
1920
1920
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/__init__.py,sha256=Hl35IAoepRpE-j4cALaXVJIYTYOF3qszyVbxTj4kS1s,82
1921
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py,sha256=0qI94axa6xYaOPw9fFHLMd0uIGTxON9NbfPsu390MEQ,18409
1921
+ vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py,sha256=Medz-nM5dqaaNRSPAJ0LUfnv4o57RGBwKFoYNAmCf48,18484
1922
1922
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1923
1923
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/tests/test_inline_prompt_node.py,sha256=xc53wGwVqxBnN7eoyWkJ-RJ-FeUpHKekkKjViASHAFg,27495
1924
1924
  vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py,sha256=H9mM75EQpP6PUvsXCTbwjw4CqMMLf36m1G2XqiPEvH4,12139
@@ -1978,7 +1978,7 @@ vellum/workflows/nodes/displayable/tool_calling_node/tests/__init__.py,sha256=47
1978
1978
  vellum/workflows/nodes/displayable/tool_calling_node/tests/test_composio_service.py,sha256=in1fbEz5x1tx3uKv9YXdvOncsHucNL8Ro6Go7lBuuOQ,8962
1979
1979
  vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py,sha256=GZoeybB9uM7ai8sBLAtUMHrMVgh-WrJDWrKZci6feDs,11892
1980
1980
  vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py,sha256=EmKFA-ELdTzlK0xMqWnuSZPoGNLYCwk6b0amTqirZo0,11305
1981
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py,sha256=-6Qb8GuHlpYaOLlQcJSNYmRlZXEcnYzaCjIvH-scfMY,23657
1981
+ vellum/workflows/nodes/displayable/tool_calling_node/utils.py,sha256=7xNiNPD4vzd-4NuIaeCZhs0AshkuxlWVdx1NnbX-fdg,23722
1982
1982
  vellum/workflows/nodes/displayable/web_search_node/__init__.py,sha256=8FOnEP-n-U68cvxTlJW9wphIAGHq5aqjzLM-DoSSXnU,61
1983
1983
  vellum/workflows/nodes/displayable/web_search_node/node.py,sha256=NQYux2bOtuBF5E4tn-fXi5y3btURPRrNqMSM9MAZYI4,5091
1984
1984
  vellum/workflows/nodes/displayable/web_search_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -2043,7 +2043,7 @@ vellum/workflows/types/tests/test_definition.py,sha256=QUI9_Wsm2k-ZxQTXogsB0L4cs
2043
2043
  vellum/workflows/types/tests/test_utils.py,sha256=UnZog59tR577mVwqZRqqWn2fScoOU1H6up0EzS8zYhw,2536
2044
2044
  vellum/workflows/types/utils.py,sha256=mTctHITBybpt4855x32oCKALBEcMNLn-9cCmfEKgJHQ,6498
2045
2045
  vellum/workflows/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2046
- vellum/workflows/utils/functions.py,sha256=QbRoymgG_NgEvZcoyb_ofmP4o9fzuBlFRZ8s0Ivk11U,13062
2046
+ vellum/workflows/utils/functions.py,sha256=whqLOWWRDFVumOoP0IjUpw66y6H9M3iPZe1NSlvm8Gg,13155
2047
2047
  vellum/workflows/utils/hmac.py,sha256=JJCczc6pyV6DuE1Oa0QVfYPUN_of3zEYmGFib3OZnrE,1135
2048
2048
  vellum/workflows/utils/names.py,sha256=QtHquoaGqRseu5gg2OcVGI2d_CMcEOvjb9KspwH4C-A,552
2049
2049
  vellum/workflows/utils/pydantic_schema.py,sha256=eR_bBtY-T0pttJP-ARwagSdCOnwPUtiT3cegm2lzDTQ,1310
@@ -2062,8 +2062,8 @@ vellum/workflows/workflows/event_filters.py,sha256=GSxIgwrX26a1Smfd-6yss2abGCnad
2062
2062
  vellum/workflows/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2063
2063
  vellum/workflows/workflows/tests/test_base_workflow.py,sha256=Boa-_m9ii2Qsa1RvVM-VYniF7zCpzGgEGy-OnPZkrHg,23941
2064
2064
  vellum/workflows/workflows/tests/test_context.py,sha256=VJBUcyWVtMa_lE5KxdhgMu0WYNYnUQUDvTF7qm89hJ0,2333
2065
- vellum_ai-1.6.0.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
2066
- vellum_ai-1.6.0.dist-info/METADATA,sha256=WvlB8Aty09_z0FkG7VwBs1337WHiohpRkOObDT3M_s4,5547
2067
- vellum_ai-1.6.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
2068
- vellum_ai-1.6.0.dist-info/entry_points.txt,sha256=xVavzAKN4iF_NbmhWOlOkHluka0YLkbN_pFQ9pW3gLI,117
2069
- vellum_ai-1.6.0.dist-info/RECORD,,
2065
+ vellum_ai-1.6.2.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
2066
+ vellum_ai-1.6.2.dist-info/METADATA,sha256=uLqOztz36EpdnTmgOFriqcWfXXxEkc5a8MctyqbVR5M,5547
2067
+ vellum_ai-1.6.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
2068
+ vellum_ai-1.6.2.dist-info/entry_points.txt,sha256=xVavzAKN4iF_NbmhWOlOkHluka0YLkbN_pFQ9pW3gLI,117
2069
+ vellum_ai-1.6.2.dist-info/RECORD,,
@@ -5,11 +5,12 @@ from vellum import FunctionDefinition, PromptBlock, RichTextChildBlock, VellumVa
5
5
  from vellum.workflows.descriptors.base import BaseDescriptor
6
6
  from vellum.workflows.nodes import InlinePromptNode
7
7
  from vellum.workflows.types.core import JsonObject
8
- from vellum.workflows.types.definition import DeploymentDefinition
8
+ from vellum.workflows.types.definition import DeploymentDefinition, VellumIntegrationToolDefinition
9
9
  from vellum.workflows.types.generics import is_workflow_class
10
10
  from vellum.workflows.utils.functions import (
11
11
  compile_function_definition,
12
12
  compile_inline_workflow_function_definition,
13
+ compile_vellum_integration_tool_definition,
13
14
  compile_workflow_deployment_function_definition,
14
15
  )
15
16
  from vellum.workflows.utils.uuids import uuid4_from_hash
@@ -164,6 +165,8 @@ class BaseInlinePromptNodeDisplay(BaseNodeDisplay[_InlinePromptNodeType], Generi
164
165
  normalized_functions = compile_function_definition(function)
165
166
  elif isinstance(function, DeploymentDefinition):
166
167
  normalized_functions = compile_workflow_deployment_function_definition(function, display_context.client)
168
+ elif isinstance(function, VellumIntegrationToolDefinition):
169
+ normalized_functions = compile_vellum_integration_tool_definition(function, display_context.client)
167
170
  else:
168
171
  raise ValueError(f"Unsupported function type: {type(function)}")
169
172
  return {