Perplexica: error: undefined - MacOS Ollama

Describe the bug I’m not able to search running Perplexica as a docker container locally and Ollama.

To Reproduce

Ollama installation

$ brew install ollama 
$ brew services start ollama
$ ollama pull llama3:latest

confirm the service is working

$ curl  http://127.0.0.1:11434

Ollama is running%

config file:

[API_ENDPOINTS]
SEARXNG = "http://localhost:32768" # SearxNG API URL
OLLAMA = "http://host.docker.internal:11434"

open http://localhost:3000 and do any search …

Expected behavior Perplexica be able to return answers for any query with no errors

Additional context

Anytime I try to search for something I see error: undefined in the log entries:

docker logs perplexica-perplexica-backend-1 -f
yarn run v1.22.19
$ node dist/app.js
info: WebSocket server started on port 3001
info: Server is running on port 3001


error: undefined
error: undefined

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 27 (7 by maintainers)

Most upvoted comments

The problem re-appeared. Deleting the cookies solved it.

I’ve re-cloned and re-set up everything, and now it works to me. Also had to clear cache and cookies, at the first attempt it was showing the same error

Just did another commit, 27e6f5b, that should help

How should Ollama work now? The option is still not in the drop down. There’s “Custom_OpenAI” and then the Ollama URI parameter separately to that. Earlier there was a separate option for Ollama in the model provider list…

This issue is now resolved with 8539ce8. I’d recommend everyone to re-install Perplexica.

docker compose up -d --build

Note: Run this only after re-cloning the repository.

Did this but now nothing works. Do I need to change or do anything else?

Update:

Even though I’ve selected OpenAI, it seems there are some Ollama related errors occurring. My Ollama settings were correct and were working with the fake GROQ API key before this last commit:

error: Error loading Ollama models: TypeError: fetch failed error: Error loading Ollama embeddings model: TypeError: fetch failed

This issue is now resolved with https://github.com/ItzCrazyKns/Perplexica/commit/8539ce82ad4b289956fc9c57bd1fb505aa26451d. I’d recommend everyone to re-install Perplexica.

docker compose up -d --build

Note: Run this only after re-cloning the repository.