marimo icon indicating copy to clipboard operation
marimo copied to clipboard

ChatGPT integration

Open maelp opened this issue 11 months ago • 2 comments

Description

I'm building a dashboard at my company which would be loosely based on a "notebook-like" page, for now it integrates ChatGPT and DuckDB to hit the database

I'm thinking that having something like Marimo where the user could seamlessly work on code in notebook cells, and ask an integrated ChatGPT to correct / extend / add code (to existing and new cells) and possibly have access to cell output to get context, could be a really good "basis" that everyone with specific use-cases could work from (eg add specific knowledge on your database / operations / etc to make the assistant more powerful)

it could possibly also allow for drag-and-dropping files, downloading outputs as CSV, etc

and possibly integrate also with the ChatGPT "assistant" mode which runs code (if needed, although in this case perhaps it's just better that ChatGPT write code in cells and lets the user execute it and ask for the next goal)

Suggested solution

Add a ChatGPT integration. I guess it should probably be a kind of "plugin" or "external mode", eg not accessing it directly by writing in the cells, but rather by clicking on a side-menu and asking ChatGPT to read the notebook and manipulate cells itself

Alternative

No response

Additional context

No response

maelp avatar Feb 29 '24 20:02 maelp

Basically I'd be looking for a solution where:

  • you drop your ChatGPT API key
  • you describe the format of your database tables
  • you possibly provide a few custom methods in a library (helpers to help the assistant with common queries and requests)
  • you possibly provide a few working examples of queries and solutions to fine-tune / help the assistant

And you're good to go

maelp avatar Feb 29 '24 21:02 maelp

Related:

  • https://www.reddit.com/r/MachineLearning/comments/15269v8/p_chapyter_chatgpt_code_interpreter_in_jupyter/
  • https://jupyter-ai.readthedocs.io/en/latest/
  • https://github.com/paul-gauthier/aider

maelp avatar Feb 29 '24 21:02 maelp

Closing this - feel free to re-open with specific feature-requests/ improvements.

We now have 3 ChatGPT-like integrations:

  1. GitHub Copilot
  2. Refactor/update code from the cell dropdown (or hotkey)
  3. Prompt to create a new cell

The first is powered by your GitHub subscription. The latter you need to bring your own key. AI completion is currently free (rate-limited) on https://marimo.app/

mscolnick avatar Jun 04 '24 19:06 mscolnick