-
Notifications
You must be signed in to change notification settings - Fork 904
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(agents-api): Add some custom error messages to base_evaluate #758
Conversation
Hey @Ahmad-mtos, here is an example of how you can ask me to improve this pull request: @Sweep Add unit tests for the `EvaluateError` class that verify: 📖 For more information on how to use Sweep, please read our documentation. |
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.
👍 Looks good to me! Reviewed everything up to 5a25b84 in 11 seconds
More details
- Looked at
94
lines of code in2
files - Skipped
1
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. agents-api/agents_api/activities/task_steps/base_evaluate.py:17
- Draft comment:
Use f-strings for error message construction for consistency and clarity.
error_message = f"{error.message}" if hasattr(error, "message") else str(error)
- Reason this comment was not posted:
Confidence changes required:50%
The error message construction in EvaluateError should use f-strings for consistency and clarity.
2. agents-api/agents_api/activities/task_steps/base_evaluate.py:28
- Draft comment:
Consider lowering thefuzz.ratio
threshold from 90.0 to a lower value for better detection of misspelled variable names. - Reason this comment was not posted:
Confidence changes required:50%
Thefuzz.ratio
threshold of 90.0 might be too high for detecting misspelled variable names. A lower threshold could be more effective.
Workflow ID: wflow_3UDKIxxVzycbTP5s
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@Ahmad-mtos take a look at the failing github action:
This means that the linting process failed, can you please run |
I added some error messages in base_evaluate to help users identify some specific errors.
Important
Adds custom error messages to
base_evaluate
inbase_evaluate.py
for Jinja template misuse and variable name misspellings, usingthefuzz
for suggestions.EvaluateError
class inbase_evaluate.py
to provide custom error messages.thefuzz
to suggest correct variable names whenNameNotDefined
error occurs.thefuzz
topyproject.toml
for fuzzy string matching.This description was created by for 5a25b84. It will automatically update as commits are pushed.