1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 00:43:53 +00:00

image_caption (#6657)

* image_caption

* update

* update

* update

* update

* update

---------

Co-authored-by: zheng.shen <zheng.shen@seafile.com>
This commit is contained in:
shenzheng-1
2024-08-30 14:36:52 +08:00
committed by GitHub
parent 1e5b5565e8
commit d26c6d119c
10 changed files with 268 additions and 132 deletions

View File

@@ -194,10 +194,21 @@ class MetadataManagerAPI {
};
// ai
generateSummary = (repoID, filePaths) => {
const url = this.server + '/api/v2.1/repos/' + repoID + '/metadata/ai/summarize-documents/';
generateSummary = (repoID, filePath) => {
const url = this.server + '/api/v2.1/ai/generate-summary/';
const params = {
file_paths_list: filePaths,
path: filePath,
repo_id: repoID,
};
return this.req.post(url, params);
};
imageCaption = (repoID, filePath, lang) => {
const url = this.server + '/api/v2.1/ai/image-caption/';
const params = {
path: filePath,
repo_id: repoID,
lang: lang,
};
return this.req.post(url, params);
};