-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
Iterable Workaround #737
Iterable Workaround #737
Conversation
import typing | ||
|
||
|
||
class SimpleTypeTests(unittest.TestCase): |
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.
don't use unitests
@@ -31,14 +31,27 @@ def __class_getitem__(cls, response_model: type[BaseModel]) -> type[BaseModel]: | |||
) | |||
|
|||
|
|||
def validateIsSubClass(response_model: type): |
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.
snake case
@@ -54,6 +54,7 @@ def ask_ai(content, model, client) -> DocumentExtraction: | |||
"content": content, | |||
}, | |||
], | |||
max_retries=4, |
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.
doubt 4 is the answer...
Co-authored-by: Jason Liu <jxnl@users.noreply.github.com>
This helps solve issue #668 which highlighted an issue with how we're handling Iterables in Python 3.9. There's a bunch of new tests and a new wrapper function which checks the system python version before running the iterable check.