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

Document file types supported by /learn #406

Closed
JasonWeill opened this issue Oct 11, 2023 · 5 comments · Fixed by #816
Closed

Document file types supported by /learn #406

JasonWeill opened this issue Oct 11, 2023 · 5 comments · Fixed by #816
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@JasonWeill
Copy link
Collaborator

Problem

The file types supported by the /learn command are listed in the source code:

SUPPORTED_EXTS = {
".py",
".md",
".R",
".Rmd",
".jl",
".sh",
".ipynb",
".js",
".ts",
".jsx",
".tsx",
".txt",
}

These file types are not documented in our user-facing documentation, though, as @labarba noted here: https://discourse.jupyter.org/t/jupyter-ai-brings-large-language-models-to-jupyter-notebooks/20747

Proposed Solution

Document the supported file types for the document loader.

Additional context

We might need to update the user interface as well, such as if a user attempts to /learn a file whose extension is not supported.

@JasonWeill JasonWeill added enhancement New feature or request documentation Improvements or additions to documentation labels Oct 11, 2023
@labarba
Copy link

labarba commented Oct 11, 2023

Thank you for posting this issue, Jason!

Interesting to note that when I wrote the short lesson on Jupyter AI /learn (http://go.gwu.edu/engcomp7lesson2), I actually landed on a different line of the source code that lists fewer file extensions, as follows:

extensions={'.py', '.md', '.R', '.Rmd', '.jl', '.sh', '.ipynb', '.js', '.ts'},

Thus, I wrote that .txt in particular is not supported. Can you clarify how these two lines of code interact? Did I end up in an outdated version of the code? Or what?

@JasonWeill
Copy link
Collaborator Author

@labarba That link is to @ellisonbg 's fork of jupyter-ai, and is from an older version of the code when we used Ray to schedule tasks. Today we use Dask, and the permalink above is from the main branch.

@labarba
Copy link

labarba commented Oct 11, 2023

Oh, yes... I didn't notice that I was not in the main branch. Eek! I'll have to correct the lesson. I now see

        extensions={'.py', '.md', '.R', '.Rmd', '.jl', '.sh', '.ipynb', '.js', '.ts', '.jsx', '.tsx', '.txt'},

in https://github.com/ellisonbg/jupyter-ai/blob/e6a78ad447c9f8ea744ac7ca92aedc7492f74076/packages/jupyter-ai/jupyter_ai/document_loaders/directory.py#L47

@labarba
Copy link

labarba commented Oct 11, 2023

OK, yes, I'm in the wrong place, and I don't know how I ended up there. Thanks! 😊

@labarba
Copy link

labarba commented Jun 3, 2024

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants