Perplexica icon indicating copy to clipboard operation
Perplexica copied to clipboard

[Help] Can not install without docker

Open linbojin opened this issue 9 months ago • 8 comments

Describe the bug I want to install without docker, because my working environment can only do this. I refer to the user manual and everything is done, but just after entering the query, "WebSocket is already in CLOSING or CLOSED state." is displayed.

nvm install 18.17.0
nvm use 18.17.0
cd Perplexica
npm i 
npm run build
npm run start

cd ui/  
npm i 
npm run build
npm run start

ui/.env

NEXT_PUBLIC_WS_URL=ws://xxxx/aaa/proxy/3001
NEXT_PUBLIC_API_URL=http://xxx/aaa/proxy/3001/api

and api url is working fine.

Screenshots image image

Can I get more logs about WebSocket? There are no errors in the terminal currently.

image image

Thank you for your wonderful project.

linbojin avatar May 04 '24 08:05 linbojin

Hi, can you try refreshing the page and see if it works. Make sure the console is open while you refresh the page. If the error message again pops up after refreshing the page (before sending a message) it indicates that either the embedding model could not be loaded or the chat model.

ItzCrazyKns avatar May 04 '24 09:05 ItzCrazyKns

image

I can open http://xxx/aaa/proxy/3001/api/models

{
  "chatModelProviders": {
    "openai": {
      "GPT-4 turbo": {
        "lc": 1,
        "type": "constructor",
        "id": [
          "langchain",
          "chat_models",
          "openai",
          "ChatOpenAI"
        ],
        "kwargs": {
          "azure_openai_api_key": {
            "lc": 1,
            "type": "secret",
            "id": [
              "AZURE_OPENAI_API_KEY"
            ]
          },
          "azure_openai_api_version": "2024-03-01-preview",
          "azure_openai_api_deployment_name": "gpt-4-turbo",
          "azure_open_ai_base_path": "xxxxxx",
          "model": "gpt-4-turbo"
        }
      }
    },
    "custom_openai": {
    }
  },

linbojin avatar May 04 '24 09:05 linbojin

Hi, can you try refreshing the page and see if it works. Make sure the console is open while you refresh the page. If the error message again pops up after refreshing the page (before sending a message) it indicates that either the embedding model could not be loaded or the chat model.

Can I get error logs about "the embedding/chat model could not be loaded"

linbojin avatar May 04 '24 09:05 linbojin

You're caught by an CORS error, unfortunately we only provide support for the installation of Perplexica and not for its deployment on some domain. I've pushed a new commit that should fix this problem, the HTTP requests that were being sent were having no Content-Type headers and that might be the reason CORS was blocking it. Try pulling the latest version of Perplexica from the main branch and it should fix the problem

ItzCrazyKns avatar May 04 '24 09:05 ItzCrazyKns

Yes, the CORS error is gone after pulling the latest version, Thx. There are no errors after refreshing the page (before sending a message). image

but after I send a query, the “webSocket is already in CLOSING or CLOSED state.” error message again pops up . image

linbojin avatar May 04 '24 09:05 linbojin

That's weird. You can join our Discord server here https://discord.gg/Sud4rUfU, so we can communicate in a better way and we can help you resolve your issue

ItzCrazyKns avatar May 04 '24 09:05 ItzCrazyKns

The WebSocket server shouldn't just close the socket. Its made to close the socket only if the selected model is invalid that to when connecting with it, try checking your proxy once

ItzCrazyKns avatar May 04 '24 09:05 ItzCrazyKns

i met similar situation.and my error like this. image my homepage is like the upper,and my setting about chat model provider can't change. image is there feasible way for me?

xywglzephyr avatar Jun 13 '24 15:06 xywglzephyr