-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
Disabling Pydantic Error #757
Conversation
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 bfe086b in 44 seconds
More details
- Looked at
110
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. docs/concepts/reask_validation.md:240
- Draft comment:
The documentation states that the environment variable change is only valid for the duration of the script execution. However, setting an environment variable in this way will affect the entire process and potentially other scripts running in the same environment, which could lead to unexpected behavior in other parts of the application or in other applications running in the same environment. Consider implementing a more localized way to handle this configuration that does not have global side effects. - Reason this comment was not posted:
Confidence of 30% on close inspection, compared to threshold of 85%.
Workflow ID: wflow_kQ1iJyhKvSSnF4yc
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Deploying instructor with Cloudflare Pages
|
@ssonal I forked your previous branch and made the function opt-in Instead. Wasn't able to get the CI working for your branch for some reason. |
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! Incremental review on fde08d0 in 1 minute and 14 seconds
More details
- Looked at
18
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. tests/llm/test_openai/test_retries.py:12
- Draft comment:
The error message in theuppercase_validator
function is overly verbose. Consider simplifying it to enhance clarity. For example:
"Name must be in uppercase."
- Reason this comment was not posted:
Confidence of 30% on close inspection, compared to threshold of 85%.
Workflow ID: wflow_QUfBif5g0bdXN2Mf
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Summary:
Added a function to disable URLs in Pydantic error messages, updated documentation, and included tests.
Key points:
disable_pydantic_error_url
function ininstructor/utils.py
to disable URLs in Pydantic error messages by settingPYDANTIC_ERRORS_INCLUDE_URL
to0
.docs/concepts/reask_validation.md
with a section on optimizing token usage by disabling Pydantic error URLs.test_pylance_url_config
intests/test_function_calls.py
to verify the removal of URLs from Pydantic error messages.docs/concepts/reask_validation.md
to demonstrate the usage ofdisable_pydantic_error_url
.Generated with ❤️ by ellipsis.dev