Skip to content

Commit

Permalink
Beta105 (#103)
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
  • Loading branch information
Hoshinonyaruko authored May 4, 2024
1 parent f864292 commit db75ef0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions applogic/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ func (app *App) GetAndSendEnv(msg string, promptstr string, message structs.Oneb
// 处理图片
newResponse := processResponseData(responseData)

// 当本轮文字是1: 图片也是 1: 时
if newResponse == "" {
fmt.Println("最终env响应为空")
return
}

// 判断消息类型,如果是私人消息或私有群消息,发送私人消息;否则,根据配置决定是否发送群消息
if message.RealMessageType == "group_private" || message.MessageType == "private" {
utils.SendPrivateMessageRaw(message.UserID, newResponse, selfid)
Expand Down
4 changes: 3 additions & 1 deletion applogic/gensokyo.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,13 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) {
// 使用 prompt 变量进行后续处理
fmt.Printf("收到prompt参数: %s\n", promptstr)
}
PromptMarksLength := config.GetPromptMarksLength(promptstr)

// MARK: 提示词之间 整体切换Q 当用户没有存档时
app.ProcessPromptMarks(message.UserID, message.Message.(string), &promptstr)

// 在切换分支后,再获取长度
PromptMarksLength := config.GetPromptMarksLength(promptstr)

err = app.InsertCustomTableRecord(message.UserID, promptstr, PromptMarksLength)
if err != nil {
fmt.Printf("app.InsertCustomTableRecord 出错: %s\n", err)
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ readme的说明较难懂,可到语雀查看[ai整理的文档](https://www.yuque
- [x] enhancedPromptChoices: true #promptChoicesQA switchOnQA exitOnQA的语法,false时是随机模式 1:回家吧-不回家-原地休息 没有后方的/,随机一个分支跳转。true是具有关键词条件 1:回家吧/a/b/c-不回家/a/b/c
- [x] envType : 0 #0=不使用场景描述,1=在本轮llm回复前发送场景描述,2=在本轮llm回复后发送场景描述,场景描述支持[image:xxx][pic:xxx][图片:xxx][背景:xxx]标签,xxx为相对或绝对路径,需在exe运行目录下
- [x] envPics : [] #现阶段ai速度太慢,人工指定,数组代表多个,每个数组成员以1: 2: 开始代表对应第几轮.
- [x] envContents : []
- [x] envContents : [] #如果要跳过某个轮次,直接指定文字是2: 图片也是2: 代表本轮文图是空的.

含义解释,以上参数均位于多配置文件的settings部分,你可以决定每个场景的提示词长度,每个场景的长度promptMarksLength,来控制剧情的颗粒度。

Expand Down

0 comments on commit db75ef0

Please sign in to comment.