Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Ability to run ICortex notebooks as scripts, argument & context magics #31

@osolmaz

Description

@osolmaz

The whole point of ICortex is to create reusable tools (i.e. scripts) using plain English. The %prompt magic already supports adding new arguments through the service API—a similar functionality can be envisioned to inject arguments into the context through a simplified version of an argparse-like API.

Ultimately, the user should be able to call notebooks like this:

icortex my_notebook.ipynb file_to_be_processed -o output_file -p 123

Similar ideas floated around for IPython online e.g. here.

getopt/argparse-like interfaces are known for their versatility—this project uses that interface to auto-generate GUIs from parser objects. We can leverage this versatility to let users create plain English scripts that can take any number of arguments, and eventually, be able to call each other.

Goals

Make it

  • Opinionated
  • Simple
  • Flexible

Caveats

Any argument that is injected into the context will be fed to the language model eventually as a string, so the API would need to let the users be able to specify how the arguments should be formatted during string conversion.

TBD

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions