Skip to content

Commit

Permalink
Fix oauth and new release bump
Browse files Browse the repository at this point in the history
  • Loading branch information
kaavee315 committed Jul 19, 2024
1 parent 146cdee commit 5971825
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 37 deletions.
27 changes: 15 additions & 12 deletions python/composio/cli/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,8 @@ def add_integration(

auth_schemes = app.auth_schemes or []
if len(auth_schemes) == 0:
return _handle_no_auth(
entity=entity,
client=context.client,
app_name=name,
no_browser=no_browser,
integration=integration,
)
context.console.print(f"{app.name} does not need authentication")
return None

auth_modes = {auth_scheme.auth_mode: auth_scheme for auth_scheme in auth_schemes}
if auth_mode is not None and auth_mode not in auth_modes:
Expand All @@ -230,13 +225,21 @@ def add_integration(
)
auth_scheme = auth_modes[auth_mode]

return _handle_basic_auth(
if auth_mode.lower() in ("basic", "api_key"):
return _handle_basic_auth(
entity=entity,
client=context.client,
app_name=name,
auth_mode=auth_mode,
auth_scheme=auth_scheme,
scopes=scopes,
)
return _handle_oauth(
entity=entity,
client=context.client,
app_name=name,
auth_mode=auth_mode,
auth_scheme=auth_scheme,
scopes=scopes,
no_browser=no_browser,
integration=integration,
)


Expand All @@ -255,7 +258,7 @@ def _get_auth_config(
}


def _handle_no_auth(
def _handle_oauth(
entity: Entity,
client: Composio,
app_name: str,
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/autogen/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_autogen",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Autogen agent.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.3.24", "pyautogen>=0.2.19"],
install_requires=["composio_core==0.3.25", "pyautogen>=0.2.19"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/camel/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_camel",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Claude LLMs.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.3.24", "camel-ai>=0.1.5.4"],
install_requires=["composio_core==0.3.25", "camel-ai>=0.1.5.4"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/claude/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_claude",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Claude LLMs.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_openai==0.3.24", "anthropic>=0.25.7"],
install_requires=["composio_openai==0.3.25", "anthropic>=0.25.7"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/crew_ai/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_crewai",
version="0.3.24",
version="0.3.25",
author="Himanshu",
author_email="[email protected]",
description="Use Composio to get an array of tools with your CrewAI agent.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_langchain==0.3.24"],
install_requires=["composio_langchain==0.3.25"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/griptape/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_griptape",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Griptape wokflow.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.3.24", "griptape>=0.24.2"],
install_requires=["composio_core==0.3.25", "griptape>=0.24.2"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/julep/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_julep",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Julep wokflow.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_openai==0.3.24", "julep>=0.3.2"],
install_requires=["composio_openai==0.3.25", "julep>=0.3.2"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/langchain/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_langchain",
version="0.3.24",
version="0.3.25",
author="Karan",
author_email="[email protected]",
description="Use Composio to get an array of tools with your LangChain agent.",
Expand All @@ -27,7 +27,7 @@
"langchain-openai>=0.0.2.post1",
"pydantic>=2.6.4",
"langchainhub>=0.1.15",
"composio_core==0.3.24",
"composio_core==0.3.25",
],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/langgraph/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_langgraph",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get array of tools with LnagGraph Agent Workflows",
Expand All @@ -24,7 +24,7 @@
python_requires=">=3.9,<4",
install_requires=[
"langchain_core>=0.2.17",
"composio_langchain==0.3.24",
"composio_langchain==0.3.25",
],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/llamaindex/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_llamaindex",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your LlamaIndex agent.",
Expand All @@ -24,7 +24,7 @@
python_requires=">=3.9,<4",
install_requires=[
"llama_index>=0.10.43",
"composio_langchain==0.3.24",
"composio_langchain==0.3.25",
],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/lyzr/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_lyzr",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Lyzr workflow.",
Expand All @@ -25,7 +25,7 @@
install_requires=[
"lyzr-automata>=0.1.3",
"pydantic>=2.6.4",
"composio_core==0.3.24",
"composio_core==0.3.25",
"langchain>=0.1.0",
],
include_package_data=True,
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/openai/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_openai",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your OpenAI Function Call.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.3.24"],
install_requires=["composio_core==0.3.25"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/praisonai/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_praisonai",
version="0.3.24",
version="0.3.25",
author="Sawradip",
author_email="[email protected]",
description="Use Composio Tools to enhance your PraisonAI agents capabilities.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9",
install_requires=["composio_core==0.3.24", "PraisonAI>=0.0.2"],
install_requires=["composio_core==0.3.25", "PraisonAI>=0.0.2"],
include_package_data=True,
)
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def scan_for_package_data(

setup(
name="composio_core",
version="0.3.24",
version="0.3.25",
author="Utkarsh",
author_email="[email protected]",
description="Core package to act as a bridge between composio platform and other services.",
Expand Down

0 comments on commit 5971825

Please sign in to comment.