From 62f70c02a434d74a0b5b8442c8124ded8745ad33 Mon Sep 17 00:00:00 2001 From: Utkarsh Dixit Date: Wed, 8 May 2024 23:34:53 +0530 Subject: [PATCH 1/2] feat: add no auth entity --- composio/sdk/sdk.py | 23 +++++++++++++++-------- examples/composio_crewai_demo.py | 32 ++++++++++++++++++++++++++++++++ tests/autogen_test.py | 1 + tests/crewai_test.py | 1 + tests/langchain_test.py | 1 + 5 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 examples/composio_crewai_demo.py diff --git a/composio/sdk/sdk.py b/composio/sdk/sdk.py index 0fc9e29ec7..3f9b3c04c7 100644 --- a/composio/sdk/sdk.py +++ b/composio/sdk/sdk.py @@ -124,6 +124,7 @@ class ConnectedAccount(BaseModel): model_config = ConfigDict(arbitrary_types_allowed=True) integrationId: str connectionParams: AuthConnectionParams + clientUniqueUserId: str appUniqueId: str id: str status: str @@ -142,7 +143,7 @@ def _execute_action( ): resp = self.sdk_instance.http_client.post( f"v1/actions/{action_name.value[1]}/execute", - json={"connectedAccountId": connected_account_id, "input": params}, + json={"connectedAccountId": connected_account_id, "input": params, "entityId": self.clientUniqueUserId}, ) return resp.json() @@ -461,13 +462,6 @@ def get_entity(self, entity_id: Union[list[str], str]): entity = Entity(self, entity_id) return entity - def no_auth_execute_action(self, action: Action, params: dict): - tool_name = action.value[0] - resp = self.http_client.post( - f"v1/actions/{action.value[1]}/execute", - json={"appName": tool_name, "input": params}, - ) - return resp.json() class Entity: @@ -475,6 +469,19 @@ def __init__(self, composio: Composio, entity_id: Union[list[str], str]) -> None self.client = composio entity_id = entity_id if isinstance(entity_id, str) else ",".join(entity_id) self.entity_id = entity_id + self.http_client = self.client.http_client + + def execute_action(self, action: Action, params: dict, no_auth=False, connected_account_id: Optional[str] = None, entity_id = "default"): + if no_auth is True: + tool_name = action.value[0] + resp = self.http_client.post( + f"v1/actions/{action.value[1]}/execute", + json={"appName": tool_name, "input": params, "entityId": entity_id}, + ) + return resp.json() + else: + connected_account = self.client.get_connected_account(connected_account_id) + return connected_account.execute_action(action, params) def get_all_actions(self, tags: list[Union[str, Tag]] = None) -> list[Action]: actions = [] diff --git a/examples/composio_crewai_demo.py b/examples/composio_crewai_demo.py new file mode 100644 index 0000000000..b8660f32ef --- /dev/null +++ b/examples/composio_crewai_demo.py @@ -0,0 +1,32 @@ +import os +import dotenv +from crewai import Agent, Task +from langchain_openai import ChatOpenAI +from plugins.crew_ai.composio_crewai import ComposioToolset, App, Action + +# Loading the variables from .env file +dotenv.load_dotenv() + +llm = ChatOpenAI(openai_api_key=os.environ["OPENAI_API_KEY"]) + + +# Get All the tools +tools = ComposioToolset(actions=[Action.COMPOSIO_CHECK_ACTIVE_CONNECTION], entity_id="soham") + + +crewai_agent = Agent( + role='User Connection Checker', + goal="""You check if the user connection is active for an app""", + backstory="""You are AI agent that is responsible for making sure that if the user connection is active for an app""", + verbose=True, + tools=tools, + llm=llm +) + +task = Task( + description="Check ifthe user connection is active for github", + agent=crewai_agent, + expected_output="Tell me if the user connection is active for github" +) + +task.execute() \ No newline at end of file diff --git a/tests/autogen_test.py b/tests/autogen_test.py index 08af27583e..0c95b61f82 100644 --- a/tests/autogen_test.py +++ b/tests/autogen_test.py @@ -55,6 +55,7 @@ def test_add_github(): "composio.sdk.sdk.Composio.get_connected_account", return_value=ConnectedAccount( sdk_instance=mock.Mock(), + clientUniqueUserId="default", status="ACTIVE", integrationId="integ123", connectionParams={"scope": "read", "base_url": "https://api.example.com"}, diff --git a/tests/crewai_test.py b/tests/crewai_test.py index c7452eacf1..82f6206e24 100644 --- a/tests/crewai_test.py +++ b/tests/crewai_test.py @@ -55,6 +55,7 @@ def test_add_github(): "composio.sdk.sdk.Composio.get_connected_account", return_value=ConnectedAccount( sdk_instance=mock.Mock(), + clientUniqueUserId="default", status="ACTIVE", integrationId="integ123", connectionParams={"scope": "read", "base_url": "https://api.example.com"}, diff --git a/tests/langchain_test.py b/tests/langchain_test.py index 226da92e7e..bbdc7e1544 100644 --- a/tests/langchain_test.py +++ b/tests/langchain_test.py @@ -57,6 +57,7 @@ def test_add_github(): sdk_instance=mock.Mock(), status="ACTIVE", integrationId="integ123", + clientUniqueUserId="default", connectionParams={"scope": "read", "base_url": "https://api.example.com"}, appUniqueId="app456", id="", From 8c207f5acf1b4fa3e2f45594fa37ccabcd5b8286 Mon Sep 17 00:00:00 2001 From: Utkarsh Dixit Date: Wed, 8 May 2024 23:49:17 +0530 Subject: [PATCH 2/2] feat: update version to 0.2.57 --- composio/sdk/core.py | 4 +- composio/sdk/enums.py | 217 +++++++++++++++++++------------------ composio/sdk/sdk.py | 3 +- plugins/autogen/setup.py | 4 +- plugins/claude/setup.py | 4 +- plugins/crew_ai/setup.py | 4 +- plugins/griptape/setup.py | 4 +- plugins/julep/setup.py | 4 +- plugins/langchain/setup.py | 4 +- plugins/lyzr/setup.py | 4 +- plugins/openai/setup.py | 4 +- setup.py | 2 +- 12 files changed, 131 insertions(+), 127 deletions(-) diff --git a/composio/sdk/core.py b/composio/sdk/core.py index ce35fb3b3c..b35cca8b48 100644 --- a/composio/sdk/core.py +++ b/composio/sdk/core.py @@ -176,8 +176,8 @@ def execute_action(self, action: Action, params: dict, entity_id: str = "default tool_name = action.value[0] no_auth = action.value[2] if len(action.value) > 2 else False if no_auth: - resp = self.sdk.no_auth_execute_action(action, params) - return resp + resp = self.sdk.get_entity(entity_id) + return resp.execute_action(action, params, entity_id=entity_id) entity = self.sdk.get_entity(entity_id) account = entity.get_connection(tool_name) if not account: diff --git a/composio/sdk/enums.py b/composio/sdk/enums.py index adf35a18cf..36b3f69f96 100644 --- a/composio/sdk/enums.py +++ b/composio/sdk/enums.py @@ -3,80 +3,97 @@ class Tag(Enum): IMPORTANT = ("default", "important") ALL = ("default", "all") - ASANA_CUSTOM_FIELDS = ("asana", "Custom fields") ASANA_STORIES = ("asana", "Stories") - ASANA_MEMBERSHIPS = ("asana", "Memberships") - ASANA_PORTFOLIO_MEMBERSHIPS = ("asana", "Portfolio memberships") - ASANA_TEAM_MEMBERSHIPS = ("asana", "Team memberships") - ASANA_SECTIONS = ("asana", "Sections") - ASANA_EVENTS = ("asana", "Events") ASANA_TIME_TRACKING_ENTRIES = ("asana", "Time tracking entries") - ASANA_WEBHOOKS = ("asana", "Webhooks") - ASANA_TASKS = ("asana", "Tasks") - ASANA_RULES = ("asana", "Rules") ASANA_TYPEAHEAD = ("asana", "Typeahead") + ASANA_PORTFOLIOS = ("asana", "Portfolios") + ASANA_TEAMS = ("asana", "Teams") + ASANA_TEAM_MEMBERSHIPS = ("asana", "Team memberships") + ASANA_AUDIT_LOG_API = ("asana", "Audit log API") ASANA_PROJECT_STATUSES = ("asana", "Project statuses") - ASANA_ALLOCATIONS = ("asana", "Allocations") - ASANA_ORGANIZATION_EXPORTS = ("asana", "Organization exports") + ASANA_ATTACHMENTS = ("asana", "Attachments") + ASANA_GOAL_RELATIONSHIPS = ("asana", "Goal relationships") + ASANA_USERS = ("asana", "Users") + ASANA_SECTIONS = ("asana", "Sections") ASANA_PROJECTS = ("asana", "Projects") - ASANA_STATUS_UPDATES = ("asana", "Status updates") - ASANA_WORKSPACE_MEMBERSHIPS = ("asana", "Workspace memberships") ASANA_WORKSPACES = ("asana", "Workspaces") - ASANA_PORTFOLIOS = ("asana", "Portfolios") + ASANA_PROJECT_MEMBERSHIPS = ("asana", "Project memberships") + ASANA_CUSTOM_FIELDS = ("asana", "Custom fields") + ASANA_TIME_PERIODS = ("asana", "Time periods") + ASANA_ORGANIZATION_EXPORTS = ("asana", "Organization exports") + ASANA_EVENTS = ("asana", "Events") + ASANA_TASKS = ("asana", "Tasks") + ASANA_CUSTOM_FIELD_SETTINGS = ("asana", "Custom field settings") + ASANA_ALLOCATIONS = ("asana", "Allocations") + ASANA_PORTFOLIO_MEMBERSHIPS = ("asana", "Portfolio memberships") ASANA_GOALS = ("asana", "Goals") - ASANA_BATCH_API = ("asana", "Batch API") + ASANA_RULES = ("asana", "Rules") + ASANA_WORKSPACE_MEMBERSHIPS = ("asana", "Workspace memberships") ASANA_USER_TASK_LISTS = ("asana", "User task lists") - ASANA_ATTACHMENTS = ("asana", "Attachments") - ASANA_JOBS = ("asana", "Jobs") - ASANA_AUDIT_LOG_API = ("asana", "Audit log API") ASANA_TAGS = ("asana", "Tags") - ASANA_TEAMS = ("asana", "Teams") - ASANA_CUSTOM_FIELD_SETTINGS = ("asana", "Custom field settings") - ASANA_GOAL_RELATIONSHIPS = ("asana", "Goal relationships") - ASANA_PROJECT_BRIEFS = ("asana", "Project briefs") - ASANA_PROJECT_MEMBERSHIPS = ("asana", "Project memberships") - ASANA_USERS = ("asana", "Users") + ASANA_JOBS = ("asana", "Jobs") + ASANA_BATCH_API = ("asana", "Batch API") ASANA_PROJECT_TEMPLATES = ("asana", "Project templates") + ASANA_STATUS_UPDATES = ("asana", "Status updates") + ASANA_MEMBERSHIPS = ("asana", "Memberships") ASANA_TASK_TEMPLATES = ("asana", "Task templates") - ASANA_TIME_PERIODS = ("asana", "Time periods") + ASANA_PROJECT_BRIEFS = ("asana", "Project briefs") + ASANA_WEBHOOKS = ("asana", "Webhooks") + ELEVENLABS_SPEECH_HISTORY = ("elevenlabs", "speech-history") + ELEVENLABS_MODELS = ("elevenlabs", "models") + ELEVENLABS_TEXT_TO_SPEECH = ("elevenlabs", "text-to-speech") + ELEVENLABS_SPEECH_TO_SPEECH = ("elevenlabs", "speech-to-speech") ELEVENLABS_SAMPLES = ("elevenlabs", "samples") - ELEVENLABS_PRONUNCIATION_DICTIONARY = ("elevenlabs", "Pronunciation Dictionary") - ELEVENLABS_AUDIO_NATIVE = ("elevenlabs", "audio-native") ELEVENLABS_USER = ("elevenlabs", "user") - ELEVENLABS_VOICE_GENERATION = ("elevenlabs", "voice-generation") ELEVENLABS_WORKSPACE = ("elevenlabs", "workspace") ELEVENLABS_VOICES = ("elevenlabs", "voices") - ELEVENLABS_TEXT_TO_SPEECH = ("elevenlabs", "text-to-speech") - ELEVENLABS_SPEECH_HISTORY = ("elevenlabs", "speech-history") ELEVENLABS_PROJECTS = ("elevenlabs", "projects") + ELEVENLABS_PRONUNCIATION_DICTIONARY = ("elevenlabs", "Pronunciation Dictionary") ELEVENLABS_DUBBING = ("elevenlabs", "dubbing") - ELEVENLABS_SPEECH_TO_SPEECH = ("elevenlabs", "speech-to-speech") - ELEVENLABS_MODELS = ("elevenlabs", "models") - LISTENNOTES_INSIGHTS_API = ("listennotes", "Insights API") - LISTENNOTES_PLAYLIST_API = ("listennotes", "Playlist API") + ELEVENLABS_VOICE_GENERATION = ("elevenlabs", "voice-generation") + ELEVENLABS_AUDIO_NATIVE = ("elevenlabs", "audio-native") LISTENNOTES_PODCASTER_API = ("listennotes", "Podcaster API") LISTENNOTES_SEARCH_API = ("listennotes", "Search API") + LISTENNOTES_PLAYLIST_API = ("listennotes", "Playlist API") + LISTENNOTES_INSIGHTS_API = ("listennotes", "Insights API") LISTENNOTES_DIRECTORY_API = ("listennotes", "Directory API") - ZOOM_TRACKING_FIELD = ("zoom", "Tracking Field") - ZOOM_CLOUD_RECORDING = ("zoom", "Cloud Recording") - ZOOM_DEVICES = ("zoom", "Devices") ZOOM_H323_DEVICES = ("zoom", "H323 Devices") ZOOM_PAC = ("zoom", "PAC") - ZOOM_SIP_PHONE = ("zoom", "SIP Phone") + ZOOM_TSP = ("zoom", "TSP") + ZOOM_CLOUD_RECORDING = ("zoom", "Cloud Recording") ZOOM_WEBINARS = ("zoom", "Webinars") ZOOM_MEETINGS = ("zoom", "Meetings") + ZOOM_TRACKING_FIELD = ("zoom", "Tracking Field") ZOOM_REPORTS = ("zoom", "Reports") - ZOOM_TSP = ("zoom", "TSP") + ZOOM_DEVICES = ("zoom", "Devices") ZOOM_ARCHIVING = ("zoom", "Archiving") + ZOOM_SIP_PHONE = ("zoom", "SIP Phone") class App(Enum): - ABLY = "ably" + DOCMOSIS = "docmosis" + SERPAPI = "serpapi" + SERVICEM8 = "servicem8" + SHOPIFY = "shopify" + KLAVIYO = "klaviyo" + NOTION = "notion" + NETSUITE = "netsuite" + NGROK = "ngrok" + ONCEHUB = "oncehub" + ONE_DRIVE = "one-drive" + PAGERDUTY = "pagerduty" + PANDADOC = "pandadoc" + PIGGY = "piggy" + PIPEDRIVE = "pipedrive" + PLACEKEY = "placekey" ACCELO = "accelo" - ACTIVE_COMPAIGN = "active-compaign" + FITBIT = "fitbit" + WORKIOM = "workiom" + WORKSPACE = "workspace" + ABLY = "ably" + TEST_ASANA = "test_asana" ADOBE = "adobe" AERO_WORKFLOW = "aero-workflow" ALCHEMY = "alchemy" - ALTOVIZ = "altoviz" AMAZON = "amazon" AMCARDS = "amcards" AMPLITUDE = "amplitude" @@ -86,14 +103,6 @@ class App(Enum): ASHBY = "ashby" ATLASSIAN = "atlassian" ATTIO = "attio" - AUTH0 = "auth0" - AXONAUT = "axonaut" - BAMBOOHR = "bamboohr" - BANNERBEAR = "bannerbear" - BASEROW = "baserow" - BATTLENET = "battlenet" - BEEMINDER = "beeminder" - BITBUCKET = "bitbucket" BITWARDEN = "bitwarden" BLACKBAUD = "blackbaud" BOLDSIGN = "boldsign" @@ -107,40 +116,47 @@ class App(Enum): BROWSEAI = "browseai" BROWSERHUB = "browserhub" BUBBLE = "bubble" + CLOUDFLARE = "cloudflare" + COINMARKETCAL = "coinmarketcal" + CONTENTFUL = "contentful" CAL = "cal" CALENDLY = "calendly" CHATWORK = "chatwork" CHMEETINGS = "chmeetings" CLICKUP = "clickup" CLOSE = "close" - CLOUDFLARE = "cloudflare" CODEINTERPRETER = "codeinterpreter" - COINMARKETCAL = "coinmarketcal" - CONTENTFUL = "contentful" CUSTOMER_IO = "customer_io" DAILYBOT = "dailybot" DATADOG = "datadog" DATAGMA = "datagma" DATAROBOT = "datarobot" DEEL = "deel" + EPIC_GAMES = "epic-games" + EVENTBRITE = "eventbrite" + EXA = "exa" + ACTIVE_COMPAIGN = "active-compaign" + ALTOVIZ = "altoviz" + AXONAUT = "axonaut" + BAMBOOHR = "bamboohr" + BANNERBEAR = "bannerbear" + BASEROW = "baserow" + BATTLENET = "battlenet" + BEEMINDER = "beeminder" + BITBUCKET = "bitbucket" + FACTORIAL = "factorial" DEMIO = "demio" DIGICERT = "digicert" DISCORD = "discord" - DOCMOSIS = "docmosis" DROPBOX = "dropbox" DROPBOX_SIGN = "dropbox-sign" ECHTPOST = "echtpost" ELEVENLABS = "elevenlabs" - EPIC_GAMES = "epic-games" - EVENTBRITE = "eventbrite" - EXA = "exa" EXIST = "exist" FACEBOOK = "facebook" - FACTORIAL = "factorial" FIGMA = "figma" FILEMANAGER = "filemanager" FINAGE = "finage" - FITBIT = "fitbit" FLUTTERWAVE = "flutterwave" FOMO = "fomo" FORMCARRY = "formcarry" @@ -169,11 +185,13 @@ class App(Enum): INTERZOID = "interzoid" JIRA = "jira" KEAP = "keap" - KLAVIYO = "klaviyo" KLIPFOLIO = "klipfolio" LASTPASS = "lastpass" LAUNCH_DARKLY = "launch-darkly" LEVER = "lever" + RAVENSEOTOOLS = "ravenseotools" + REDDIT = "reddit" + RING_CENTRAL = "ring-central" LEVER_SANDBOX = "lever-sandbox" LEXOFFICE = "lexoffice" LINEAR = "linear" @@ -189,38 +207,25 @@ class App(Enum): MIRO = "miro" MIXPANEL = "mixpanel" MOCEAN_API = "mocean-api" - MONDAY = "monday" - MORE_TREES = "more-trees" - MOXIE = "moxie" - MURAL = "mural" - NCSCALE = "ncscale" - NETSUITE = "netsuite" - NGROK = "ngrok" - NOTION = "notion" OKTA = "okta" - ONCEHUB = "oncehub" - ONE_DRIVE = "one-drive" - PAGERDUTY = "pagerduty" - PANDADOC = "pandadoc" - PIGGY = "piggy" - PIPEDRIVE = "pipedrive" - PLACEKEY = "placekey" PRINTNODE = "printnode" PROCESS_STREET = "process-street" PRODUCTBOARD = "productboard" QUALAROO = "qualaroo" RAFFLYS = "rafflys" - RAVENSEOTOOLS = "ravenseotools" - REDDIT = "reddit" - RING_CENTRAL = "ring-central" ROCKET_REACH = "rocket-reach" - SAGE = "sage" SALESFORCE = "salesforce" - SCHEDULER = "scheduler" SCREENSHOTONE = "screenshotone" - SERPAPI = "serpapi" - SERVICEM8 = "servicem8" - SHOPIFY = "shopify" + MONDAY = "monday" + MORE_TREES = "more-trees" + MOXIE = "moxie" + MURAL = "mural" + NCSCALE = "ncscale" + SAGE = "sage" + VERO = "vero" + WEBFLOW = "webflow" + WORKABLE = "workable" + AUTH0 = "auth0" SHORTCUT = "shortcut" SIMPLESAT = "simplesat" SLACK = "slack" @@ -251,21 +256,15 @@ class App(Enum): TWITTER = "twitter" TYPEFORM = "typeform" VENLY = "venly" - VERO = "vero" WABOXAPP = "waboxapp" WAKATIME = "wakatime" WAVE_ACCOUNTING = "wave-accounting" - WEBFLOW = "webflow" - WORKABLE = "workable" - WORKIOM = "workiom" - WORKSPACE = "workspace" XERO = "xero" YANDEX = "yandex" YNAB = "ynab" YOUTUBE = "youtube" ZENDESK = "zendesk" ZENSERP = "zenserp" - ZOHO = "zoho" ZOHO_BIGIN = "zoho-bigin" ZOHO_BOOKS = "zoho-books" ZOHO_DESK = "zoho-desk" @@ -273,6 +272,8 @@ class App(Enum): ZOHO_INVOICE = "zoho-invoice" ZOHO_MAIL = "zoho-mail" ZOOM = "zoom" + ZOHO = "zoho" + COMPOSIO = "composio" class Action(Enum): def __init__(self, service, action, no_auth): @@ -280,6 +281,23 @@ def __init__(self, service, action, no_auth): self.action = action self.no_auth = no_auth + SERPAPI_SEARCH = ("serpapi", "serpapi_search", True) + NOTION_GET_ABOUT_ME = ("notion", "notion_get_about_me", False) + NOTION_ADD_NOTION_PAGE_CHILDREN = ("notion", "notion_add_notion_page_children", False) + NOTION_ARCHIVE_NOTION_PAGE = ("notion", "notion_archive_notion_page", False) + NOTION_CREATE_NOTION_DATABASE = ("notion", "notion_create_notion_database", False) + NOTION_CREATE_PAGE_COMMENT = ("notion", "notion_create_page_comment", False) + NOTION_CREATE_NOTION_PAGE = ("notion", "notion_create_notion_page", False) + NOTION_DELETE_NOTION_PAGE_CHILDREN = ("notion", "notion_delete_notion_page_children", False) + NOTION_FETCH_NOTION_COMMENT = ("notion", "notion_fetch_notion_comment", False) + NOTION_FETCH_NOTION_DATABASE = ("notion", "notion_fetch_notion_database", False) + NOTION_FETCH_NOTION_PAGE = ("notion", "notion_fetch_notion_page", False) + NOTION_SEARCH_NOTION_PAGE = ("notion", "notion_search_notion_page", False) + NOTION_UPDATE_NOTION_DATABASE = ("notion", "notion_update_notion_database", False) + NOTION_FETCH_NOTION_BLOCK = ("notion", "notion_fetch_notion_block", False) + NOTION_FETCH_NOTION_CHILD_BLOCK = ("notion", "notion_fetch_notion_child_block", False) + TEST_ASANA_CREATE_SUBTASK = ("test_asana", "test_asana_create_subtask", False) + TEST_ASANA_GET_SUBTASKS = ("test_asana", "test_asana_get_subtasks", False) APIFY_LIST_APIFY_ACTORS = ("apify", "apify_list_apify_actors", False) APIFY_CREATE_APIFY_ACTOR = ("apify", "apify_create_apify_actor", False) APIFY_GET_ACTOR_ID = ("apify", "apify_get_actor_id", False) @@ -485,6 +503,8 @@ def __init__(self, service, action, no_auth): CLICKUP_CREATE_FOLDER = ("clickup", "clickup_create_folder", False) CLICKUP_GET_FOLDERS = ("clickup", "clickup_get_folders", False) CODEINTERPRETER_EXECUTE_CODE = ("codeinterpreter", "codeinterpreter_execute_code", True) + EXA_SEARCH = ("exa", "exa_search", True) + EXA_SIMILARLINK = ("exa", "exa_similarlink", True) DROPBOX_GET_ABOUT_ME = ("dropbox", "dropbox_get_about_me", False) ELEVENLABS_GET_GENERATED_ITEMSV1_HISTORY_GET = ("elevenlabs", "elevenlabs_get_generated_itemsv1_history_get", False) ELEVENLABS_GET_HISTORY_ITEM_BY_IDV1_HISTORY_HISTORY_ITEMID_GET = ("elevenlabs", "elevenlabs_get_history_item_by_idv1_history_history_itemid_get", False) @@ -542,8 +562,6 @@ def __init__(self, service, action, no_auth): ELEVENLABS_GET_PRONUNCIATION_DICTIONARIESV1_PRONUNCIATION_DICTIONARIES_GET = ("elevenlabs", "elevenlabs_get_pronunciation_dictionariesv1_pronunciation_dictionaries_get", False) ELEVENLABS_GETA_PROFILE_PAGE_PROFILE_HANDLE_GET = ("elevenlabs", "elevenlabs_geta_profile_page_profile_handle_get", False) ELEVENLABS_REDIRECT_TO_MINT_LI_FY_DOCS_GET = ("elevenlabs", "elevenlabs_redirect_to_mint_li_fy_docs_get", False) - EXA_SEARCH = ("exa", "exa_search", True) - EXA_SIMILARLINK = ("exa", "exa_similarlink", True) FILEMANAGER_CREATE_SHELL_ACTION = ("filemanager", "filemanager_create_shell_action", True) FILEMANAGER_CLOSE_SHELL_ACTION = ("filemanager", "filemanager_close_shell_action", True) FILEMANAGER_RUN_COMMAND_ACTION = ("filemanager", "filemanager_run_command_action", True) @@ -610,22 +628,6 @@ def __init__(self, service, action, no_auth): LISTENNOTES_GET_PLAYLISTS = ("listennotes", "listennotes_get_playlists", False) LISTENNOTES_GET_PODCAST_AUDIENCE = ("listennotes", "listennotes_get_podcast_audience", False) LISTENNOTES_GET_PODCASTS_BY_DOMAIN_NAME = ("listennotes", "listennotes_get_podcasts_by_domain_name", False) - NOTION_GET_ABOUT_ME = ("notion", "notion_get_about_me", False) - NOTION_ADD_NOTION_PAGE_CHILDREN = ("notion", "notion_add_notion_page_children", False) - NOTION_ARCHIVE_NOTION_PAGE = ("notion", "notion_archive_notion_page", False) - NOTION_CREATE_NOTION_DATABASE = ("notion", "notion_create_notion_database", False) - NOTION_CREATE_PAGE_COMMENT = ("notion", "notion_create_page_comment", False) - NOTION_CREATE_NOTION_PAGE = ("notion", "notion_create_notion_page", False) - NOTION_DELETE_NOTION_PAGE_CHILDREN = ("notion", "notion_delete_notion_page_children", False) - NOTION_FETCH_NOTION_COMMENT = ("notion", "notion_fetch_notion_comment", False) - NOTION_FETCH_NOTION_DATABASE = ("notion", "notion_fetch_notion_database", False) - NOTION_FETCH_NOTION_PAGE = ("notion", "notion_fetch_notion_page", False) - NOTION_SEARCH_NOTION_PAGE = ("notion", "notion_search_notion_page", False) - NOTION_UPDATE_NOTION_DATABASE = ("notion", "notion_update_notion_database", False) - NOTION_FETCH_NOTION_BLOCK = ("notion", "notion_fetch_notion_block", False) - NOTION_FETCH_NOTION_CHILD_BLOCK = ("notion", "notion_fetch_notion_child_block", False) - SCHEDULER_SCHEDULE_JOB_ACTION = ("scheduler", "scheduler_schedule_job_action", True) - SERPAPI_SEARCH = ("serpapi", "serpapi_search", True) SLACK_SEND_SLACK_MESSAGE = ("slack", "slack_send_slack_message", False) SLACK_LIST_SLACK_CHANNELS = ("slack", "slack_list_slack_channels", False) SLACK_LIST_SLACK_MEMBERS = ("slack", "slack_list_slack_members", False) @@ -832,6 +834,7 @@ def __init__(self, service, action, no_auth): ZOOM_WEB_IN_ARS_UPDATE_SURVEY = ("zoom", "zoom_web_in_ars_update_survey", False) ZOOM_WEB_IN_ARS_GET_WEB_IN_ART_OKEN = ("zoom", "zoom_web_in_ars_get_web_in_art_oken", False) ZOOM_WEB_IN_ARS_LIST_TRACKING_SOURCES = ("zoom", "zoom_web_in_ars_list_tracking_sources", False) + COMPOSIO_CHECK_ACTIVE_CONNECTION = ("composio", "composio_check_active_connection", True) class Trigger(Enum): def __init__(self, service, trigger): diff --git a/composio/sdk/sdk.py b/composio/sdk/sdk.py index 3f9b3c04c7..792abe8a71 100644 --- a/composio/sdk/sdk.py +++ b/composio/sdk/sdk.py @@ -471,7 +471,8 @@ def __init__(self, composio: Composio, entity_id: Union[list[str], str]) -> None self.entity_id = entity_id self.http_client = self.client.http_client - def execute_action(self, action: Action, params: dict, no_auth=False, connected_account_id: Optional[str] = None, entity_id = "default"): + def execute_action(self, action: Action, params: dict, connected_account_id: Optional[str] = None, entity_id = "default"): + no_auth = action.value[2] if len(action.value) > 2 else False if no_auth is True: tool_name = action.value[0] resp = self.http_client.post( diff --git a/plugins/autogen/setup.py b/plugins/autogen/setup.py index df8c617e49..8796d1d427 100644 --- a/plugins/autogen/setup.py +++ b/plugins/autogen/setup.py @@ -9,7 +9,7 @@ setup( name="composio_autogen", - version="0.2.51", + version="0.2.57", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Autogen agent.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_core===0.2.51", + "composio_core===0.2.57", "pyautogen>=0.2.19", ], include_package_data=True, diff --git a/plugins/claude/setup.py b/plugins/claude/setup.py index c1293269c5..b85dcb9cea 100644 --- a/plugins/claude/setup.py +++ b/plugins/claude/setup.py @@ -9,7 +9,7 @@ setup( name="composio_claude", - version="0.2.47", + version="0.2.57", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Claude LLMs.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_openai===0.2.47", + "composio_openai===0.2.57", "anthropic>=0.25.7" ], include_package_data=True, diff --git a/plugins/crew_ai/setup.py b/plugins/crew_ai/setup.py index bbcb368e82..1cc3d9f693 100644 --- a/plugins/crew_ai/setup.py +++ b/plugins/crew_ai/setup.py @@ -9,7 +9,7 @@ setup( name="composio_crewai", - version="0.2.51", + version="0.2.57", author="Himanshu", author_email="himanshu@composio.dev", description="Use Composio to get an array of tools with your CrewAI agent.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_langchain===0.2.51", + "composio_langchain===0.2.57", ], include_package_data=True, ) diff --git a/plugins/griptape/setup.py b/plugins/griptape/setup.py index a7ed1094eb..ba6b56a671 100644 --- a/plugins/griptape/setup.py +++ b/plugins/griptape/setup.py @@ -9,7 +9,7 @@ setup( name="composio_griptape", - version="0.2.47", + version="0.2.57", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Griptape wokflow.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_core===0.2.47", + "composio_core===0.2.57", "griptape>=0.24.2" ], include_package_data=True, diff --git a/plugins/julep/setup.py b/plugins/julep/setup.py index 5e837da914..092df792a9 100644 --- a/plugins/julep/setup.py +++ b/plugins/julep/setup.py @@ -9,7 +9,7 @@ setup( name="composio_julep", - version="0.2.51", + version="0.2.57", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Julep wokflow.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_openai===0.2.51", + "composio_openai===0.2.57", "julep>=0.3.2" ], include_package_data=True, diff --git a/plugins/langchain/setup.py b/plugins/langchain/setup.py index 98734e2edf..a89c3b971b 100644 --- a/plugins/langchain/setup.py +++ b/plugins/langchain/setup.py @@ -9,7 +9,7 @@ setup( name="composio_langchain", - version="0.2.51", + version="0.2.57", author="Karan", author_email="karan@composio.dev", description="Use Composio to get an array of tools with your LangChain agent.", @@ -27,7 +27,7 @@ "langchain-openai>=0.0.2.post1", "pydantic>=2.6.4", "langchainhub>=0.1.15", - "composio_core===0.2.51", + "composio_core===0.2.57", ], include_package_data=True, ) diff --git a/plugins/lyzr/setup.py b/plugins/lyzr/setup.py index 739514ffd8..f22bebf7ae 100644 --- a/plugins/lyzr/setup.py +++ b/plugins/lyzr/setup.py @@ -9,7 +9,7 @@ setup( name="composio_lyzr", - version="0.2.51", + version="0.2.57", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Lyzr workflow.", @@ -25,7 +25,7 @@ install_requires=[ "lyzr-automata>=0.1.3", "pydantic>=2.6.4", - "composio_core===0.2.51", + "composio_core===0.2.57", "langchain>=0.1.0", ], include_package_data=True, diff --git a/plugins/openai/setup.py b/plugins/openai/setup.py index d0eba686ab..da6d9842e3 100644 --- a/plugins/openai/setup.py +++ b/plugins/openai/setup.py @@ -9,7 +9,7 @@ setup( name="composio_openai", - version="0.2.51", + version="0.2.57", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your OpenAI Function Call.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_core===0.2.51", + "composio_core===0.2.57", ], include_package_data=True, ) diff --git a/setup.py b/setup.py index 58bdc7de6e..116f5c9788 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name="composio_core", - version="0.2.51", + version="0.2.57", author="Utkarsh", author_email="utkarsh@composio.dev", description="Core package to act as a bridge between composio platform and other services.",