llm-tools / embedJs

A NodeJS RAG framework to easily work with LLMs and embeddings
https://llm-tools.mintlify.app/get-started/introduction
Apache License 2.0
333 stars 40 forks source link

LanceDb not working? #122

Closed sivertbjo closed 1 month ago

sivertbjo commented 1 month ago

Trying to follow the docs (as a nodejs noob), and can't get it to work using LanceDb:

[`Waiting for the debugger to disconnect... node:internal/modules/esm/resolve:265 throw new ERR_MODULE_NOT_FOUND( ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\sivebjor\OneDrive - Viaplay Group\Desktop\p4chat-nodejs\node_modules\@llm-tools\embedjs\vectorDb\lance' imported from C:\Users\sivebjor\OneDrive - Viaplay Group\Desktop\p4chat-nodejs\app.js at finalizeResolution (node:internal/modules/esm/resolve:265:11) at moduleResolve (node:internal/modules/esm/resolve:933:10) at defaultResolve (node:internal/modules/esm/resolve:1169:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38) at ModuleWrap. (node:internal/modules/esm/module_job:87:39) at link (node:internal/modules/esm/module_job:86:36) { code: 'ERR_MODULE_NOT_FOUND', url: 'file:///C:/Users/sivebjor/OneDrive%20-%20Viaplay%20Group/Desktop/p4chat-nodejs/node_modules/@llm-tools/embedjs/vectorDb/lance' }`]

Any ideas? It's missing the vectorDb-folder inside node_modules.

adhityan commented 1 month ago

The library had a refactor recently and the docs were not yet updated. Could you look at the updated documentation here - https://llm-tools.mintlify.app/components/vector-databases/lancedb and see if that addresses the issue for you?

sivertbjo commented 1 month ago

I ended up using a different solution, but that seems like the fix. Will test it in the future. Thanks!