INNER CODE UNIT · Python
__init__
dusty-nv/jetson-containers · packages/llm/local_llm/web/server.py:41
def __init__(self, web_host='0.0.0.0', web_port=8050, ws_port=49000,
ssl_cert=None, ssl_key=None, root=None, index='index.html',
mounts={'/tmp/uploads':'/uploads'}, msg_callback=None, web_trace=False,
**kwargs):
"""
Parameters:
web_host (str) -- network interface to bind to (0.0.0.0 for all)
web_port (int) -- port to serve HTTP/HTTPS webpages on
ws_port (int) -- port to use for websocket communication
ssl_cert (str) -- path to PEM-encoded SSL/TLS cert file for enabling HTTPS
ssl_key (str) -- path to PEM-encoded SSL/TLS cert key for enabling HTTPS
root (str) -- the root directory for serving site files (should have static/ and template/)
index (str) -- the name of the site's index page (should be under web/templates)
upload_dir (str) -- the path to save files uploaded from client (or None to disable uploads)
msg_callback (callable) -- websocket message handler (see WebServer.on_message() for signature)
web_trace (bool) -- if true, additional debug messages will be printed when --log-level=debug