Skip to content

Commit

Permalink
Add option to disable automatic client.py generation (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt authored Jun 11, 2024
1 parent ac38699 commit 65af629
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/litserve/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,9 @@ def generate_client_file(self):
except Exception as e:
print(f"Error copying file: {e}")

def run(self, port: Union[str, int] = 8000, log_level: str = "info", **kwargs):
self.generate_client_file()
def run(self, port: Union[str, int] = 8000, log_level: str = "info", generate_client_file: bool = True, **kwargs):
if generate_client_file:
self.generate_client_file()

port_msg = f"port must be a value from 1024 to 65535 but got {port}"
try:
Expand Down

0 comments on commit 65af629

Please sign in to comment.