Niansuh commited on
Commit
363aac7
·
verified ·
1 Parent(s): 9f6bc04

Update api/utils.py

Browse files
Files changed (1) hide show
  1. api/utils.py +3 -3
api/utils.py CHANGED
@@ -121,7 +121,7 @@ async def process_streaming_response(request: ChatRequest):
121
  content = line + "\n"
122
  if "https://www.blackbox.ai" in content:
123
  validate.getHid(True)
124
- content = "hid已刷新,重新对话即可\n"
125
  logger.info(f"hid refreshed due to content: {content}")
126
  yield f"data: {json.dumps(create_chat_completion_data(content, request.model, timestamp))}\n\n"
127
  break
@@ -188,8 +188,8 @@ async def process_non_streaming_response(request: ChatRequest):
188
 
189
  if "https://www.blackbox.ai" in full_response:
190
  validate.getHid(True)
191
- full_response = "hid已刷新,重新对话即可"
192
- logger.info("hid refreshed due to response content")
193
 
194
  if full_response.startswith("$@$v=undefined-rv1$@$"):
195
  full_response = full_response[21:]
 
121
  content = line + "\n"
122
  if "https://www.blackbox.ai" in content:
123
  validate.getHid(True)
124
+ content = "The HID has been refreshed; please try again.\n"
125
  logger.info(f"hid refreshed due to content: {content}")
126
  yield f"data: {json.dumps(create_chat_completion_data(content, request.model, timestamp))}\n\n"
127
  break
 
188
 
189
  if "https://www.blackbox.ai" in full_response:
190
  validate.getHid(True)
191
+ full_response = "The HID has been refreshed; please try again."
192
+ logger.info("HID refreshed due to the content of the response.")
193
 
194
  if full_response.startswith("$@$v=undefined-rv1$@$"):
195
  full_response = full_response[21:]