From 93a32ae5ff27a9df61379d9831f4c050c9787d61 Mon Sep 17 00:00:00 2001 From: 6vision Date: Wed, 22 May 2024 15:57:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=BC=82=E5=B8=B8=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot/baidu/baidu_wenxin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/baidu/baidu_wenxin.py b/bot/baidu/baidu_wenxin.py index f35e0fa..f00b5ff 100644 --- a/bot/baidu/baidu_wenxin.py +++ b/bot/baidu/baidu_wenxin.py @@ -94,7 +94,7 @@ class BaiduWenxinBot(Bot): logger.warn("[BAIDU] Exception: {}".format(e)) need_retry = False self.sessions.clear_session(session.session_id) - result = {"completion_tokens": 0, "content": "出错了: {}".format(e)} + result = {"total_tokens":0, "completion_tokens": 0, "content": "出错了: {}".format(e)} return result def get_access_token(self): From 071709d2630451daaf3195092776f9b29e3818e3 Mon Sep 17 00:00:00 2001 From: 6vision Date: Wed, 22 May 2024 16:01:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=201959-=E7=99=BE=E5=BA=A6=E6=96=87?= =?UTF-8?q?=E5=BF=83=E5=81=B6=E5=8F=91=E6=8A=A5=E9=94=99336006?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot/baidu/baidu_wenxin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/baidu/baidu_wenxin.py b/bot/baidu/baidu_wenxin.py index f00b5ff..81b5748 100644 --- a/bot/baidu/baidu_wenxin.py +++ b/bot/baidu/baidu_wenxin.py @@ -94,7 +94,7 @@ class BaiduWenxinBot(Bot): logger.warn("[BAIDU] Exception: {}".format(e)) need_retry = False self.sessions.clear_session(session.session_id) - result = {"total_tokens":0, "completion_tokens": 0, "content": "出错了: {}".format(e)} + result = {"total_tokens": 0, "completion_tokens": 0, "content": "出错了: {}".format(e)} return result def get_access_token(self):