don't log entire request on failure
This commit is contained in:
parent
b44dda7a3a
commit
0eb901cb52
|
@ -65,7 +65,6 @@ def openai_chat_completions():
|
||||||
try:
|
try:
|
||||||
json_obj = json.loads(json_str.decode())
|
json_obj = json.loads(json_str.decode())
|
||||||
new = json_obj['text'][0].split(handler.prompt + generated_text)[1]
|
new = json_obj['text'][0].split(handler.prompt + generated_text)[1]
|
||||||
print(new)
|
|
||||||
generated_text = generated_text + new
|
generated_text = generated_text + new
|
||||||
except IndexError:
|
except IndexError:
|
||||||
# ????
|
# ????
|
||||||
|
@ -111,5 +110,4 @@ def openai_chat_completions():
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'EXCEPTION on {request.url}!!!', f'{e.__class__.__name__}: {e}')
|
print(f'EXCEPTION on {request.url}!!!', f'{e.__class__.__name__}: {e}')
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
print(request.data)
|
|
||||||
return build_openai_response('', format_sillytavern_err(f'Server encountered exception.', 'error')), 500
|
return build_openai_response('', format_sillytavern_err(f'Server encountered exception.', 'error')), 500
|
||||||
|
|
|
@ -19,5 +19,4 @@ def generate():
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'EXCEPTION on {request.url}!!!', f'{e.__class__.__name__}: {e}')
|
print(f'EXCEPTION on {request.url}!!!', f'{e.__class__.__name__}: {e}')
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
print(request.data)
|
|
||||||
return format_sillytavern_err(f'Server encountered exception.', 'error'), 500
|
return format_sillytavern_err(f'Server encountered exception.', 'error'), 500
|
||||||
|
|
Reference in New Issue