From cf3ed9355cc5d679e976b72c739507682a360eed Mon Sep 17 00:00:00 2001
From: linghaihui <75124771@qq.com>
Date: Fri, 24 Mar 2023 10:57:35 +0800
Subject: [PATCH] Fix some issues
---
bingchat/components/chatbox/index.wxml | 2 +-
bingchat/components/chatbox/index.wxss | 1 +
bingchat/pages/index/index.js | 11 +++++++++--
bingchat/pages/index/index.wxml | 2 +-
new-bing/Makefile | 1 +
wechatbot/gpt/gpt.go | 2 +-
wechatbot/handlers/handler.go | 2 --
wechatbot/handlers/user_msg_handler.go | 9 +++++----
8 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/bingchat/components/chatbox/index.wxml b/bingchat/components/chatbox/index.wxml
index 915b906..7b827c4 100644
--- a/bingchat/components/chatbox/index.wxml
+++ b/bingchat/components/chatbox/index.wxml
@@ -8,7 +8,7 @@
{{item.dt}}
-
+
{{item.originContent}}
diff --git a/bingchat/components/chatbox/index.wxss b/bingchat/components/chatbox/index.wxss
index 7638fe4..555e4ab 100644
--- a/bingchat/components/chatbox/index.wxss
+++ b/bingchat/components/chatbox/index.wxss
@@ -79,4 +79,5 @@
.suggest-item-hover {
color: #ff502c;
+ cursor: pointer;
}
\ No newline at end of file
diff --git a/bingchat/pages/index/index.js b/bingchat/pages/index/index.js
index 4cd29b6..cc045bf 100644
--- a/bingchat/pages/index/index.js
+++ b/bingchat/pages/index/index.js
@@ -49,7 +49,8 @@ Page({
data: {
InputBottom: initHeight,
content: "",
- systemInfo: systemInfo
+ systemInfo: systemInfo,
+ textareaFocus: false,
},
InputFocus(e) {
if (inputPop()) {
@@ -233,5 +234,11 @@ Page({
onSuggestSubmit: function (e) {
var suggest = e.detail.suggest;
this.submitContent(suggest);
- },
+ },
+ focus: function(e){
+ console.log(e)
+ this.setData({
+ textareaFocus: true
+ })
+ }
});
diff --git a/bingchat/pages/index/index.wxml b/bingchat/pages/index/index.wxml
index b68d354..2af4add 100644
--- a/bingchat/pages/index/index.wxml
+++ b/bingchat/pages/index/index.wxml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/new-bing/Makefile b/new-bing/Makefile
index b9de292..a816b9c 100644
--- a/new-bing/Makefile
+++ b/new-bing/Makefile
@@ -3,4 +3,5 @@ build:
docker push yy194131/new-bing:$(version)
release:build
+ scp ./{cookie,cookie1,cookie2}.json roselle:/home/linghaihui/bingchat/cookies
ssh roselle 'bash /home/linghaihui/bingchat/start.sh $(version)'
diff --git a/wechatbot/gpt/gpt.go b/wechatbot/gpt/gpt.go
index 34dc110..3cfefb5 100644
--- a/wechatbot/gpt/gpt.go
+++ b/wechatbot/gpt/gpt.go
@@ -58,7 +58,7 @@ func Completions(msg string, nickName string) (string, error) {
requestBody := ChatGPTRequestBody{
Model: "gpt-3.5-turbo",
MaxTokens: 2048,
- Temperature: 0.2,
+ Temperature: 1.2,
Messages: messageCache,
}
requestData, err := json.Marshal(requestBody)
diff --git a/wechatbot/handlers/handler.go b/wechatbot/handlers/handler.go
index efb22e4..1423b00 100644
--- a/wechatbot/handlers/handler.go
+++ b/wechatbot/handlers/handler.go
@@ -37,7 +37,6 @@ func Handler(msg *openwechat.Message) {
handlers[GroupHandler].handle(msg)
return
}
-
// 好友申请
if msg.IsFriendAdd() {
if config.LoadConfig().AutoPass {
@@ -48,7 +47,6 @@ func Handler(msg *openwechat.Message) {
}
}
}
-
// 私聊
handlers[UserHandler].handle(msg)
}
diff --git a/wechatbot/handlers/user_msg_handler.go b/wechatbot/handlers/user_msg_handler.go
index 289d27d..cdff292 100644
--- a/wechatbot/handlers/user_msg_handler.go
+++ b/wechatbot/handlers/user_msg_handler.go
@@ -20,10 +20,11 @@ func (g *UserMessageHandler) handle(msg *openwechat.Message) error {
return g.ReplyText(msg)
}
if msg.IsSendByFriend() {
- msg.ReplyText("目前我只支持文字哦~")
- }
- if msg.IsPaiYiPai() {
- msg.ReplyText("我是机器人🤖️,会拍坏的哦~")
+ if msg.IsPaiYiPai() {
+ msg.ReplyText("我是机器人🤖️,会拍坏的哦~")
+ } else {
+ msg.ReplyText("目前我只支持文字哦~")
+ }
}
return nil
}