Skip to content

Commit

Permalink
pref!: remove option of reset continuous dialogue
Browse files Browse the repository at this point in the history
  • Loading branch information
ourongxing committed Apr 14, 2023
1 parent f37c03e commit c871a58
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CLIENT_AUTO_RESET_CONTINUOUS_DIALOGUE=false
CLIENT_DEFAULT_SETTING={"continuousDialogue":true,"archiveSession":false,"openaiAPIKey":"","openaiAPITemperature":60,"password":"","systemRule":"","model":"gpt-3.5-turbo"}
CLIENT_DEFAULT_SETTING={"continuousDialogue":true,"archiveSession":false,"APIKey":"","APITemperature":0.6,"password":"","APIModel":"gpt-3.5-turbo"}
CLIENT_DEFAULT_MESSAGE='Powered by OpenAI Vercel
- 如果本项目对你有所帮助,可以给小猫 [买点零食](https://cdn.jsdelivr.net/gh/ourongxing/chatgpt-vercel/assets/reward.gif),但不接受任何付费功能请求。
- 本网站仅作为项目演示,不提供服务,请填入自己的 Key,长期使用请 [自行部署](https://github.com/ourongxing/chatgpt-vercel#%E9%83%A8%E7%BD%B2%E4%B8%80%E4%B8%AA%E4%BD%A0%E8%87%AA%E5%B7%B1%E7%9A%84-chatgpt-%E7%BD%91%E7%AB%99%E5%85%8D%E8%B4%B9),简单成本低。
Expand Down
1 change: 0 additions & 1 deletion env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
interface ImportMetaEnv {
CLIENT_AUTO_RESET_CONTINUOUS_DIALOGUE?: string
CLIENT_DEFAULT_SETTING?: string
CLIENT_DEFAULT_MESSAGE?: string
CLIENT_MAX_INPUT_TOKENS?: string
Expand Down
1 change: 0 additions & 1 deletion src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type { Model } from "./types"
* 以 CLIENT_ 开头的变量会暴露给前端
*/
export const defaultEnv = {
CLIENT_AUTO_RESET_CONTINUOUS_DIALOGUE: false,
CLIENT_DEFAULT_SETTING: {
continuousDialogue: true,
archiveSession: false,
Expand Down
3 changes: 1 addition & 2 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ function Store() {
? store.messageList.filter(
(k, i, _) =>
(k.role === "assistant" && _[i - 1]?.role === "user") ||
(k.role === "user" &&
(_[i + 1]?.role === "assistant" || k.type === "locked"))
(k.role === "user" && _[i + 1]?.role !== "error")
)
: store.messageList.filter(k => k.type === "locked")
)
Expand Down

0 comments on commit c871a58

Please sign in to comment.