diff --git a/app/components/model-config.tsx b/app/components/model-config.tsx index 9603eea0..76866129 100644 --- a/app/components/model-config.tsx +++ b/app/components/model-config.tsx @@ -130,6 +130,22 @@ export function ModelConfigList(props: { > + + + props.updateConfig( + (config) => + (config.enableInjectSystemPrompts = e.currentTarget.checked), + ) + } + > + + `Verze: ${x}`, IsLatest: "Aktuální verze", diff --git a/app/locales/de.ts b/app/locales/de.ts index d7e88cc8..e8d4dc9c 100644 --- a/app/locales/de.ts +++ b/app/locales/de.ts @@ -71,6 +71,11 @@ const de: PartialLocaleType = { Title: "Schriftgröße", SubTitle: "Schriftgröße des Chat-Inhalts anpassen", }, + InjectSystemPrompts: { + Title: "System-Prompts einfügen", + SubTitle: + "Erzwingt das Hinzufügen eines simulierten systemweiten Prompts von ChatGPT am Anfang der Nachrichtenliste bei jeder Anfrage", + }, Update: { Version: (x: string) => `Version: ${x}`, IsLatest: "Neueste Version", diff --git a/app/locales/en.ts b/app/locales/en.ts index f5d90fd2..de10ee31 100644 --- a/app/locales/en.ts +++ b/app/locales/en.ts @@ -141,7 +141,11 @@ const en: LocaleType = { Title: "Font Size", SubTitle: "Adjust font size of chat content", }, - + InjectSystemPrompts: { + Title: "Inject System Prompts", + SubTitle: + "Forcefully add a simulated ChatGPT system prompt at the beginning of the message list for every request", + }, InputTemplate: { Title: "Input Template", SubTitle: "Newest message will be filled to this template", diff --git a/app/locales/es.ts b/app/locales/es.ts index 0971f05c..5f5ffc75 100644 --- a/app/locales/es.ts +++ b/app/locales/es.ts @@ -71,6 +71,11 @@ const es: PartialLocaleType = { Title: "Tamaño de fuente", SubTitle: "Ajustar el tamaño de fuente del contenido del chat", }, + InjectSystemPrompts: { + Title: "Inyectar Prompts del Sistema", + SubTitle: + "Agregar forzosamente un prompt de sistema simulado de ChatGPT al comienzo de la lista de mensajes en cada solicitud", + }, Update: { Version: (x: string) => `Versión: ${x}`, IsLatest: "Última versión", diff --git a/app/locales/fr.ts b/app/locales/fr.ts index 700ee0ea..f4cd1490 100644 --- a/app/locales/fr.ts +++ b/app/locales/fr.ts @@ -111,6 +111,11 @@ const fr: PartialLocaleType = { Title: "Taille des polices", SubTitle: "Ajuste la taille de police du contenu de la conversation", }, + InjectSystemPrompts: { + Title: "Injecter des invites système", + SubTitle: + "Ajoute de force une invite système simulée de ChatGPT au début de la liste des messages pour chaque demande", + }, InputTemplate: { Title: "Template", SubTitle: "Le message le plus récent sera ajouté à ce template.", diff --git a/app/locales/it.ts b/app/locales/it.ts index acd3a7e9..4b74ff3f 100644 --- a/app/locales/it.ts +++ b/app/locales/it.ts @@ -71,6 +71,11 @@ const it: PartialLocaleType = { Title: "Dimensione carattere", SubTitle: "Regolare la dimensione dei caratteri del contenuto della chat", }, + InjectSystemPrompts: { + Title: "Inserisci Prompts di Sistema", + SubTitle: + "Aggiungi forzatamente un prompt di sistema simulato di ChatGPT all'inizio della lista dei messaggi per ogni richiesta", + }, Update: { Version: (x: string) => `Versione: ${x}`, IsLatest: "Ultima versione", diff --git a/app/locales/jp.ts b/app/locales/jp.ts index 090a428f..e27a4c6d 100644 --- a/app/locales/jp.ts +++ b/app/locales/jp.ts @@ -84,6 +84,11 @@ const jp: PartialLocaleType = { Title: "フォントサイズ", SubTitle: "チャット内容のフォントサイズ", }, + InjectSystemPrompts: { + Title: "システムプロンプトの挿入", + SubTitle: + "各リクエストのメッセージリストの先頭に、ChatGPTのシステムプロンプトを強制的に追加します", + }, InputTemplate: { Title: "入力の前処理", SubTitle: "新規入力がこのテンプレートに埋め込まれます", diff --git a/app/locales/ko.ts b/app/locales/ko.ts index 6f5ec7a9..ac5ee5df 100644 --- a/app/locales/ko.ts +++ b/app/locales/ko.ts @@ -71,6 +71,11 @@ const ko: PartialLocaleType = { Title: "글꼴 크기", SubTitle: "채팅 내용의 글꼴 크기 조정", }, + InjectSystemPrompts: { + Title: "시스템 프롬프트 주입", + SubTitle: + "각 요청의 메시지 목록의 시작에 ChatGPT 시스템 프롬프트를 강제로 추가합니다", + }, Update: { Version: (x: string) => `버전: ${x}`, IsLatest: "최신 버전", diff --git a/app/locales/no.ts b/app/locales/no.ts index b296bd5c..e4b83496 100644 --- a/app/locales/no.ts +++ b/app/locales/no.ts @@ -65,6 +65,11 @@ const no: PartialLocaleType = { Title: "Fontstørrelsen", SubTitle: "Juster fontstørrelsen for samtaleinnholdet.", }, + InjectSystemPrompts: { + Title: "Sett inn systemprompter", + SubTitle: + "Tving tillegg av en simulert ChatGPT-systemprompt i begynnelsen av meldingslisten for hver forespørsel", + }, Update: { Version: (x: string) => `Versjon: ${x}`, IsLatest: "Siste versjon", diff --git a/app/locales/ru.ts b/app/locales/ru.ts index 06c94585..76be21a3 100644 --- a/app/locales/ru.ts +++ b/app/locales/ru.ts @@ -71,6 +71,11 @@ const ru: PartialLocaleType = { Title: "Размер шрифта", SubTitle: "Настроить размер шрифта контента чата", }, + InjectSystemPrompts: { + Title: "Вставить системные подсказки", + SubTitle: + "Принудительно добавить симулированную системную подсказку ChatGPT в начало списка сообщений для каждого запроса", + }, Update: { Version: (x: string) => `Версия: ${x}`, IsLatest: "Последняя версия", diff --git a/app/locales/tr.ts b/app/locales/tr.ts index 2383a549..ad6b66fd 100644 --- a/app/locales/tr.ts +++ b/app/locales/tr.ts @@ -71,6 +71,11 @@ const tr: PartialLocaleType = { Title: "Yazı Boyutu", SubTitle: "Sohbet içeriğinin yazı boyutunu ayarlayın", }, + InjectSystemPrompts: { + Title: "Sistem İpucu Ekleyin", + SubTitle: + "Her istek için ileti listesinin başına simüle edilmiş bir ChatGPT sistem ipucu ekleyin", + }, Update: { Version: (x: string) => `Sürüm: ${x}`, IsLatest: "En son sürüm", diff --git a/app/locales/tw.ts b/app/locales/tw.ts index 1afb0eb7..d64294fa 100644 --- a/app/locales/tw.ts +++ b/app/locales/tw.ts @@ -69,6 +69,10 @@ const tw: PartialLocaleType = { Title: "字型大小", SubTitle: "聊天內容的字型大小", }, + InjectSystemPrompts: { + Title: "注入系統提示", + SubTitle: "強制在每個請求的訊息列表開頭添加一個模擬 ChatGPT 的系統提示", + }, Update: { Version: (x: string) => `當前版本:${x}`, IsLatest: "已是最新版本", diff --git a/app/locales/vi.ts b/app/locales/vi.ts index 428f9385..2117734b 100644 --- a/app/locales/vi.ts +++ b/app/locales/vi.ts @@ -71,6 +71,11 @@ const vi: PartialLocaleType = { Title: "Font chữ", SubTitle: "Thay đổi font chữ của nội dung trò chuyện", }, + InjectSystemPrompts: { + Title: "Tiêm Prompt Hệ thống", + SubTitle: + "Bắt buộc thêm một prompt hệ thống giả lập ChatGPT ở đầu danh sách tin nhắn cho mỗi yêu cầu", + }, Update: { Version: (x: string) => `Phiên bản: ${x}`, IsLatest: "Phiên bản mới nhất", diff --git a/app/store/chat.ts b/app/store/chat.ts index ea2c472f..6b403dd6 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -387,8 +387,7 @@ export const useChatStore = create()( const contextPrompts = session.mask.context.slice(); // system prompts, to get close to OpenAI Web ChatGPT - // only will be injected if user does not use a mask or set none context prompts - const shouldInjectSystemPrompts = contextPrompts.length === 0; + const shouldInjectSystemPrompts = modelConfig.enableInjectSystemPrompts; const systemPrompts = shouldInjectSystemPrompts ? [ createMessage({ diff --git a/app/store/config.ts b/app/store/config.ts index a4ac45e7..b1998b93 100644 --- a/app/store/config.ts +++ b/app/store/config.ts @@ -47,6 +47,7 @@ export const DEFAULT_CONFIG = { sendMemory: true, historyMessageCount: 4, compressMessageLengthThreshold: 1000, + enableInjectSystemPrompts: true, template: DEFAULT_INPUT_TEMPLATE, }, }; @@ -146,7 +147,7 @@ export const useAppConfig = create()( }), { name: StoreKey.Config, - version: 3.5, + version: 3.6, migrate(persistedState, version) { const state = persistedState as ChatConfig; @@ -165,6 +166,10 @@ export const useAppConfig = create()( state.customModels = "claude,claude-100k"; } + if (version < 3.6) { + state.modelConfig.enableInjectSystemPrompts = true; + } + return state as any; }, },