vellum-ai 1.0.5__py3-none-any.whl → 1.0.7__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.
- vellum/__init__.py +0 -8
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/types/__init__.py +0 -8
- vellum/client/types/organization_read.py +1 -2
- vellum/workflows/events/context.py +111 -0
- vellum/workflows/integrations/__init__.py +0 -0
- vellum/workflows/integrations/composio_service.py +138 -0
- vellum/workflows/nodes/displayable/api_node/tests/test_api_node.py +8 -2
- vellum/workflows/nodes/displayable/bases/api_node/node.py +36 -9
- vellum/workflows/nodes/displayable/bases/api_node/tests/__init__.py +0 -0
- vellum/workflows/nodes/displayable/bases/api_node/tests/test_node.py +124 -0
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +2 -2
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_composio_service.py +63 -58
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py +147 -2
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +61 -41
- vellum/workflows/types/definition.py +4 -2
- vellum/workflows/utils/functions.py +29 -2
- vellum/workflows/utils/tests/test_functions.py +115 -1
- {vellum_ai-1.0.5.dist-info → vellum_ai-1.0.7.dist-info}/METADATA +1 -3
- {vellum_ai-1.0.5.dist-info → vellum_ai-1.0.7.dist-info}/RECORD +29 -33
- vellum_cli/push.py +11 -2
- vellum_cli/tests/test_push.py +57 -1
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +2 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +16 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_composio_serialization.py +3 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_serialization.py +8 -2
- vellum/client/types/name_enum.py +0 -7
- vellum/client/types/organization_limit_config.py +0 -25
- vellum/client/types/quota.py +0 -22
- vellum/client/types/vembda_service_tier_enum.py +0 -5
- vellum/types/name_enum.py +0 -3
- vellum/types/organization_limit_config.py +0 -3
- vellum/types/quota.py +0 -3
- vellum/types/vembda_service_tier_enum.py +0 -3
- vellum/workflows/nodes/displayable/tool_calling_node/composio_service.py +0 -83
- {vellum_ai-1.0.5.dist-info → vellum_ai-1.0.7.dist-info}/LICENSE +0 -0
- {vellum_ai-1.0.5.dist-info → vellum_ai-1.0.7.dist-info}/WHEEL +0 -0
- {vellum_ai-1.0.5.dist-info → vellum_ai-1.0.7.dist-info}/entry_points.txt +0 -0
@@ -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 .vembda_service_tier_enum import VembdaServiceTierEnum
|
6
|
-
from .quota import Quota
|
7
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
8
|
-
import pydantic
|
9
|
-
|
10
|
-
|
11
|
-
class OrganizationLimitConfig(UniversalBaseModel):
|
12
|
-
vembda_service_tier: typing.Optional[VembdaServiceTierEnum] = None
|
13
|
-
prompt_executions_quota: typing.Optional[Quota] = None
|
14
|
-
workflow_executions_quota: typing.Optional[Quota] = None
|
15
|
-
workflow_runtime_seconds_quota: typing.Optional[Quota] = None
|
16
|
-
max_workflow_runtime_seconds: typing.Optional[int] = 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
|
vellum/client/types/quota.py
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
2
|
-
|
3
|
-
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
-
from .name_enum import NameEnum
|
5
|
-
import typing
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
-
import pydantic
|
8
|
-
|
9
|
-
|
10
|
-
class Quota(UniversalBaseModel):
|
11
|
-
name: NameEnum
|
12
|
-
value: typing.Optional[int] = None
|
13
|
-
period_seconds: typing.Optional[int] = 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
|
vellum/types/name_enum.py
DELETED
vellum/types/quota.py
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from typing import Any, Dict, List
|
3
|
-
|
4
|
-
from composio import Action, Composio
|
5
|
-
from composio_client import Composio as ComposioClient
|
6
|
-
|
7
|
-
|
8
|
-
@dataclass
|
9
|
-
class ConnectionInfo:
|
10
|
-
"""Information about a user's authorized connection"""
|
11
|
-
|
12
|
-
connection_id: str
|
13
|
-
integration_name: str
|
14
|
-
created_at: str
|
15
|
-
updated_at: str
|
16
|
-
status: str = "ACTIVE" # TODO: Use enum if we end up supporting integrations that the user has not yet connected to
|
17
|
-
|
18
|
-
|
19
|
-
class ComposioAccountService:
|
20
|
-
"""Manages user authorized connections using composio-client"""
|
21
|
-
|
22
|
-
def __init__(self, api_key: str):
|
23
|
-
self.client = ComposioClient(api_key=api_key)
|
24
|
-
|
25
|
-
def get_user_connections(self) -> List[ConnectionInfo]:
|
26
|
-
"""Get all authorized connections for the user"""
|
27
|
-
response = self.client.connected_accounts.list()
|
28
|
-
|
29
|
-
return [
|
30
|
-
ConnectionInfo(
|
31
|
-
connection_id=item.id,
|
32
|
-
integration_name=item.toolkit.slug,
|
33
|
-
status=item.status,
|
34
|
-
created_at=item.created_at,
|
35
|
-
updated_at=item.updated_at,
|
36
|
-
)
|
37
|
-
for item in response.items
|
38
|
-
]
|
39
|
-
|
40
|
-
|
41
|
-
class ComposioCoreService:
|
42
|
-
"""Handles tool execution using composio-core"""
|
43
|
-
|
44
|
-
def __init__(self, api_key: str):
|
45
|
-
self.client = Composio(api_key=api_key)
|
46
|
-
|
47
|
-
def execute_tool(self, tool_name: str, arguments: Dict[str, Any]) -> Any:
|
48
|
-
"""Execute a tool using composio-core
|
49
|
-
|
50
|
-
Args:
|
51
|
-
tool_name: The name of the tool to execute (e.g., "HACKERNEWS_GET_USER")
|
52
|
-
arguments: Dictionary of arguments to pass to the tool
|
53
|
-
|
54
|
-
Returns:
|
55
|
-
The result of the tool execution
|
56
|
-
"""
|
57
|
-
# Convert tool name string to Action enum
|
58
|
-
action = getattr(Action, tool_name)
|
59
|
-
return self.client.actions.execute(action, params=arguments)
|
60
|
-
|
61
|
-
|
62
|
-
class ComposioService:
|
63
|
-
"""Unified interface for Composio operations"""
|
64
|
-
|
65
|
-
def __init__(self, api_key: str):
|
66
|
-
self.accounts = ComposioAccountService(api_key)
|
67
|
-
self.core = ComposioCoreService(api_key)
|
68
|
-
|
69
|
-
def get_user_connections(self) -> List[ConnectionInfo]:
|
70
|
-
"""Get user's authorized connections"""
|
71
|
-
return self.accounts.get_user_connections()
|
72
|
-
|
73
|
-
def execute_tool(self, tool_name: str, arguments: Dict[str, Any]) -> Any:
|
74
|
-
"""Execute a tool using composio-core
|
75
|
-
|
76
|
-
Args:
|
77
|
-
tool_name: The name of the tool to execute (e.g., "HACKERNEWS_GET_USER")
|
78
|
-
arguments: Dictionary of arguments to pass to the tool
|
79
|
-
|
80
|
-
Returns:
|
81
|
-
The result of the tool execution
|
82
|
-
"""
|
83
|
-
return self.core.execute_tool(tool_name, arguments)
|
File without changes
|
File without changes
|
File without changes
|