Perplexica

From Notes_Wiki

Home > Local system based AI tools > Perplexica

To install Perplexica on Rocky Linux 9. machine use:

  1. Ensure Ollama is installed as per https://www.sbarjatiya.com/notes_wiki/index.php/Ollama_installation
    ollama pull nomic-embed-text:latest
    ollama pull llama2:13b-chat
  2. In /etc/systemd/system/ollama.service add one more environment condition:
    Environment="OLLAMA_HOST=0.0.0.0"
    If you do this then remember to do:
    systemctl deemon-reload
    systemctl stop ollama.service
    systemctl start ollama.service
  3. Verify ollama is listening on 0.0.0.0 via:
    ss -alnp | grep 11434
  4. Git clone perplexica from github as root user
    git clone https://github.com/ItzCrazyKns/Perplexica.git
    dnf -y install podman-*
  5. Configure Perplexica parameters in "Perplexica/config.toml" file as:
    OLLAMA = { }
    
    [GENERAL]
    PORT = 3_001
    SIMILARITY_MEASURE = "cosine"
    KEEP_ALIVE = "5m"
    
    [MODELS.OPENAI]
    API_KEY = ""
    
    [MODELS.GROQ]
    API_KEY = ""
    
    [MODELS.ANTHROPIC]
    API_KEY = ""
    
    [MODELS.GEMINI]
    API_KEY = ""
    
    [MODELS.CUSTOM_OPENAI]
    API_KEY = ""
    API_URL = ""
    MODEL_NAME = ""
    
    [MODELS.OLLAMA]
    API_URL = "http://host.docker.internal:11434/"
    
    [API_ENDPOINTS]
    SEARXNG = "http://localhost:32768/"
    OLLAMA = "http://host.docker.internal:11434/"
    
    [EMBEDDINGS]
    MODEL = "nomic-embed-text:latest"
    
    [CHAT]
    MODEL = "llama2:13b-chat"
    TEMPERATURE = 0.7
    MAX_TOKENS = 4_096
  6. If ports 3000, 3001 or 4000 are in use stop those services eg:
    ss -alnp | grep 4000
    systemctl stop nxserver
  7. As root user from Perplexica folder use
    podman-compose up
  8. In Chrome open http://localhost:3000/settings
    1. Ensure OLLAMA_API_URL is set to **http://host.docker.internal:11434/**
    2. After this set
      chat model provider
      ollama
      Chat model
      llama2:13b-chat
      Embedding provider ollama
      Embedding-model
      nomic-embed-text


Installing searxng only via docker

To install searxng via docker use:

  1. Installation steps:
    cd <location-with-enough-storage>
    mkdir searxng
    cd searxng
    docker pull searxng/searxng
    # Use [docker.io/searxng/searxng](http://docker.io/searxng/searxng):latest
    docker run --name searxng -d -p 8888:8080 -v "${PWD}:/etc/searxng" -e "BASE_URL=http://localhost:8080/" searxng/searxng
  2. Open http://localhost:8888/ in browser and test


Home > Local system based AI tools > Perplexica