mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-20 04:30:17 +09:00
hotfix: bytedance custom models
This commit is contained in:
parent
476bdac717
commit
46d3e7884b
@ -71,10 +71,14 @@ export function collectModelTable(
|
|||||||
}
|
}
|
||||||
// 2. if model not exists, create new model with available value
|
// 2. if model not exists, create new model with available value
|
||||||
if (count === 0) {
|
if (count === 0) {
|
||||||
const [customModelName, customProviderName] = name.split("@");
|
let [customModelName, customProviderName] = name.split("@");
|
||||||
const provider = customProvider(
|
const provider = customProvider(
|
||||||
customProviderName || customModelName,
|
customProviderName || customModelName,
|
||||||
);
|
);
|
||||||
|
// swap name and displayName for bytedance
|
||||||
|
if (displayName && provider.providerName == "ByteDance") {
|
||||||
|
[customModelName, displayName] = [displayName, customModelName];
|
||||||
|
}
|
||||||
modelTable[`${customModelName}@${provider?.id}`] = {
|
modelTable[`${customModelName}@${provider?.id}`] = {
|
||||||
name: customModelName,
|
name: customModelName,
|
||||||
displayName: displayName || customModelName,
|
displayName: displayName || customModelName,
|
||||||
|
Loading…
Reference in New Issue
Block a user