googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.19k stars 718 forks source link

Implement Branching Chat Interactions in Colab Notebook #3970

Open TaylorChyi opened 1 year ago

TaylorChyi commented 1 year ago

Is your feature request related to a problem? Please describe. When working with Colab notebooks, I often find it challenging to maintain, edit, and view different code trajectories without resorting to deleting code, using extensive comments, or maintaining multiple files. This can lead to cluttered notebooks and reduced code readability.


Describe the solution you'd like I am inspired by the branching chat interactions in ChatGPT, where users can seamlessly switch, edit, and view different conversation paths. I propose to integrate a similar feature into Colab notebooks. This would allow users to:

  1. Create branching code paths within a single notebook.
  2. Easily switch between different code trajectories without affecting the main code.
  3. Maintain code readability by ensuring each code block serves a singular purpose.

Describe alternatives you've considered

  1. Using extensive comments to differentiate between code paths, but this can lead to clutter.
  2. Maintaining multiple versions of the same notebook, which can be cumbersome and confusing.
  3. Deleting non-essential code blocks, but this can lead to loss of valuable insights and iterations.

Additional context The branching chat interactions in ChatGPT have proven to be highly effective for managing different conversation trajectories. Implementing a similar feature in Jupyter notebooks can revolutionise the way computational experiments are conducted, making them more organised, readable, and efficient. This will especially benefit researchers and developers who frequently experiment with different code paths and require a streamlined way to manage them.

cperry-goog commented 1 year ago

thanks for the feedback, I haven't seen their branching yet, I'll take a look and consider.