Sign inSign up

skhatri/docq

By skhatri

•Updated about 1 year ago

Query against your Ollama or OpenAI compatible endpoint with Built-In RAG, Produce and edit Podcast.

Image
Machine learning & AI
0

2.3K

skhatri/docq repository overview

This is an application which provides chat, podcast and RAG capability for your local documents. It can also allow asking questions about images against your vision models.

Run against your Ollama instance:

docker run -p 3040:3040 -p 5040:5040 \
  -e CHAT_BASE=http://host.docker.internal:11434 \
  -e EMBEDDING_BASE=http://host.docker.internal:11434 \
  -d $(pwd)/data:/app/data \
  -it skhatri/docq

Run against your OpenAI compatible endpoint like this:

docker run -p 3040:3040 -p 5040:5040 \
  -e CHAT_BASE=<openai_compatible_base> \
  -e EMBEDDING_BASE=<openai_compatible_base> \
  -e CHAT_TOKEN=your-chat-token \
  -e EMBEDDING_TOKEN=your-embedding-token \
  -it skhatri/docq

To keep it always running

docker run -p 3040:3040 -p 5040:5040 \
  -e CHAT_BASE=http://host.docker.internal:11434 \
  -e EMBEDDING_BASE=http://host.docker.internal:11434 \
  -d /tmp/data:/app/data \
  --restart always \
  -dt skhatri/docq

Your RAG app is running at http://localhost:3040⁠

Here is a sample docker-compose.yaml


services:
  docq:
    image: skhatri/docq
    ports:
      - "${FRONTEND_PORT:-3040}:${FRONTEND_PORT:-3040}"
      - "${BACKEND_PORT:-5040}:${BACKEND_PORT:-5040}"
    volumes:
      - ./data:/app/data
    environment:
      - NODE_ENV=production
      - FLASK_ENV=production

      - FRONTEND_PORT=${FRONTEND_PORT:-3040}
      - BACKEND_HOST=${BACKEND_HOST:-0.0.0.0}
      - BACKEND_PORT=${BACKEND_PORT:-5040}
      - BACKEND_DEBUG=${BACKEND_DEBUG:-false}

      - BACKEND_URL=http://localhost:${BACKEND_PORT:-5040}
      - CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:${FRONTEND_PORT:-3040}}

      # for OpenAI: Set CHAT_TOKEN to your API key, CHAT_BASE defaults to OpenAI
      # for Ollama: Set CHAT_BASE to http://host.docker.internal:11434/v1
      # for other providers: Set CHAT_BASE and CHAT_TOKEN as needed
      - CHAT_BASE=${CHAT_BASE:-http://host.docker.internal:11434/v1}
      - EMBEDDING_BASE=${EMBEDDING_BASE:-${CHAT_BASE:-http://host.docker.internal:11434/v1}}
      - CHAT_TOKEN=${CHAT_TOKEN}
      - AUDIO_BASE=${CHAT_BASE:-http://host.docker.internal:11434/v1}
      - EMBEDDING_TOKEN=${EMBEDDING_TOKEN:-${CHAT_TOKEN}}
      # useful when using proxy like litellm
      - MODEL_AS_PARAMETER=false

      # openai tts - create API key at https://platform.openai.com/api-keys
      - OPENAI_API_KEY=${OPENAI_API_KEY}

      # google cloud TTS - create API key from Google Cloud Console
      - GOOGLE_TTS_API_KEY=${GOOGLE_TTS_API_KEY}

      # microsoft Edge TTS - no key required - uses edge-tts library
      - TTS_DEFAULT_PROVIDER=${TTS_DEFAULT_PROVIDER:-microsoft}
      - TTS_AUDIO_FORMAT=${TTS_AUDIO_FORMAT:-mp3}
      - TTS_SAMPLE_RATE=${TTS_SAMPLE_RATE:-24000}
    restart: unless-stopped
    extra_hosts:
      - "host.docker.internal:host-gateway"

Tag summary

Content type

Image

Digest

sha256:fd9675aac…

Size

837.6 MB

Last updated

about 1 year ago

docker pull skhatri/docq