Skip to content

Commit

Permalink
beta144
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoshinonyaruko committed Jun 8, 2024
1 parent 8077c0a commit 49b6c27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# Go specific
*.exe
*.exe~

# log
log
Expand Down
16 changes: 8 additions & 8 deletions applogic/gensokyo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}

// 提示词之间流转 达到信号量
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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 {
Expand Down Expand Up @@ -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{}{
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 49b6c27

Please sign in to comment.