Skip to content

Conversation

@sankalpG007
Copy link

Summary

Enhanced the %llm magic command to support both single-line and multiline inputs in Jupyter Notebooks.

Details

  • Implemented cell=None parameter for compatibility with both line and cell magic usage.
  • Automatically sets next cell input with generated code when not using --print.
  • Ensured compatibility with get_ipython().set_next_input() for seamless workflow.

Why this change

This improves usability by allowing users to write longer prompts or code instructions in cell mode, not just a single line.

Testing

  • Verified %llm works as both line and cell magic.
  • Code passes black and ruff formatting checks.

🟩 Hacktoberfest Contribution
This PR adds new functionality following the contribution guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant