chore(mlx-lm): fix broken server.py script (#519)

This commit is contained in:
Anchen 2024-03-04 01:04:54 +11:00 committed by GitHub
parent 81e2a80026
commit 3655bfc3bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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")