MCPcopy
hub / github.com/mudler/LocalAI / serve

Function serve

backend/python/llama-cpp-quantization/backend.py:404–417  ·  view source on GitHub ↗
(address)

Source from the content-addressed store, hash-verified

402
403
404def serve(address):
405 server = grpc.server(futures.ThreadPoolExecutor(max_workers=MAX_WORKERS),
406 interceptors=get_auth_interceptors(),
407 )
408 backend_pb2_grpc.add_BackendServicer_to_server(BackendServicer(), server)
409 server.add_insecure_port(address)
410 server.start()
411 print(f"Quantization backend listening on {address}", file=sys.stderr, flush=True)
412
413 try:
414 while True:
415 time.sleep(_ONE_DAY_IN_SECONDS)
416 except KeyboardInterrupt:
417 server.stop(0)
418
419
420if __name__ == "__main__":

Callers 1

backend.pyFile · 0.70

Calls 3

get_auth_interceptorsFunction · 0.90
startMethod · 0.80
BackendServicerClass · 0.70

Tested by

no test coverage detected