mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-15 05:23:42 +08:00
feat: 修改插件模型版本限制
This commit is contained in:
@@ -511,7 +511,7 @@ export function ChatActions(props: {
|
||||
icon={<RobotIcon />}
|
||||
/>
|
||||
|
||||
{config.pluginConfig.enable && currentModel.endsWith("0613") && (
|
||||
{config.pluginConfig.enable && !/03\d{2}$/.test(currentModel) && (
|
||||
<ChatAction
|
||||
onClick={switchUsePlugins}
|
||||
text={
|
||||
@@ -536,8 +536,9 @@ export function ChatActions(props: {
|
||||
chatStore.updateCurrentSession((session) => {
|
||||
session.mask.modelConfig.model = s[0] as ModelType;
|
||||
session.mask.syncGlobalConfig = false;
|
||||
session.mask.usePlugins =
|
||||
session.mask.modelConfig.model.endsWith("0613");
|
||||
session.mask.usePlugins = !/03\d{2}$/.test(
|
||||
session.mask.modelConfig.model,
|
||||
);
|
||||
});
|
||||
showToast(s[0]);
|
||||
}}
|
||||
|
||||
@@ -577,7 +577,7 @@ export const useChatStore = create<ChatStore>()(
|
||||
api.llm.chat({
|
||||
messages: topicMessages,
|
||||
config: {
|
||||
model: "gpt-3.5-turbo-0613",
|
||||
model: "gpt-3.5-turbo",
|
||||
},
|
||||
onFinish(message) {
|
||||
get().updateCurrentSession(
|
||||
|
||||
@@ -39,7 +39,7 @@ export const DEFAULT_CONFIG = {
|
||||
models: DEFAULT_MODELS as any as LLMModel[],
|
||||
|
||||
modelConfig: {
|
||||
model: "gpt-3.5-turbo-0613" as ModelType,
|
||||
model: "gpt-3.5-turbo" as ModelType,
|
||||
temperature: 0.5,
|
||||
top_p: 1,
|
||||
max_tokens: 2000,
|
||||
|
||||
@@ -47,7 +47,7 @@ export const createEmptyMask = () =>
|
||||
lang: getLang(),
|
||||
builtin: false,
|
||||
createdAt: Date.now(),
|
||||
usePlugins: useAppConfig.getState().modelConfig.model.endsWith("0613"),
|
||||
usePlugins: !/03\d{2}$/.test(useAppConfig.getState().modelConfig.model),
|
||||
} as Mask);
|
||||
|
||||
export const useMaskStore = create<MaskStore>()(
|
||||
|
||||
Reference in New Issue
Block a user