视频复刻积分规则优化
This commit is contained in:
@@ -78,6 +78,17 @@ export function pointsPerImageFromCatalog(config: ModelConfig | undefined): numb
|
||||
return Number.isFinite(unit) && unit > 0 ? unit : null;
|
||||
}
|
||||
|
||||
/** 文本/视觉次价:优先挂牌 points_per_call,否则 unit_price。 */
|
||||
export function pointsPerCallFromCatalog(config: ModelConfig | undefined): number | null {
|
||||
const pricing = (config?.metadata?.points_pricing || {}) as Record<string, unknown>;
|
||||
if (pricing.points_per_call != null) {
|
||||
const n = Number(pricing.points_per_call);
|
||||
return Number.isFinite(n) ? n : null;
|
||||
}
|
||||
const unit = Number(config?.unit_price);
|
||||
return Number.isFinite(unit) && unit > 0 ? unit : null;
|
||||
}
|
||||
|
||||
export const MODE_LABELS: Record<FreeMode, string> = { universal: "全能参考", keyframe: "首尾帧" };
|
||||
|
||||
// 上传素材限制(与后端 FreeVideoUploadView / jimeng inputBar 对齐)
|
||||
|
||||
Reference in New Issue
Block a user