Skip to content

Commit

Permalink
修复模型请求异常时的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
6vision committed May 22, 2024
1 parent 99aac76 commit 93a32ae
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 93a32ae

Please sign in to comment.