-
Notifications
You must be signed in to change notification settings - Fork 889
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: new implementation of timeout functionality for all toolkits #1595
Conversation
camel/toolkits/base.py
Outdated
def with_timeout(func): | ||
@functools.wraps(func) | ||
def wrapper(self, *args, **kwargs): | ||
timeout = getattr(self, "timeout", None) |
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.
Can we put timeout
as the input argument? Also can we move this into utils
so we can use this for other modules?
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.
Now the specification is that timeout
is an argument in toolkit initialization. Do you mean to have it in every member function of the toolkits class?
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.
update here: 0fc43f7
and will merge this PR, thanks @MuggleJinx for the contribution! Let me know if you have any further questions~
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.
Thanks @MuggleJinx. Left some comments
…1595) Co-authored-by: Wendong <[email protected]>
…1595) Co-authored-by: Wendong <[email protected]>
Description
New implementation of #1519 and #1507. Adding timeout function to all toolkits.
Checklist
Fixes #issue-number
in the PR description (required)pyproject.toml
andpoetry.lock
If you are unsure about any of these, don't hesitate to ask. We are here to help!