marella / chatdocs

Chat with your documents offline using AI.
MIT License
683 stars 97 forks source link

Asking a question gives "Index not found, please create an instance before querying" #72

Closed williamblair333 closed 12 months ago

williamblair333 commented 12 months ago

After typing chatdocs chat and asking a question, I get the error shown in the title. I'm fairly certain I followed all the instructions. This is running in a docker container as well. Thanks for the time.

Dockerfile

# Use Debian Slim as the base image
FROM python:3.11.5-slim-bookworm

# Metadata as described in the Docker best practices
LABEL maintainer="your-email@example.com"
LABEL version="1.0"
LABEL description="Docker image for chatdocs"

# Set environment for working directory
WORKDIR /app

# Install essential libraries
RUN apt-get update \
    && apt-get install --yes --no-install-recommends build-essential python3-dev 1>/dev/null \
    && rm -rf /var/lib/apt/lists/*  1>/dev/null

# Install chatdocs
RUN pip install chatdocs

# Download the AI models for chatdocs
RUN chatdocs download

# Create a directory for documents and db
RUN mkdir --parents /app/documents /app/db

# Open up the port for the web UI
EXPOSE 5000

# Keep container running
CMD ["tail", "-f", "/dev/null"]

docker-compose.yaml

version: '3'

services:
  chatdocs:
    build:
      context: .
      dockerfile: Dockerfile
    image: chatdocs:latest
    ports:
      - "500:5000"
    volumes:
      - /app/documents:/app/documents
      - /app/db:/app/db

    command: >
      sh -c "chatdocs add /app/documents &&
             chatdocs ui"        
williamblair333 commented 12 months ago

error.log

williamblair333 commented 12 months ago

Error was with my dockerfile and docker-compose.yaml.