INNER CODE UNIT · Python

start

dusty-nv/jetson-containers · packages/llm/local_llm/web/server.py:128

    def start(self):
        """
        Call this to start the webserver threads
        """
        logging.info(f"starting webserver @ {self.web_protocol}://{self.host}:{self.port}")
        self.ws_thread.start()
        self.web_thread.start()

    def add_message_handler(self, callback):
        """
        Register a message handler that will be called when new websocket messages are recieved
        """
        if callback:
            self.msg_callback.append(callback)
            
    def on_message(self, payload, payload_size=None, msg_type=MESSAGE_JSON, msg_id=None, metadata=None, timestamp=None, path=None, **kwargs):
        """
        Handler for recieved websocket messages. Implement this in a subclass to process messages,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…