Files
localMiniDrama/frontweb/src/api/ai.js
T
2026-06-30 15:07:31 +08:00

37 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import request from '@/utils/request'
export const aiAPI = {
list(serviceType) {
return request.get('/ai-configs', { params: serviceType ? { service_type: serviceType } : {} })
},
get(id) {
return request.get(`/ai-configs/${id}`)
},
create(body) {
return request.post('/ai-configs', body)
},
update(id, body) {
return request.put(`/ai-configs/${id}`, body)
},
delete(id) {
return request.delete(`/ai-configs/${id}`)
},
testConnection(body) {
return request.post('/ai-configs/test', body)
},
/** 即梦2角色认证:GET /api/business/v1/assetsbody: base_url, api_key, limit?, cursor? */
listJimeng2MaterialAssets(body) {
return request.post('/ai-configs/jimeng2-list-assets', body)
},
/** ModelArk 私有资产库:action + payload,见 AI 配置页 SD2 资产管理 */
modelArkAsset(body) {
return request.post('/ai-configs/model-ark-asset', body)
},
getVendorLock() {
return request.get('/ai-configs/vendor-lock')
},
bulkUpdateKey(apiKey) {
return request.put('/ai-configs/bulk-update-key', { api_key: apiKey })
}
}