feat: 开发采集、采集箱和商品编辑功能

This commit is contained in:
Joey
2026-08-15 22:17:26 +08:00
parent c61d1a3154
commit 36357843d0
130 changed files with 18005 additions and 12 deletions
+36
View File
@@ -0,0 +1,36 @@
import { api } from './api';
export interface AiModelOption {
id: string;
label: string;
}
export interface ModelsResponse {
default: string;
models: AiModelOption[];
}
export interface CopyRequest {
source_text: string;
model_code?: string;
model?: string;
}
export interface CopyResponse {
titles_ru: string[];
titles_zh: string[];
description_ru: string;
description_zh: string;
tags_ru: string[];
tags_zh: string[];
model: string;
usage: { prompt_tokens: number; completion_tokens: number };
}
export function getAiModels() {
return api.get<ModelsResponse>('/ai/models');
}
export function generateCopy(payload: CopyRequest) {
return api.post<CopyResponse>('/ai/copy', payload);
}