Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Quickstart code #165

Closed
pguardiario opened this issue Nov 11, 2024 · 3 comments
Closed

Error with Quickstart code #165

pguardiario opened this issue Nov 11, 2024 · 3 comments
Assignees

Comments

@pguardiario
Copy link

🐛 Describe the bug

In Line 12:
ragApplication.addLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' })
it's causing this
Uncaught TypeError TypeError: loader.getUniqueId is not a function
at addLoader (c:\cygwin64\home\pguar\node\llm\node_modules.pnpm@[email protected]@langchain[email protected]\node_modules@llm-tools\embedjs\src\core\rag-application.js:140:33)
at addLoader (c:\cygwin64\home\pguar\node\llm\node_modules.pnpm@llm-tools+embedjs@0.1.17_@langchain[email protected]\node_modules@llm-tools\embedjs\src\core\rag-application.js:127:21)
at (c:\cygwin64\home\pguar\node\llm\test.mjs:12:16)
at processTicksAndRejections (<node_internals>/internal/process/task_queues:95:5)

@adhityan
Copy link
Collaborator

Hi, this syntax is not supported. Please try using a loader -

ragApplication.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' }));

In an older version of the library, dynamic loaders (without creating an explicit instance of the loader) was supported. This has been discontinued since version 0.1.x. This was necessary to enable the move to monorepos but is expected to be re-enabled at a later point of time.

@pguardiario
Copy link
Author

pguardiario commented Nov 14, 2024 via email

@adhityan
Copy link
Collaborator

Yes. The QuickStart is updated. And yes, the loaders need to be awaited. The quick start reflects this correctly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants