Browse Source

Merge pull request #2012 from 6vision/fix_issue_1959_

Fix issue 1959 wenxin模型返回报错
develop
vision GitHub 6 months ago
parent
commit
a46320e744
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      bot/baidu/baidu_wenxin.py

+ 1
- 1
bot/baidu/baidu_wenxin.py View File

@@ -94,7 +94,7 @@ class BaiduWenxinBot(Bot):
logger.warn("[BAIDU] Exception: {}".format(e)) logger.warn("[BAIDU] Exception: {}".format(e))
need_retry = False need_retry = False
self.sessions.clear_session(session.session_id) 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 return result


def get_access_token(self): def get_access_token(self):


Loading…
Cancel
Save