Conversation
…ding When a @tool decorated method calls another @tool method internally (e.g., BrowserToolSet.goto() calls self.browser_navigate()), the Tool object was not properly bound to the instance, causing 'missing self argument' TypeError. This fix implements Python's descriptor protocol by adding __get__ method to the Tool class, which automatically returns a bound Tool when accessed via instance attribute. Affected alias methods now work correctly: - CodeInterpreterToolSet: execute_code, list_directory - BrowserToolSet: goto, click, fill, html_content, evaluate Also adds comprehensive unit tests for the descriptor protocol. Change-Id: Id06c4781d6bf57f83f06e6786d2fa2b6ae345876 Co-developed-by: Cursor <noreply@cursor.com>
Updated HTTPError exception handling to include status code 409 for resource already exists scenarios. Improved example code with better resource filtering and added execution role ARN configuration for model proxy operations. The changes enhance error handling robustness and provide more reliable resource management in example implementations. 更新了 HTTPError 异常处理以包含状态码 409 来处理资源已存在的情况。 改进了示例代码中的资源过滤功能,并为模型代理操作添加了执行角色 ARN 配置。 这些更改增强了错误处理的健壮性,并在示例实现中提供了更可靠的 资源管理。 Change-Id: I5245d48ababac407f46b59c13bbea0237f071139 Signed-off-by: OhYee <oyohyee@oyohyee.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix bugs
Bug detail
Pull request tasks
Update docs
Reason for update
Pull request tasks
Add contributor
Contributed content
Content detail
Others
Reason for update