mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-20 15:23:39 +08:00
review code
This commit is contained in:
@@ -24,13 +24,11 @@ export function collectModelTable(
|
||||
|
||||
// default models
|
||||
models.forEach((m) => {
|
||||
// supoort name=displayName eg:completions_pro=ernie-4.0-8k
|
||||
const [name, displayName] = m.name?.split("=");
|
||||
// using <modelName>@<providerId> as fullName
|
||||
modelTable[`${name}@${m?.provider?.id}`] = {
|
||||
modelTable[`${m.name}@${m?.provider?.id}`] = {
|
||||
...m,
|
||||
name,
|
||||
displayName: displayName || name, // 'provider' is copied over if it exists
|
||||
displayName: m.name, // 'provider' is copied over if it exists
|
||||
};
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user