-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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(improve-api-endpoints): Added Datasets and Annotation APIs #12237
base: main
Are you sure you want to change the base?
Conversation
- Added AnnotationReplyActionApi, AnnotationListApi, AnnotationUpdateDeleteApi - Added GET and PATCH endpoints to DatasetApi - Applied current_user in validate_app_token just like what it is done in validate_dataset_token Related to: langgenius#11727
This API endpoint shares the same API token with Dataset API. It is essential for patching the knowledge base in terms of embedding model. Related to: langgenius#11727
Related to: PR#12237(langgenius/dify#12237)
Because app token is assigned to a specific app, the validate_app_token decorator has already validated the app_id. The returned app_model is the app targeted. Therefore there is no need to pass app_id separately. Simply use app_model.id instead. So app_id is removed from the api routes. Related to: langgenius#11727
Please fix the errors in CI. |
Errors fixed. |
Please run |
Sorry for the trouble. Code has now been reformated. |
The code part LGTM, however you should add according docs to the API Access as well in CN, EN & JA. |
The relevant docs have been added and amended outdated part. I have included both Chinese and English versions. However as I do not speak Japanese, I wouldn't be able to verify the translated version therefore I would wait for a Japanese contributor get it translated in a later time. |
Close #11727
Summary
Basically copied the functions from console to the service api. Also added clear_partial_member_list() to Dataset Delete endpoint as what has been added in the console api.
I will keep working on this feature until it fulfills my needs. More endpoints will be added.
Checklist
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods