-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
bugSomething isn't workingSomething isn't workingfeature:corequestionQuestion about using the SDKQuestion about using the SDK
Description
In the Agent Class, the name: str
property is required — that's fine.
The property handoff_description: str | None = None
is optional because it accepts both str and None types — this is also fine.
But But But...
def as_tool(
self,
tool_name: str | None,
tool_description: str | None,
custom_output_extractor: Callable[[RunResult], Awaitable[str]] | None = None,
) -> Tool:
This is a method of the Agent class. Bothtool_name
and tool_description
are annotated as str | None.
So why does it raise this error?
TypeError: Agent.as_tool() missing 2 required positional arguments: 'tool_name' and 'tool_description'
My mind is getting disturbed because of this issue.
Please help me fix it.
Thank You
Best Regard
SubhanKaladi
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfeature:corequestionQuestion about using the SDKQuestion about using the SDK