fix(python): harden zeroclaw-tools CLI and integration ergonomics
This commit is contained in:
parent
e5ef8a3b62
commit
f01d38be35
10 changed files with 110 additions and 27 deletions
|
|
@ -38,9 +38,13 @@ def tool(
|
|||
```
|
||||
"""
|
||||
if func is not None:
|
||||
return langchain_tool(func)
|
||||
if name is not None:
|
||||
return langchain_tool(name, func, description=description)
|
||||
return langchain_tool(func, description=description)
|
||||
|
||||
def decorator(f: Callable) -> Any:
|
||||
return langchain_tool(f, name=name)
|
||||
if name is not None:
|
||||
return langchain_tool(name, f, description=description)
|
||||
return langchain_tool(f, description=description)
|
||||
|
||||
return decorator
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue