You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SDK] add tool decorator helper for custom client tools (#127)
# What does this PR do?
- Add decorator for on callables for defining client side custom tools
- Addresses: llamastack/llama-stack#948
## Test Plan
Usage:
```python
@client_tool
def add(x: int, y: int) -> int:
'''Add 2 integer numbers
:param x: integer 1
:param y: integer 2
:returns: sum of x + y
'''
return x + y
```
`add` will be a ClientTool that can be passed
- Working example in:
llamastack/llama-stack-apps#166
## Sources
Please link relevant resources if necessary.
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
0 commit comments