Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix list local tools api on tooling server [ENG-1332] #596

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/composio/server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from composio.cli.context import get_context
from composio.client.collections import ActionModel, AppModel
from composio.client.enums.base import get_runtime_actions
from composio.tools.base.abs import action_registry
from composio.tools.env.base import ENV_ACCESS_TOKEN
from composio.tools.local import load_local_tools
from composio.utils.logging import get as get_logger
Expand Down Expand Up @@ -197,7 +198,7 @@ def _get_actions_by_name(name: str) -> ActionModel:
def _get_local_actions() -> t.List[ActionModel]:
"""Get list of all available actions."""
return get_context().toolset.get_action_schemas(
actions=[action.slug for action in Action.all() if action.is_local]
actions=list(action_registry["local"])
)

@app.get("/api/enums/actions", response_model=APIResponse[t.List[str]])
Expand Down
Loading