-
-
Notifications
You must be signed in to change notification settings - Fork 721
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
Revert "chore: Include types to instructor.patch" #437
Conversation
This reverts commit f0d7889.
@savarin the openai api call tests are all failing due to missing optionals. |
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.
Changes requested. Reviewed entire PR up to commit c5db786
Reviewed 429
lines of code across 3
files in 3 minute(s) and 13 second(s).
See details
- Skipped files: 0
- Confidence threshold:
85%
- Drafted
6
additional comments. - Workflow ID:
wflow_ayL8NT6raMkBpLS8
View 6 draft comments
These comments were drafted by Ellipsis, but were filtered out of the final review. They're included here so you can see our internal thought process and help you configure your ellipsis.yaml
.
Drafted 6 comments under confidence threshold
Filtered comment at instructor/patch.py:60
Confidence changes required: 66%
Commentary: The PR is reverting a previous change that included types to instructor.patch. The changes seem to be mostly about type annotations and refactoring. There are no obvious logical bugs or security issues. However, there are some potential issues with the type annotations and the removal of certain imports.
The return type of the function handle_response_model
has been changed from Tuple[Union[Type[OpenAISchema], ParallelBase], Dict[str, Any]]
to Union[Type[OpenAISchema], dict]
. This could potentially cause issues if the function is expected to return a tuple elsewhere in the codebase.
Filtered comment at instructor/patch.py:168
Confidence changes required: 66%
Commentary: The PR is reverting a previous change that included types to instructor.patch. The changes seem to be mostly about type annotations and refactoring. There are no obvious logical bugs or security issues. However, there are some potential issues with the type annotations and the removal of certain imports.
The return type of the function process_response
has been changed from Union[OpenAISchema, List[OpenAISchema]]
to Union[T_Model, T]
. This could potentially cause issues if the function is expected to return a specific type elsewhere in the codebase.
Filtered comment at instructor/patch.py:213
Confidence changes required: 66%
Commentary: The PR is reverting a previous change that included types to instructor.patch. The changes seem to be mostly about type annotations and refactoring. There are no obvious logical bugs or security issues. However, there are some potential issues with the type annotations and the removal of certain imports.
The return type of the function process_response_async
has been changed from Union[OpenAISchema, List[OpenAISchema], Dict[str, Any], Generator[Any, None, None]]
to T
. This could potentially cause issues if the function is expected to return a specific type elsewhere in the codebase.
Filtered comment at instructor/patch.py:225
Confidence changes required: 66%
Commentary: The PR is reverting a previous change that included types to instructor.patch. The changes seem to be mostly about type annotations and refactoring. There are no obvious logical bugs or security issues. However, there are some potential issues with the type annotations and the removal of certain imports.
The return type of the function retry_async
has been changed from Union[OpenAISchema, List[OpenAISchema], Dict[str, Any], Generator[Any, None, None]]
to T
. This could potentially cause issues if the function is expected to return a specific type elsewhere in the codebase.
Filtered comment at instructor/patch.py:327
Confidence changes required: 66%
Commentary: The PR is reverting a previous change that included types to instructor.patch. The changes seem to be mostly about type annotations and refactoring. There are no obvious logical bugs or security issues. However, there are some potential issues with the type annotations and the removal of certain imports.
The return type of the function retry_sync
has been changed from Union[OpenAISchema, List[OpenAISchema]]
to no return type. This could potentially cause issues if the function is expected to return a specific type elsewhere in the codebase.
Filtered comment at instructor/patch.py:444
Confidence changes required: 66%
Commentary: The PR is reverting a previous change that included types to instructor.patch. The changes seem to be mostly about type annotations and refactoring. There are no obvious logical bugs or security issues. However, there are some potential issues with the type annotations and the removal of certain imports.
The return type of the function patch
has been changed from Union[OpenAI, AsyncOpenAI, None]
to Union[OpenAI, AsyncOpenAI]
. This could potentially cause issues if the function is expected to return a specific type elsewhere in the codebase.
Something look wrong? You can customize Ellipsis by editing the ellipsis.yaml for this repository.
Generated with ❤️ by ellipsis.dev
@@ -37,6 +34,13 @@ | |||
from .function_calls import Mode, OpenAISchema, openai_schema |
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.
The type variable T
is defined twice in this file. Please remove the duplicate definition.
Got it, will take a look. |
Reverts #422
Summary:
This PR reverts a previous change that included types to
instructor.patch
, and updates type hints, imports, and related files for improved type safety and clarity.Key points:
instructor.patch
instructor/patch.py
.github/workflows/mypy.yml
andtests/test_patch.py
to reflect these changesGenerated with ❤️ by ellipsis.dev