diff --git a/frontend/repositories/tasks/text-classification/api.ts b/frontend/repositories/tasks/text-classification/api.ts index 26256cb5..8cf7df8a 100644 --- a/frontend/repositories/tasks/text-classification/api.ts +++ b/frontend/repositories/tasks/text-classification/api.ts @@ -30,4 +30,9 @@ export class FromApiTextClassificationRepository implements TextClassificationRe const url = `/projects/${projectId}/docs/${docId}/annotations` await this.request.delete(url) } + + public async autoLabel(projectId: string, docId: number): Promise { + const url = `/projects/${projectId}/docs/${docId}/auto-labeling` + await this.request.post(url, {}) + } } diff --git a/frontend/repositories/tasks/text-classification/interface.ts b/frontend/repositories/tasks/text-classification/interface.ts index b93cd62b..e5ba069f 100644 --- a/frontend/repositories/tasks/text-classification/interface.ts +++ b/frontend/repositories/tasks/text-classification/interface.ts @@ -8,4 +8,6 @@ export interface TextClassificationRepository { delete(projectId: string, docId: number, annotationId: number): Promise clear(projectId: string, docId: number): Promise + + autoLabel(projectId: string, docId: number): Promise }