Skip to content

Commit

Permalink
Beta144 (#143)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Hoshinonyaruko authored Jun 8, 2024
1 parent 5a209ae commit eecf813
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 eecf813

Please sign in to comment.