PandoraAI is a web chat client powered by node-chatgpt-api, allowing users to easily chat with multiple AI systems while also offering support for custom presets. With its seamless and convenient design, PandoraAI provides an engaging conversational AI experience.
This fork contains some improvements, which are briefly descibed below:
Support for deleting messages and copying Markdown sources
Support for rendering LaTeX formula
Typing preview
Dockerfile optimization
UI icon beautify
Let's talk about Docker.
We should not use npm run dev as Docker image entrypoint, since it starts Vite development server, which can hardly handle requests behind reverse proxies. Because Vite development server injects port number it binds, if we are behind reverse proxies, it will never connect to Vite's websocket endpoint, which causes infinite refreshing. In this case, I compiled the nitro server at image build time and used npm run preview.
We should use layered building, to make use of Docker's layer cache. So I splitted node_module fetching and postinstall triggering.
Another important change is the environment variable. In recent versions the api server endpoint setting is broken, since Nuxt does not recognized the environment variable from .env. I replaced API_BASE_URL with NUXT_PUBLIC_API_BASE_URL to fix the problem. (maybe the root cause of this problem is not here, but it can be a fix. I'm not an expert with Vue ecosystem)
Some demo photos are also updated with HiDPI version.
This fork contains some improvements, which are briefly descibed below:
Let's talk about Docker.
npm run dev
as Docker image entrypoint, since it starts Vite development server, which can hardly handle requests behind reverse proxies. Because Vite development server injects port number it binds, if we are behind reverse proxies, it will never connect to Vite's websocket endpoint, which causes infinite refreshing. In this case, I compiled the nitro server at image build time and usednpm run preview
.node_module
fetching andpostinstall
triggering.Another important change is the environment variable. In recent versions the api server endpoint setting is broken, since Nuxt does not recognized the environment variable from
.env
. I replacedAPI_BASE_URL
withNUXT_PUBLIC_API_BASE_URL
to fix the problem. (maybe the root cause of this problem is not here, but it can be a fix. I'm not an expert with Vue ecosystem)Some demo photos are also updated with HiDPI version.