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: Import Error while creating SelfQueryRetriever #12631

Closed
hasnain3142 opened this issue Oct 31, 2023 · 4 comments
Closed

DOC: Import Error while creating SelfQueryRetriever #12631

hasnain3142 opened this issue Oct 31, 2023 · 4 comments
Labels
Ɑ: doc loader Related to document loader module (not documentation) 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder

Comments

@hasnain3142
Copy link

hasnain3142 commented Oct 31, 2023

Issue with current documentation:

Import Error while creating SelfQueryRetriever
retriever = SelfQueryRetriever.from_llm( llm, vectordb, document_content_description, metadata_field_info, verbose=True)

The documentation mentions it requires lark but doesn't explicitly mention its version. I am getting an import error.
image

Idea or request for content:

The documentation should mention specifically that lark version greater then 1.1.5 is required.

pip install lark==1.1.5

image

But this also didn't solve the issue.

@dosubot dosubot bot added Ɑ: doc loader Related to document loader module (not documentation) 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder labels Oct 31, 2023
@dosubot
Copy link

dosubot bot commented Oct 31, 2023

🤖

Hello @beinghasnain16,

I'm here to assist you with your issue. I'm an AI developed to help with bugs, answer questions, and guide you in contributing to projects.

I understand you're having an import error when using the SelfQueryRetriever class in the LangChain framework with the latest version of lark. You've suggested that the documentation should specify that lark version 1.1.5 is required.

I agree that specifying the required version of dependencies in the documentation can help avoid such issues. However, I couldn't find any specific information about this import error in the LangChain repository. It would be helpful if you could provide more details about the error message you're encountering.

In the meantime, if you've found that using lark version 1.1.5 resolves the issue, it's a good idea to stick with that version. You can install it using the command you've provided:

pip install lark==1.1.5

I hope this helps! If you have any more questions or need further clarification, feel free to ask.

Best,
Dosu

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.

@hasnain3142
Copy link
Author

The code start working after commenting this line of code,

image

Copy link

dosubot bot commented Feb 1, 2024

Hi, @beinghasnain16,

I'm helping the LangChain team manage their backlog and am marking this issue as stale. From what I understand, you raised an issue regarding an import error when using the SelfQueryRetriever class in the LangChain framework due to a missing mention of the required lark version in the documentation. You suggested specifying that lark version 1.1.5 or greater is needed, and even after installing lark version 1.1.5, the issue persisted. However, you later mentioned that the code started working after commenting out a specific line.

Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution to the LangChain framework! If you have any further questions or concerns, feel free to reach out.

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Feb 1, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2024
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Feb 8, 2024
@threes-was-taken
Copy link

@dosu I'm having the same issue. Is there another issue in this repository that relates to this one? Or could tag a maintainer to bring this to their attention?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: doc loader Related to document loader module (not documentation) 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder
Projects
None yet
Development

No branches or pull requests

2 participants