-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add runcontext + retryable + emitter to tool #429
Conversation
Signed-off-by: va <va@us.ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that you switch to async
which is good, but shouldn't we also change the signature of _run
method to be async?
python/beeai_framework/tools/tool.py
Outdated
def __init__(self, options: dict[str, Any] | None = None) -> None: | ||
super().__init__(options) | ||
# replace any non-alphanumeric char with _ | ||
formatted_name = re.sub(r"\W+", "_", self.name).lower() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that you were already using this helper somewhere, please create a utility function in utils/strings.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: va <va@us.ibm.com>
Signed-off-by: va <va@us.ibm.com>
Signed-off-by: va <va@us.ibm.com>
Signed-off-by: va <va@us.ibm.com>
Which issue(s) does this pull-request address?
Contributes-to: #362
Description
this PR adds the
RunContext
,Retryable
andEmitter
calls to Tool. Tool related examples were updated accordinglyChecklist
poe lint
poe format
poe test --type unit
poe test --type e2e