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

Add --format code that inserts new code cell using ipylab #43

Closed
JasonWeill opened this issue Apr 7, 2023 · 0 comments · Fixed by #57
Closed

Add --format code that inserts new code cell using ipylab #43

JasonWeill opened this issue Apr 7, 2023 · 0 comments · Fixed by #57
Labels
enhancement New feature or request @jupyter-ai/magics
Milestone

Comments

@JasonWeill
Copy link
Collaborator

JasonWeill commented Apr 7, 2023

Problem

When the notebook author wants a generative AI model to generate code, the output is in markdown or raw (text) format, so the notebook author cannot run the generated code as they can run other code in their notebook.

Proposed Solution

Add a --format code format option. When the user runs a %%ai magic command with this option, Jupyter AI inserts a new code cell using ipylab that contains the source code produced.

Update the example notebooks and documentation to include information about --format code.

Additional context

The --format code option should apply a prompt template to ensure that only source code, with no plain-text explanations, get output. See #42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/magics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant