mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-10 05:30:02 +08:00
Merge pull request #5769 from ryanhex53/fix-model-multi@
Custom model names can include the `@` symbol by itself.
This commit is contained in:
@@ -120,6 +120,7 @@ import { createTTSPlayer } from "../utils/audio";
|
||||
import { MsEdgeTTS, OUTPUT_FORMAT } from "../utils/ms_edge_tts";
|
||||
|
||||
import { isEmpty } from "lodash-es";
|
||||
import { getModelProvider } from "../utils/model";
|
||||
|
||||
const localStorage = safeLocalStorage();
|
||||
|
||||
@@ -645,7 +646,7 @@ export function ChatActions(props: {
|
||||
onClose={() => setShowModelSelector(false)}
|
||||
onSelection={(s) => {
|
||||
if (s.length === 0) return;
|
||||
const [model, providerName] = s[0].split("@");
|
||||
const [model, providerName] = getModelProvider(s[0]);
|
||||
chatStore.updateCurrentSession((session) => {
|
||||
session.mask.modelConfig.model = model as ModelType;
|
||||
session.mask.modelConfig.providerName =
|
||||
|
Reference in New Issue
Block a user