Skip to content

Commit

Permalink
feat: 处理下stop的请求,防止报错
Browse files Browse the repository at this point in the history
  • Loading branch information
zgqgit committed Jun 26, 2024
1 parent c9a065c commit 7e56844
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/backend/bisheng/chat/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ async def handle_gpts_message(self, message: Dict[any, any]):
if not message:
return
logger.debug(f'receive client message, client_key: {self.client_key} message: {message}')
if message.get('action') == 'stop':
logger.info(f'need stop agent, client_key: {self.client_key}, message: {message}')
return

inputs = message.get('inputs', {})
input_msg = inputs.get('input')
Expand Down

0 comments on commit 7e56844

Please sign in to comment.