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

DOC: Missing dependency when going through the Quickstart section #15845

Closed
rokn opened this issue Jan 10, 2024 · 1 comment · Fixed by #15860
Closed

DOC: Missing dependency when going through the Quickstart section #15845

rokn opened this issue Jan 10, 2024 · 1 comment · Fixed by #15860
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder

Comments

@rokn
Copy link
Contributor

rokn commented Jan 10, 2024

Issue with current documentation:

When running the WebBaseLoader it requires bs4 installed which is not mentioned in the docs.
https://github.com/langchain-ai/langchain/blob/21a153894917e530cbe82a778be6f9cf10c9ae5f/docs/docs/get_started/quickstart.mdx#L185C1-L194C1

Idea or request for content:

I think it should be mentioned just like faiss a few lines below.

Copy link

dosubot bot commented Jan 10, 2024

🤖

Hey @rokn! I'm Dosu, a friendly bot here to lend a hand with bugs, answer your questions, and guide you on your contributor journey while a human maintainer gets back to you. Nice to meet you! 😃 Let's get to work on this issue.

Thank you for bringing this to our attention. It seems there was a similar issue in the past (crash because of missing bs4 dependency in version 2.12) which was resolved by making bs4 a local import in recursive_url_loader.py (Make bs4 a local import in recursive_url_loader.py).

However, it's important to note that bs4 (beautifulsoup4) is not used in the WebBaseLoader class in the LangChain codebase. The context provided does not mention or show any usage of a WebBaseLoader class. The code provided is for a class named BS4HTMLParser which does use bs4 to parse HTML files. You can find the relevant code here.

As for the bs4 dependency, it is listed as an optional dependency in the pyproject.toml file of LangChain. Here is the relevant line from the pyproject.toml file:

beautifulsoup4 = {version = "^4", optional = true}

This line indicates that beautifulsoup4, which is imported as bs4 in Python, is an optional dependency for LangChain. If WebBaseLoader requires bs4, then it would be appropriate to include bs4 as a required dependency in the Quickstart documentation.

I hope this clarifies the situation. If you have further questions or need additional clarification, please let me know.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder label Jan 10, 2024
@hwchase17 hwchase17 linked a pull request Jan 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant