yym68686 commited on
Commit
864c752
·
1 Parent(s): eb02b52

🐛 Bug: Fix the bug where the fixed message for pass-through did not check for generation failure.

Browse files
Files changed (1) hide show
  1. utils.py +3 -0
utils.py CHANGED
@@ -129,6 +129,9 @@ async def error_handling_wrapper(generator):
129
  if first_item_str.startswith("[DONE]"):
130
  logger.error("error_handling_wrapper [DONE]!")
131
  raise StopAsyncIteration
 
 
 
132
  try:
133
  first_item_str = json.loads(first_item_str)
134
  except json.JSONDecodeError:
 
129
  if first_item_str.startswith("[DONE]"):
130
  logger.error("error_handling_wrapper [DONE]!")
131
  raise StopAsyncIteration
132
+ if "The bot's usage is covered by the developer" in first_item_str:
133
+ logger.error("error const string!")
134
+ raise StopAsyncIteration
135
  try:
136
  first_item_str = json.loads(first_item_str)
137
  except json.JSONDecodeError: