https://linen.dev logo
Facing issues with github toolkit
# 🖥│support-forum
d
I'm getting following error when calling tools.get method for github toolkit 'async' is not a valid parameter name Versions (Python SDK): "composio-client>=1.10.0", "composio>=0.8.19", "composio-langchain==0.8.0",
c
Hey, Can you share the minimal reproducible snippet? Preferably create an issue on GitHub: or share the same info here. Thank you.
d
Hey, I pinpointed the problem in the GitHub toolkit. It’s in the
GITHUB_CONVERT_AN_ORGANIZATION_MEMBER_TO_OUTSIDE_COLLABORATOR
tool. Inside its
tool.input_parameters
, there’s an object named
properties
which has a property called
async
. That’s where the issue starts, when the toolkit calls
_wrap_action
, it then calls
get_signature_format_from_schema_params
, which converts the schema arguments into Python
Parameter
objects. But since
async
is a reserved keyword in Python, it’s not a valid parameter name, and that causes the failure. In short:
tool.input_parameters.properties.async
→
_wrap_action
→
get_signature_format_from_schema_params
→ conversion to invalid parameter name (async). https://cdn.discordapp.com/attachments/1435125829939232820/1435239780102443252/image.png?ex=690b3eb5&is=6909ed35&hm=4a034f317878067f8015da39f61d4b6ce91e859f42b1c275507501efa01fd1c2&
Hope this make sense and helps to solve the issue
a
thanks for debugging the issue and sharing these details! Make sense, we'll fix this. We were unable to reproduce the issue, so could you please share more details it'll be helpful in testing post fix? If you could create an issue here: https://github.com/ComposioHQ/composio/issues/new?template=bug-report.yml it would be super helpful, or you can share the same info here. Thank you! 🙂
d
One thing I forgot to mention was
LangchainProvider
and I implemented custom
LangchainProvider
which resembles very much with library implementation. Hope this helps.
Copy code
python
class ComposioService:
    def __init__(self, api_key: str):
        self.composio = Composio(
            provider=LangchainProvider(),
            api_key=api_key,
            timeout=120
        )

    def get_tools(self, tool_kit: str):
        return self.composio.tools.get(user_id="", toolkits=[tool_kit], limit=100)

composio_service = ComposioService("composio_key")
tools = composio_service.get_tools(tool_kit="GITHUB")
a
any specific reason for using a custom provider instead of the standard one?
d
Ohh yes, I needed to access runnable_config of langchain into composio hooks, I couldn't find any other way to do that
Exception is generated from the
get_signature_format_from_schema_params
function defined in composio/utils/shared.py I am getting similar issues in diff tools like
MICROSOFTTEAMS
and
ZOOM
. teams uses parameter name starting with
$
in tool
MICROSOFT_TEAMS_LIST_USERS
and zoom uses a parameter named
from
in tool
ZOOM_LIST_ALL_RECORDINGS
. I think this parameters needs to be sanatized.
a
Ah got it, thanks for flagging! I was able to reproduce the issue w the Zoom & MS tools, we're fixing them rn.
d
Hi @abhishekpatil4, just following up to see if there’s been any progress on the issue. Appreciate your time and effort on this.
c
hey, not yet. We're still working on these. I'll update here once fixes are live.
d
Hey, any updates?
c
Hey Dhruv, really sorry for the delay here. The issue has been fixed