Skip to content

Commit

Permalink
Merge pull request #2012 from 6vision/fix_issue_1959_
Browse files Browse the repository at this point in the history
Fix issue 1959 wenxin模型返回报错
  • Loading branch information
6vision authored May 22, 2024
2 parents eee96f2 + 071709d commit a46320e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot/baidu/baidu_wenxin.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def reply_text(self, session: BaiduWenxinSession, retry_count=0):
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):
Expand Down

0 comments on commit a46320e

Please sign in to comment.