MCPcopy
hub / github.com/lm-sys/FastChat / create_controller

Function create_controller

fastchat/serve/controller.py:353–374  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

351
352
353def create_controller():
354 parser = argparse.ArgumentParser()
355 parser.add_argument("--host", type=str, default="localhost")
356 parser.add_argument("--port", type=int, default=21001)
357 parser.add_argument(
358 "--dispatch-method",
359 type=str,
360 choices=["lottery", "shortest_queue"],
361 default="shortest_queue",
362 )
363 parser.add_argument(
364 "--ssl",
365 action="store_true",
366 required=False,
367 default=False,
368 help="Enable SSL. Requires OS Environment variables 'SSL_KEYFILE' and 'SSL_CERTFILE'.",
369 )
370 args = parser.parse_args()
371 logger.info(f"args: {args}")
372
373 controller = Controller(args.dispatch_method)
374 return args, controller
375
376
377if __name__ == "__main__":

Callers 1

controller.pyFile · 0.85

Calls 1

ControllerClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…