fix(api): 视频请求协议 - 修复发布构建类型错误
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
- 运维后台和用户自定义渠道支持为每个模型独立选择请求协议,并明确展示创建路径、Content-Type、轮询和素材要求。
|
||||
- 修复 ArtBox Artdance 视频错误使用 multipart `/v1/videos` 的问题,NewAPI Video Generations 改用 JSON `/v1/video/generations` 并支持图片、视频、音频 OSS 签名地址;补充 xAI 与 Gemini Veo 长任务协议。
|
||||
- 请求明细记录实际 Content-Type,便于区分 JSON 与 multipart 请求报文。
|
||||
- 修复视频协议响应类型过宽导致的前端发布构建失败。
|
||||
|
||||
## v1.0.12
|
||||
|
||||
|
||||
@@ -230,8 +230,8 @@ function findGeminiVideoURL(value: unknown): string {
|
||||
return "";
|
||||
}
|
||||
|
||||
function unwrapEnvelopeRecord(value: ApiEnvelope<Record<string, unknown>>) {
|
||||
if (value && typeof value === "object" && "data" in value && value.data && typeof value.data === "object") return value.data;
|
||||
function unwrapEnvelopeRecord(value: ApiEnvelope<Record<string, unknown>>): Record<string, unknown> {
|
||||
if (value && typeof value === "object" && "data" in value && value.data && typeof value.data === "object") return value.data as Record<string, unknown>;
|
||||
return value as Record<string, unknown>;
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ function seedanceErrorMessage(state: SeedanceTask) {
|
||||
return state.error?.message || state.error_code || "";
|
||||
}
|
||||
|
||||
function assertVideoConfig(config: AiConfig, model: string) {
|
||||
function assertVideoConfig(config: ResolvedAiConfig, model: string) {
|
||||
if (!model) throw new Error("请先配置视频模型");
|
||||
if (!config.baseUrl.trim()) throw new Error("请先配置 Base URL");
|
||||
if (!config.apiKey.trim()) throw new Error("请先配置 API Key");
|
||||
|
||||
Reference in New Issue
Block a user