Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perplexica UI doesn't terminate initialization #70

Open
PieBru opened this issue Oct 29, 2024 · 4 comments
Open

Perplexica UI doesn't terminate initialization #70

PieBru opened this issue Oct 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@PieBru
Copy link

PieBru commented Oct 29, 2024

Hi,
Trying Perplexica, it installs without errors, but the UI is stuck before writing its "prompt". It seems its settings must be adjusted, but also the settings page remains stuck waiting with the UPLOAD button disabled:
image

It seems also that Perplexica doesn't take advantage of the Harbor ecosystem (Ollama, SearXNG).

I got Perplexica working in a dedicated LXC container after setting its config.toml before starting it:

[API_KEYS]
GROQ = "gsk_******"

[API_ENDPOINTS]
OLLAMA = "http://10.4.0.100:11434"
SEARXNG = "http://10.4.0.105:4000"

The only harbor config I'm aware of is this:

[root@HarborAI ~]# harbor config ls | grep -i perplexica
PERPLEXICA_HOST_PORT           34041
PERPLEXICA_BACKEND_HOST_PORT   34042

How to solve?
Thank you

@av av added the bug Something isn't working label Nov 2, 2024
@av
Copy link
Owner

av commented Nov 2, 2024

Thanks for the report, it's not an expected state, since Perplexica should:

  • Start from scratch with harbor up perplexica
  • Connect to built-in Ollama and Searxng out of the box

Unfortunately, Perplexica is one of the services that are a tiny bit "picky" in terms of configuration, I've outlined some most possible caveats here: #60 (comment)


The only harbor config I'm aware of

Perplexica (and many other services) cross-connections are setup with cross-service files (I call them x files, haha), here's one for Ollama and another one for SearXNG, these are merged with the rest of the configs whenever harbor sees that matching services are run together (including default services). So one of the things to check is to verify if values in these files match the expected network layout.

@nullnuller
Copy link

nullnuller commented Nov 4, 2024

I still have the same issue #60 (comment) The issues seems to be resolved for me.
Also, I noticed that perplexica config survives rm -rf harbor or even harbor config reset

@PieBru
Copy link
Author

PieBru commented Dec 4, 2024

I managed to solve this same issue I had with Perplexica in a LXC container on Proxmox VE, but I don't know how to apply this solution to Perplexica on Harbor.

After finding this ItzCrazyKns/Perplexica#467, the solution was substituting 127.0.0.1 with the LAN IP of the computer runnong Harbor, in my case 10.4.0.174, into docker-compose.yaml:

perplexica-frontend:
    build:
      context: .
      dockerfile: app.dockerfile
      args:
        - NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
        - NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001

@ecker00
Copy link

ecker00 commented Dec 27, 2024

This requires rebuilding the image, if you are lazy override it on runtime:

  perplexica-frontend:
    image: itzcrazykns1337/perplexica-frontend:main
    restart: unless-stopped
    depends_on:
      - perplexica-backend
    ports:
      - 3000:3000
    networks:
      - perplexica-network
    command: >
      sh -c "
      find .next -type f -name '*.js' -exec sed -i 's|ws://127.0.0.1:3001|ws://10.0.5.100:3001|g' {} + &&
      find .next -type f -name '*.js' -exec sed -i 's|http://127.0.0.1:3001/api|http://10.0.5.100:3001/api|g' {} + &&
      yarn start"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants