mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 22:13:47 +08:00
Merge remote-tracking branch 'upstream/main' into dev
# Conflicts: # app/client/platforms/openai.ts # app/store/chat.ts
This commit is contained in:
@@ -109,7 +109,6 @@ function createEmptySession(): ChatSession {
|
||||
mask: createEmptyMask(),
|
||||
};
|
||||
}
|
||||
|
||||
// if it is using gpt-* models, force to use 4o-mini to summarize
|
||||
const ChatFetchTaskPool: Record<string, any> = {};
|
||||
|
||||
@@ -117,8 +116,8 @@ function getSummarizeModel(currentModel: string): {
|
||||
name: string;
|
||||
providerName: string | undefined;
|
||||
} {
|
||||
// if it is using gpt-* models, force to use 3.5 to summarize
|
||||
if (currentModel.startsWith("gpt")) {
|
||||
// if it is using gpt-* models, force to use 4o-mini to summarize
|
||||
if (currentModel.startsWith("gpt") || currentModel.startsWith("chatgpt")) {
|
||||
const configStore = useAppConfig.getState();
|
||||
const accessStore = useAccessStore.getState();
|
||||
const allModel = collectModelsWithDefaultModel(
|
||||
@@ -831,7 +830,8 @@ export const useChatStore = createPersistStore(
|
||||
// system prompts, to get close to OpenAI Web ChatGPT
|
||||
const shouldInjectSystemPrompts =
|
||||
modelConfig.enableInjectSystemPrompts &&
|
||||
session.mask.modelConfig.model.startsWith("gpt-");
|
||||
(session.mask.modelConfig.model.startsWith("gpt-") ||
|
||||
session.mask.modelConfig.model.startsWith("chatgpt-"));
|
||||
|
||||
var systemPrompts: ChatMessage[] = [];
|
||||
systemPrompts = shouldInjectSystemPrompts
|
||||
|
||||
@@ -199,7 +199,7 @@ export const usePluginStore = createPersistStore(
|
||||
|
||||
getAsTools(ids: string[]) {
|
||||
const plugins = get().plugins;
|
||||
const selected = ids
|
||||
const selected = (ids || [])
|
||||
.map((id) => plugins[id])
|
||||
.filter((i) => i)
|
||||
.map((p) => FunctionToolService.add(p));
|
||||
|
||||
Reference in New Issue
Block a user