mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 19:26:54 +08:00
fix: #2303 should select custom models
This commit is contained in:
@@ -414,8 +414,12 @@ export function ChatActions(props: {
|
||||
// switch model
|
||||
const currentModel = chatStore.currentSession().mask.modelConfig.model;
|
||||
const models = useMemo(
|
||||
() => config.models.filter((m) => m.available).map((m) => m.name),
|
||||
[config.models],
|
||||
() =>
|
||||
config
|
||||
.allModels()
|
||||
.filter((m) => m.available)
|
||||
.map((m) => m.name),
|
||||
[config],
|
||||
);
|
||||
const [showModelSelector, setShowModelSelector] = useState(false);
|
||||
|
||||
|
@@ -9,10 +9,6 @@ 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 (
|
||||
<>
|
||||
@@ -28,7 +24,7 @@ export function ModelConfigList(props: {
|
||||
);
|
||||
}}
|
||||
>
|
||||
{models.map((v, i) => (
|
||||
{config.allModels().map((v, i) => (
|
||||
<option value={v.name} key={i} disabled={!v.available}>
|
||||
{v.name}
|
||||
</option>
|
||||
|
Reference in New Issue
Block a user