INNER CODE UNIT · Python

metadata

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

                         metadata=metadata, timestamp=timestamp, path=path, **kwargs)
        else:
            raise NotImplementedError(f"{type(self)} did not implement on_message or have a msg_callback provided")
     
    def send_message(self, payload, type=None, timestamp=None):
        """
        Send a websocket message to client
        """
        if timestamp is None:
            timestamp = time.time() * 1000
         
        encoding = None
        
        if type is None:
            if isinstance(payload, str):
                type = WebServer.MESSAGE_TEXT
                encoding = 'utf-8'
            elif isinstance(payload, bytes):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…