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

Provide meaningful message if applying /learn to a directory that is empty or only contains unsupported files. #749

Open
michaelchia opened this issue Apr 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@michaelchia
Copy link
Contributor

Problem

If user applies /learn to a directory that is empty or only contains unsupported files, the message given will be "Learn documents in {load_path} failed. enough values to unpack (expected 2, got 0).".

response = f"""Learn documents in **{load_path}** failed. {str(e)}."""

This is not very helpful to the user, especially when it may not be obvious to the user what all the supported extensions are.

Proposed Solution

Provide a more meaningful error response telling the user it could not find any supported files and perhaps indicating the supported extension types.

Additional context

@michaelchia michaelchia added the enhancement New feature or request label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant