-
Notifications
You must be signed in to change notification settings - Fork 412
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: add endpoint to create responses for current user in bulk #4380
feat: add endpoint to create responses for current user in bulk #4380
Conversation
The URL of the deployed environment for this PR is https://argilla-quickstart-pr-4380-ki24f765kq-no.a.run.app |
@damianpumar notice that we made a change to this PR so now responses that need to be updated doesn't need to provide the response |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4380 +/- ##
============================================
- Coverage 90.13% 65.96% -24.18%
============================================
Files 233 330 +97
Lines 12493 19115 +6622
============================================
+ Hits 11261 12609 +1348
- Misses 1232 6506 +5274
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
This PR adds a new endpoint to create responses in bulk to support the new bulk annotation feature on Argilla.
The new endpoint is
POST /api/v1/me/responses/bulk
with the following implementations details:50
responses to be created or updated.Example of a body request with a response to update and a second response to update (but using an invalid question):
Note
For updating responses we don't need the
id
of the response, from the context of the request we have the currentuser_id
and therecord_id
is mandatory using this endpoint. These two attributes are the ones used to unambiguously know when to create or update a response.A response for the previous request with the first response successfully updated and an error trying to create the second response:
/cc @frascuchon @gabrielmbmb
there are someTODO
comments on the code to discuss possible improvements./cc @damianpumar
Closes #4367
Type of change
(Please delete options that are not relevant. Remember to title the PR according to the type of change)
How Has This Been Tested
Checklist