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:
@@ -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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user