Skip to content

Commit

Permalink
feat: add doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu-dixit committed May 31, 2024
1 parent 9ee0ede commit 31bdc98
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
21 changes: 19 additions & 2 deletions composio/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,15 @@ def execute(
entity_id: str,
connected_account: t.Optional[str] = None,
) -> t.Dict:
"""Execute an action."""
"""
Execute an action.
:param action: Action to execute.
:param params: Parameters to pass to the action.
:param entity_id: Entity ID.
:param connected_account: Connected account ID.
:return: Response from the action.
"""
if action.is_local:
return self.local_handler.execute_local_action(
action=action,
Expand Down Expand Up @@ -1009,7 +1017,16 @@ def initiate_connection(
redirect_url: t.Optional[str] = None,
integration: t.Optional[IntegrationModel] = None,
) -> ConnectionRequestModel:
"""Initiate integration connection."""
"""
Initiate integration connection.
:param app_name: App name
:param auth_mode: Auth mode
:param auth_config: Auth config
:param redirect_url: Redirect URL
:param integration: Integration
:return: Connection request model
"""
if isinstance(app_name, App):
app_name = app_name.value

Expand Down
10 changes: 9 additions & 1 deletion plugins/autogen/composio_autogen/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,15 @@ def _register_schema_to_autogen(
executor: ConversableAgent,
entity_id: t.Optional[str] = None,
) -> None:
"""Register action schema to autogen registry."""
"""
Register a schema to the Autogen registry.
Args:
schema (dict[str, any]): The action schema.
caller (ConversableAgent): The caller for the tools.
executor (ConversableAgent): The executor for the tools.
entity_id (str, optional): The ID of the entity for which to execute the action. Defaults to "default".
"""
name = schema["name"]
appName = schema["appName"]
description = schema["description"]
Expand Down

0 comments on commit 31bdc98

Please sign in to comment.