feat: add smartMatchAssets API for Q5 smart match simplify
This commit is contained in:
@@ -49,6 +49,19 @@ export const getAssetsByKind = async (
|
||||
return response.data.items || []
|
||||
}
|
||||
|
||||
/**
|
||||
* 智能匹配素材(后端 AI 选素材)
|
||||
* 调用后端 smart-match 端点,由后端根据素材库内容智能选择素材
|
||||
*/
|
||||
export const smartMatchAssets = async (
|
||||
libraryId: string,
|
||||
): Promise<{ items: AssetItem[] }> => {
|
||||
const response = await apiClient.post("/assets/smart-match", {
|
||||
library_id: libraryId,
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
/** 创建素材(上传文件后调用,附带 metadata) */
|
||||
export const createAsset = async (data: {
|
||||
library_id: string
|
||||
@@ -85,3 +98,4 @@ export const updateAssetReviewStatus = async (
|
||||
export const deleteAsset = async (assetId: string): Promise<void> => {
|
||||
await apiClient.delete(`/assets/${assetId}`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user