textcortex / icortex

A no-code development framework—Let AI do the coding for you 🦾

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

osolmaz opened this issue · comments

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

Implemented in #32