-
Notifications
You must be signed in to change notification settings - Fork 51
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
Test implement sdk #2824
base: main
Are you sure you want to change the base?
Test implement sdk #2824
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2824 +/- ##
==========================================
- Coverage 86.80% 86.79% -0.02%
==========================================
Files 380 380
Lines 23872 23839 -33
==========================================
- Hits 20723 20690 -33
Misses 3149 3149
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
|
||
def ask_response_parser(response: httpx.Response) -> SyncAskResponse: | ||
def ask_response_parser(response_type: Type[BaseModel], response: httpx.Response) -> BaseModel: |
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.
why do you need to pass response_type
as a parameter here? isn't it always SyncAskResponse
?
I think the return type of this function should be SyncAskResponse
.
And also, for the async version, I think we shuld be iterating the response asynchronously no? (that wasnt implemented before either)
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.
I'm not changing the API SDK behavior on this PR, just fixing the typing. Can not be SyncAskResponse because the Generic is bound to BaseModel.
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.
Great improvement! finally this will fix the problems we had with typings.
Left a few comments
Description
Describe the proposed changes made in this PR.
How was this PR tested?
Describe how you tested this PR.