feat(api): add support for Gemini API format and enhance channel configuration

This commit is contained in:
HouYunFei
2026-06-17 10:24:55 +08:00
parent 6300f5fb26
commit 8cbe00e348
8 changed files with 347 additions and 17 deletions
+1
View File
@@ -53,6 +53,7 @@ function assertAudioConfig(config: AiConfig, 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");
if (config.apiFormat === "gemini") throw new Error("Gemini 调用格式暂不支持音频生成,请使用 OpenAI 格式渠道");
}
async function assertAudioBlob(blob: Blob) {