Error Installing Local-AI-PACKAGED Issue

Got issue trying to install the LOCAL-AI-PACKAGED.

Docker containers are successfully built and running, but I get an error on the “Clear Old Vectors” step. I’ve done a quick video of my testing steps. I’m including the error I get in the n8n node. Any help would be appreciated.

Thanks
Don Shults


n8n - Langchain error:

1.72.1 (Self Hosted)

Stack trace

TypeError: fetch failed at node:internal/deps/undici/undici:13185:13 at processTicksAndRejections (node:internal/process/task_queues:95:5) at fetchJson (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:135:22) at /usr/local/lib/node_modules/n8n/node_modules/@qdrant/js-client-rest/dist/cjs/api-client.js:46:26 at handler (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:156:16) at /usr/local/lib/node_modules/n8n/node_modules/@qdrant/js-client-rest/dist/cjs/api-client.js:32:24 at handler (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:156:16) at fetchUrl (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:162:22) at Object.fun [as getCollections] (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/openapi-typescript-fetch/dist/cjs/fetcher.js:168:20) at QdrantClient.getCollections (/usr/local/lib/node_modules/n8n/node_modules/@qdrant/js-client-rest/dist/cjs/qdrant-client.js:836:26) at QdrantVectorStore.ensureCollection (/usr/local/lib/node_modules/n8n/node_modules/@langchain/qdrant/dist/vectorstores.cjs:230:26) at Function.fromExistingCollection (/usr/local/lib/node_modules/n8n/node_modules/@langchain/qdrant/dist/vectorstores.cjs:294:9)

Thanks for posting the video along with your question! What is the URL in that code snippet for Qdrant currently? If it’s just “localhost:6333” or “host.docker.internal:6333”, could you try changing that to “qdrant:6333”?

I’ve tried all three: localhost:6333. qdrant:6333 and host.docker.internal:6333
The only one that connects is the host.docker.internal:6333.

Retrying after shutting down and rebuilding resulted in no change.

Just an FYI: I’ve been able to connect and write to the the Vector Container directly. Here’s the code I used: So I believe the container is working ok.

import requests
import json

collection_name = "documents"
url = f"http://localhost:6333/collections/{collection_name}"
payload = {
    "vectors": {
        "size": 1536,
        "distance": "Cosine"
    }
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, data=json.dumps(payload), headers=headers)
print(response.status_code, response.text)```

I don’t think the debugging info really helped (it didn’t actually fail in the code) because I think the message was pretty clear that the response returned a null value. But I’d have to see the complete contents of the “Clear Old Vectors” to understand what was going on.

@DonShults Sorry for the delayed response - there is a chance that Langchain updated and now the code is just outdated… I’m not sure why else you could be getting this null return.

One of the downsides to using an abstraction layer like Langchain is the sometimes breaking updates.

I’m guessing though that it wouldn’t take much to tweak it to work with the new version of Langchain if that really is the problem!