mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-07-14 05:31:12 +08:00
chore(mlx-lm): fix broken server.py script (#519)
This commit is contained in:
parent
81e2a80026
commit
3655bfc3bd
@ -160,13 +160,6 @@ def create_completion_chunk_response(completion_id, requested_model, next_chunk)
|
||||
|
||||
class APIHandler(BaseHTTPRequestHandler):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
# Prevent exposing local directory by deleting HEAD and GET methods
|
||||
delattr(self, "do_HEAD")
|
||||
delattr(self, "do_GET")
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def _set_headers(self, status_code=200):
|
||||
self.send_response(status_code)
|
||||
self.send_header("Content-type", "application/json")
|
||||
|
Loading…
Reference in New Issue
Block a user