Mintplex-Labs / anything-llm

The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, and more.
https://anythingllm.com
MIT License
26.97k stars 2.71k forks source link

[BUG]: Weaviate integration not working #896

Closed dblinick closed 8 months ago

dblinick commented 8 months ago

How are you running AnythingLLM?

Docker (local)

What happened?

Getting error when using Weaviate as vector store: image

Storage of document is working (I can see it in the weaviate logs when I store a doc) - but it looks like whatever function is supposed to call weaviate is failing (I don't even see it connect on the weaviate side).

Here is the error from the docker logs: anything-llm | TypeError: Cannot read properties of null (reading 'map') anything-llm | at Object.similarityResponse (/app/server/utils/vectorDbProviders/weaviate/index.js:93:45) anything-llm | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) anything-llm | at async Object.performSimilaritySearch (/app/server/utils/vectorDbProviders/weaviate/index.js:366:47) anything-llm | at async streamChatWithWorkspace (/app/server/utils/chats/stream.js:110:9) anything-llm | at async /app/server/endpoints/chat.js:84:9

Docker image was pulled today using :latest

Are there known steps to reproduce?

No response

shatfield4 commented 8 months ago

How are you using Weaviate? Their cloud hosted version or local version? I have just tested this using their cloud hosted version and cannot replicate this bug. Also which embedding provider are you using?

dblinick commented 8 months ago

Hi Sean, I am using the locally hosted version (docker) - I don't have access to my machine at the moment to check the specific version, but will update this thread when i do. Embeddings are being done by ollama (nomic-embed-text) - work fine with lancedb - and as mentioned previously - i don't get any errors when the files embed.

EDIT Just looked at the weaviate docs - docker image i am using is: cr.weaviate.io/semitechnologies/weaviate:1.24.2

timothycarambat commented 8 months ago

Trying to replicate: docker pull cr.weaviate.io/semitechnologies/weaviate:1.24.2 image hash: 977512c2586faabebc30e6f7b59eec075d17fe135e48a74d32e4efbf250294bf

version: '3.4'
services:
  weaviate:
    command:
    - --host
    - 0.0.0.0
    - --port
    - '8080'
    - --scheme
    - http
    image: cr.weaviate.io/semitechnologies/weaviate:1.24.2
    ports:
    - 8080:8080
    - 50051:50051
    restart: on-failure:0

docker compose up -d

-> Weaviate is confirmed running at http://localhost:8080

docker pull mintplexlabs/anythingllm image hash: 90884c31672a035c4a2c829eeae5c0988a65f54ee39aa99f762a46c80ae5267d

In AnythingLLM, Weaviate connection is input as http://host.docker.internal:8080 due to loopback in the container and Weaviate running on host network. No auth input.

shatfield4 commented 8 months ago

Closing since we cannot replicate this bug.

ghulamulhassanali commented 7 months ago

Facing the same issue. Using AnythingLLM's Mac silicone version with OpenAI's embeddings and LLM and vector database by Weaviate both local and cloud deployments. The embeddings are successfully created I can see the number of objects as 1453 from the same file, on both local and cloud deployment.

Screenshot 2024-04-03 at 14 58 05

Application worked with LanceDB as the vector database.