-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support for markdown cells #38
Comments
Thanks @wangshaonan! Copying some comments from slack for our records: the %%explain syntax is an iPython “magic” command. those work by “hijacking” the contents of code cells and passing them to the relevant functions (specified wherever the magic command is defined/registered). the way chatify works is that the contents of the code cell gets sent to the language model, along with a pre-defined prompt that depends on what you select in the chatify menus. unfortunately there’s no built-in way of running magic commands on markdown cells, which is where those notes are defined. it’d be nice to support markdown cells, though! and support for other media, like videos, images, etc., would be neat too. i do suspect that it is possible to support those things, but i think it’d require (a) some hacking to change how those markdown cells are rendered and (b) some thinking about how the implementation would work. for example:
one could also imagine creating a new magic command that works like %%explain, but instead of sending the text of the current code cell (where the magic command is called), it could instead read in the current notebook and returns the content of one or more other cells, potentially including markdown cells. how should the syntax for that command work? maybe something like: if you follow an %%explain command with a non-negative integer, it sends the contents of that cell instead of the current cell (where the current cell is the default if no cell ID is specified)? videos are an interesting case too. videos are displayed via iPython widgets, which are called in code cells. technically you can already “explain” those cells using chatify. however, chatify interprets those cells as code rather than trying to guess at what the code does on an arbitrarily deep level (e.g., by following links, actually running the code, etc.). one could imagine hard-coding in some tweaks, e.g. if the only code a cell contains is a call to an ipython widget displaying a video, maybe there could be an additional tab that comes up that enables you do do something related to the content of that video (e.g., answering questions about the video’s transcript, etc.). we’d need to then figure out what to do if multiple videos are embedded in a single code cell (e.g., do you then get multiple extra “video” tabs?). and maybe it’d be good to support other types of media too, like interactive demos, embedded web pages, audio, animations, etc. anyways, cool idea! |
The current Chatify only works on code. I think it would be more useful to make Chatify work on notes and even videos. It doesn't have to be embedded in Jupyter Notebook, a chatbot like the automatic customer service we saw on various applications including shopping websites would also be helpful. In that way, whatever question we have, we can directly open the chatbot and ask questions.
The text was updated successfully, but these errors were encountered: