Update chat API (fixes #3006)

This commit is contained in:
oobabooga 2023-07-04 17:36:47 -07:00
parent 333075e726
commit 70a4d5dbcf
3 changed files with 4 additions and 5 deletions

View file

@ -72,7 +72,6 @@ class Handler(BaseHTTPRequestHandler):
self.end_headers()
user_input = body['user_input']
history = body['history']
regenerate = body.get('regenerate', False)
_continue = body.get('_continue', False)
@ -80,9 +79,9 @@ class Handler(BaseHTTPRequestHandler):
generate_params['stream'] = False
generator = generate_chat_reply(
user_input, history, generate_params, regenerate=regenerate, _continue=_continue, loading_message=False)
user_input, generate_params, regenerate=regenerate, _continue=_continue, loading_message=False)
answer = history
answer = generate_params['history']
for a in generator:
answer = a