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:
sijinhui
2024-04-10 23:23:17 +08:00
7 changed files with 50 additions and 6 deletions

View File

@@ -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
};
}
});