Skip to content

Commit

Permalink
Beta154 (#153)
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

* beta145

* beta146

* beta148

* beta149

* beta150

* beta151

* beta151

* beta152

* beta154
  • Loading branch information
Hoshinonyaruko authored Jun 18, 2024
1 parent 45212dc commit 8b3aa09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions applogic/gensokyo.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,20 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) {
return
}

// 打印日志信息,包括prompt参数
fmtf.Printf("收到onebotv11信息: %+v\n", string(body))

// 打印消息和其他相关信息
fmtf.Printf("Received message: %v\n", message.Message)
fmtf.Printf("Full message details: %+v\n", message)

// 进行array转换
// 检查并解析消息类型
if _, ok := message.Message.(string); !ok {
// 如果不是字符串,处理消息以转换为字符串,强制转换
message.Message = ParseMessageContent(message.Message)
}

var promptstr string
// 读取URL参数 "prompt"
promptstr = r.URL.Query().Get("prompt")
Expand Down Expand Up @@ -291,20 +305,6 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) {
fmt.Printf("收到 skip_lang_check 参数: %v\n", skipLangCheck)
}

// 打印日志信息,包括prompt参数
fmtf.Printf("收到onebotv11信息: %+v\n", string(body))

// 打印消息和其他相关信息
fmtf.Printf("Received message: %v\n", message.Message)
fmtf.Printf("Full message details: %+v\n", message)

// 进行array转换
// 检查并解析消息类型
if _, ok := message.Message.(string); !ok {
// 如果不是字符串,处理消息以转换为字符串,强制转换
message.Message = ParseMessageContent(message.Message)
}

// 判断message.Message的类型
switch msg := message.Message.(type) {
case string:
Expand Down
4 changes: 2 additions & 2 deletions promptkb/promptkb.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ func GetPromptKeyboardAI(msg string, promptstr string) []string {
responseBody = bytes.ReplaceAll(responseBody, []byte{10}, []byte("")) // LF
responseBody = bytes.ReplaceAll(responseBody, []byte{13}, []byte("")) // CR

fmtf.Printf("清洗后气泡Response: %v\n", responseBody)
//fmtf.Printf("清洗后气泡Response: %s\n", string(responseBody))
//fmtf.Printf("清洗后气泡Response: %v\n", responseBody)
fmtf.Printf("清洗后气泡Response: %s\n", string(responseBody))

var responseData ResponseDataPromptKeyboard
if err := json.Unmarshal(responseBody, &responseData); err != nil {
Expand Down

0 comments on commit 8b3aa09

Please sign in to comment.