Problem deploying panel app that uses ChatInterface on a webserver (via pyodide)

Hi,

I’m trying to deploy a panel app on a web server (i.e. not a panel server) by converting the script with panel convert app.py --to pyodide-worker --out web_files/. The app uses a ChatInterface, but unfortunately when I try to submit a chat message, I get the following error (in the browser debug console - I’m not using the mistral API, but instead running a local LLM server):

Firefox can’t establish a connection to the server at ws://localhost:8080/
The connection to ws://localhost:8080/ was interrupted while the page was loading.

It looks like there’s a problem around websockets or something, just thought I’d ask if you had any thoughts on what might be causing this error/how to fix?

Many thanks for any help!

Looks like Pyodide doesn’t support websockets: Can't use WebSocket · Issue #574 · pyodide/pyodide · GitHub