From eecf8133632a106ce2489eaf0a56150c056abbe5 Mon Sep 17 00:00:00 2001 From: SanaeFox <36219542+Hoshinonyaruko@users.noreply.github.com> Date: Sun, 9 Jun 2024 00:59:47 +0800 Subject: [PATCH] Beta144 (#143) * beta1 * beta2 * beta3 * beta4 * beta5 * beta6 * beta7 * beta8 * beta9 * beta10 * beta11 * beta12 * beta13 * beta14 * beta15 * beta16 * beta16 * beta19 * beta20 * beta21 * beta22 * beta23 * beta24 * beta25 * beta27 * beta28 * beta29 * beta30 * beta31 * beta33 * beta34 * beta35 * beta36 * beta37 * beta38 * beta39 * beta40 * beta41 * beta42 * beta43 * beta44 * beta45 * beta45 * beta46 * beat48 * beta49 * beta50 * beta51 * beta52 * beta53 * beta54 * beta55 * beta57 * beta58 * beta59 * beta61 * beta62 * beta63 * beta63 * beta64 * beta65 * beta66 * beta67 * beta70 * beta71 * beta72 * beta72 * beta74 * beta75 * beta76 * beta77 * beta78 * beta79 * beta80 * beta81 * beta82 * beta83 * beta85 * beta86 * beta87 * beta88 * beta89 * beta90 * beta91 * beta92 * beta93 * beta94 * beta94 * beta96 * beta97 * beta98 * beta99 * beta100 * beta101 * beta102 * beta104 * beta105 * beta106 * beta107 * beta108 * beta109 * beta110 * beta111 * beta112 * beta113 * beta115 * beta116 * beta117 * beta118 * beta119 * beta120 * beta121 * beta122 * beta123 * beta124 * beta125 * beta126 * beta127 * beta128 * beta129 * beta130 * beta131 * beta132 * beta1333 * beta134 * beta135 * beta136 * beta137 * beta138 * beta139 * beta140 * beta141 * beta142 * beta143 * beta144 --- .gitignore | 1 + applogic/gensokyo.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 544bd3f..c9c1308 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Go specific *.exe +*.exe~ # log log diff --git a/applogic/gensokyo.go b/applogic/gensokyo.go index 0557d89..68266fd 100644 --- a/applogic/gensokyo.go +++ b/applogic/gensokyo.go @@ -202,7 +202,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) { fmt.Printf("app.InsertCustomTableRecord 出错: %s\n", err) } } else { - err = app.InsertCustomTableRecord(message.UserID, promptstr, newPromptStrStat) + err = app.InsertCustomTableRecord(message.UserID+message.SelfID, promptstr, newPromptStrStat) if err != nil { fmt.Printf("app.InsertCustomTableRecord 出错: %s\n", err) } @@ -213,7 +213,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) { if config.GetGroupContext() == 2 && message.MessageType != "private" { app.ProcessPromptMarks(message.GroupID+message.SelfID, message.Message.(string), &promptstr) } else { - app.ProcessPromptMarks(message.UserID, message.Message.(string), &promptstr) + app.ProcessPromptMarks(message.UserID+message.SelfID, message.Message.(string), &promptstr) } // 提示词之间流转 达到信号量 @@ -236,7 +236,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) { if config.GetGroupContext() == 2 && message.MessageType != "private" { app.InsertCustomTableRecord(message.GroupID+message.SelfID, newPromptStr, 1) } else { - app.InsertCustomTableRecord(message.UserID, newPromptStr, 1) + app.InsertCustomTableRecord(message.UserID+message.SelfID, newPromptStr, 1) } fmt.Printf("流转prompt参数: %s,newPromptStrStat:%d\n", newPromptStr, 1) @@ -248,7 +248,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) { if config.GetGroupContext() == 2 && message.MessageType != "private" { app.ProcessPromptMarks(message.GroupID+message.SelfID, message.Message.(string), &promptstr) } else { - app.ProcessPromptMarks(message.UserID, message.Message.(string), &promptstr) + app.ProcessPromptMarks(message.UserID+message.SelfID, message.Message.(string), &promptstr) } var newstat int @@ -262,7 +262,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) { if config.GetGroupContext() == 2 && message.MessageType != "private" { err = app.InsertCustomTableRecord(message.GroupID+message.SelfID, promptstr, newstat) } else { - err = app.InsertCustomTableRecord(message.UserID, promptstr, newstat) + err = app.InsertCustomTableRecord(message.UserID+message.SelfID, promptstr, newstat) } if err != nil { @@ -708,7 +708,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) { if config.GetGroupContext() == 2 && message.MessageType != "private" { fmtf.Printf("实际请求conversation端点内容:[%v]%v\n", message.GroupID+message.SelfID, requestmsg) } else { - fmtf.Printf("实际请求conversation端点内容:[%v]%v\n", message.UserID, requestmsg) + fmtf.Printf("实际请求conversation端点内容:[%v]%v\n", message.UserID+message.SelfID, requestmsg) } requestBody, err := json.Marshal(map[string]interface{}{ @@ -969,7 +969,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) { fmtf.Printf("Error updating user context: %v\n", err) } } else { - err := app.updateUserContext(message.UserID, lastMessageID) + err := app.updateUserContext(message.UserID+message.SelfID, lastMessageID) if err != nil { fmtf.Printf("Error updating user context: %v\n", err) } @@ -1074,7 +1074,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) { fmtf.Printf("Error updating user context: %v\n", err) } } else { - err := app.updateUserContext(message.UserID, messageId) + err := app.updateUserContext(message.UserID+message.SelfID, messageId) if err != nil { fmtf.Printf("Error updating user context: %v\n", err) }