mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-21 16:26:49 +08:00
Merge remote-tracking branch 'upstream/main' into dev
# Conflicts: # app/constant.ts # app/store/chat.ts # app/utils/model.ts
This commit is contained in:
@@ -23,6 +23,12 @@ export function collectModelTable(
|
||||
};
|
||||
});
|
||||
|
||||
const customProvider = (modelName: string) => ({
|
||||
id: modelName,
|
||||
providerName: "",
|
||||
providerType: "custom",
|
||||
});
|
||||
|
||||
// server custom models
|
||||
customModels
|
||||
.split(",")
|
||||
@@ -44,7 +50,7 @@ export function collectModelTable(
|
||||
displayName: displayName || name,
|
||||
available,
|
||||
describe: "",
|
||||
provider: modelTable[name]?.provider, // Use optional chaining
|
||||
provider: modelTable[name]?.provider ?? customProvider(name), // Use optional chaining
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user