mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 09:21:18 +08:00
fix: unicode decoding (#702)
This commit is contained in:
parent
1484598de1
commit
749cabf299
@ -338,7 +338,6 @@ class APIHandler(BaseHTTPRequestHandler):
|
||||
)
|
||||
break
|
||||
|
||||
detokenizer.finalize()
|
||||
new_text = detokenizer.last_segment
|
||||
response = self.generate_response(new_text, None)
|
||||
self.wfile.write(f"data: {json.dumps(response)}\n\n".encode())
|
||||
@ -347,7 +346,6 @@ class APIHandler(BaseHTTPRequestHandler):
|
||||
|
||||
# check is there any remaining text to send
|
||||
if stop_sequence_buffer:
|
||||
detokenizer.finalize()
|
||||
next_chunk = (
|
||||
detokenizer.last_segment
|
||||
if stop_sequence_suffix is None
|
||||
|
Loading…
Reference in New Issue
Block a user