mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-09 01:53:15 +08:00
feat: close #2303 add custom model name config
This commit is contained in:
@@ -9,6 +9,10 @@ export function ModelConfigList(props: {
|
||||
updateConfig: (updater: (config: ModelConfig) => void) => void;
|
||||
}) {
|
||||
const config = useAppConfig();
|
||||
const customModels = config.customModels
|
||||
.split(",")
|
||||
.map((m) => ({ name: m, available: true }));
|
||||
const models = config.models.concat(customModels);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -24,8 +28,8 @@ export function ModelConfigList(props: {
|
||||
);
|
||||
}}
|
||||
>
|
||||
{config.models.map((v) => (
|
||||
<option value={v.name} key={v.name} disabled={!v.available}>
|
||||
{models.map((v, i) => (
|
||||
<option value={v.name} key={i} disabled={!v.available}>
|
||||
{v.name}
|
||||
</option>
|
||||
))}
|
||||
|
Reference in New Issue
Block a user