Merge branch 'develop' of https://github.com/HBAI-Ltd/Toonflow-app into develop
This commit is contained in:
commit
7113e2c2eb
15
data/vendor/volcengine.ts
vendored
15
data/vendor/volcengine.ts
vendored
@ -133,11 +133,10 @@ declare const exports: {
|
||||
|
||||
const vendor: VendorConfig = {
|
||||
id: "volcengine",
|
||||
version: "2.2",
|
||||
version: "2.3",
|
||||
author: "leeqi",
|
||||
name: "火山引擎(豆包)",
|
||||
description:
|
||||
"火山引擎豆包大模型,支持文本、图片生成、视频生成等能力。\n\n需要在[火山引擎控制台](https://console.volcengine.com/ark)获取API密钥。",
|
||||
description: "火山引擎豆包大模型,支持文本、图片生成、视频生成等能力。\n\n需要在[火山引擎控制台](https://console.volcengine.com/ark)获取API密钥。",
|
||||
icon: "",
|
||||
inputs: [
|
||||
{ key: "apiKey", label: "API密钥", type: "password", required: true, placeholder: "火山引擎API Key" },
|
||||
@ -455,10 +454,8 @@ const videoRequest = async (config: VideoConfig, model: VideoModel): Promise<str
|
||||
content.push({ type: "text", text: config.prompt });
|
||||
}
|
||||
|
||||
const activeMode = config.mode && config.mode.length > 0 ? config.mode[0] : "text";
|
||||
|
||||
if (typeof activeMode === "string") {
|
||||
switch (activeMode) {
|
||||
if (typeof config.mode === "string") {
|
||||
switch (config.mode) {
|
||||
case "singleImage": {
|
||||
const firstImage = config.referenceList?.find((r) => r.type === "image");
|
||||
if (firstImage) {
|
||||
@ -526,13 +523,13 @@ const videoRequest = async (config: VideoConfig, model: VideoModel): Promise<str
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (Array.isArray(activeMode)) {
|
||||
} else if (Array.isArray(config.mode)) {
|
||||
// 多模态参考模式:按类型分别提取并添加
|
||||
const imageRefs = config.referenceList?.filter((r) => r.type === "image") ?? [];
|
||||
const videoRefs = config.referenceList?.filter((r) => r.type === "video") ?? [];
|
||||
const audioRefs = config.referenceList?.filter((r) => r.type === "audio") ?? [];
|
||||
|
||||
for (const refDef of activeMode) {
|
||||
for (const refDef of config.mode) {
|
||||
if (typeof refDef === "string") {
|
||||
if (refDef.startsWith("imageReference:")) {
|
||||
const maxCount = parseInt(refDef.split(":")[1], 10);
|
||||
|
||||
@ -136,7 +136,7 @@ export default async (knex: Knex): Promise<void> => {
|
||||
await dropColumn("o_vendorConfig", "createTime");
|
||||
|
||||
const volcengineVer = await u.vendor.getVendor("volcengine").version;
|
||||
if (Number(volcengineVer) < 2.2) {
|
||||
if (Number(volcengineVer) < 2.3) {
|
||||
u.vendor.writeCode("volcengine", vendorData["volcengine.ts"]);
|
||||
}
|
||||
const minimaxVer = await u.vendor.getVendor("minimax").version;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user