{"name":"napari-chatgpt","display_name":"napari-chatgpt | Omega","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-chatgpt.start_omega","title":"Start Omega","python_name":"napari_chatgpt._widget:OmegaQWidget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-chatgpt.start_omega","display_name":"Omega -- a ChatGPT-enabled agent","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"napari-chatgpt","version":"2024.5.15","dynamic":null,"platform":null,"supported_platform":null,"summary":"A napari plugin to process and analyse images with chatGPT.","description":"## Home of _Omega_, a napari-aware autonomous LLM-based agent specialized in image processing and analysis.\n\n[![License BSD-3](https://img.shields.io/pypi/l/napari-chatgpt.svg?color=green)](https://github.com/royerlab/napari-chatgpt/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-chatgpt.svg?color=green)](https://pypi.org/project/napari-chatgpt)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-chatgpt.svg?color=green)](https://python.org)\n[![tests](https://github.com/royerlab/napari-chatgpt/actions/workflows/test_and_deploy.yml/badge.svg)](https://github.com/royerlab/napari-chatgpt/actions/workflows/test_and_deploy.yml)\n[![codecov](https://codecov.io/gh/royerlab/napari-chatgpt/branch/main/graph/badge.svg)](https://codecov.io/gh/royerlab/napari-chatgpt)\n[![Downloads](https://pepy.tech/badge/napari-chatgpt)](https://pepy.tech/project/napari-chatgpt)\n[![Downloads](https://pepy.tech/badge/napari-chatgpt/month)](https://pepy.tech/project/napari-chatgpt)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-chatgpt)](https://napari-hub.org/plugins/napari-chatgpt)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10828225.svg)](https://doi.org/10.5281/zenodo.10828225)\n[![GitHub stars](https://img.shields.io/github/stars/royerlab/napari-chatgpt?style=social)](https://github.com/royerlab/napari-chatgpt/)\n[![GitHub forks](https://img.shields.io/github/forks/royerlab/napari-chatgpt?style=social)](https://git:hub.com/royerlab/napari-chatgpt/)\n\n\n\"image\"\n\n\nA [napari](napari.org) plugin that leverages OpenAI's Large Language Model\nChatGPT to implement _Omega_\na napari-aware agent capable of performing image processing and analysis tasks\nin a conversational manner.\n\nThis repository started as a 'week-end project'\nby [Loic A. Royer](https://twitter.com/loicaroyer)\nwho leads a [research group](https://royerlab.org) at\nthe [Chan Zuckerberg Biohub](https://royerlab.org). It\nleverages [OpenAI](https://openai.com)'s ChatGPT API via\nthe [LangChain](https://python.langchain.com/en/latest/index.html) Python\nlibrary, as well as [napari](https://napari.org), a fast, interactive,\nmulti-dimensional\nimage viewer for\nPython, [another](https://ilovesymposia.com/2019/10/24/introducing-napari-a-fast-n-dimensional-image-viewer-in-python/)\nweek-end project, initially started by Loic and [Juan Nunez-Iglesias](https://github.com/jni).\n\n# What is Omega?\n\nOmega is an LLM-based and tool-armed autonomous agent that demonstrates the\npotential for Large Language Models (LLMs) to be applied to image processing,\nanalysis and visualization.\nCan LLM-based agents write image processing code and napari widgets, correct its\ncoding mistakes, performing follow-up analysis, and controlling the napari viewer? \nThe answer appears to be yes.\n\nThe preprint can be downloaded here: [10.5281/zenodo.10828225](https://doi.org/10.5281/zenodo.10828225)\n\n\n#### In this video, I ask Omega to segment an image using the [SLIC](https://www.iro.umontreal.ca/~mignotte/IFT6150/Articles/SLIC_Superpixels.pdf) algorithm. It makes a first attempt using the implementation in scikit-image but fails because of an inexistent 'multichannel' parameter. Realizing that, Omega tries again, and this time succeeds:\n\nhttps://user-images.githubusercontent.com/1870994/235768559-ca8bfa84-21f5-47b6-b2bd-7fcc07cedd92.mp4\n\n#### After loading a sample 3D image of cell nuclei in napari, I asked Omega to segment the nuclei using the Otsu method. My first request was vague, so it just segmented foreground versus background. I then ask to segment the foreground into distinct segments for each connected component. Omega does a rookie mistake by forgetting to 'import np'. No problem; it notices, tries again, and succeeds:\n\nhttps://user-images.githubusercontent.com/1870994/235769990-a281a118-1369-47aa-834a-b491f706bd48.mp4\n\n#### In this video, one of my favorites, I ask Omega to make a 'Max color projection widget.' It is not a trivial task, but it manages!\n\nhttps://github.com/royerlab/napari-chatgpt/assets/1870994/bb9b35a4-d0aa-4f82-9e7c-696ef5859a2f\n\nAs LLMs improve, Omega will become even more adept at handling complex\nimage processing and analysis tasks. GPT 4.0 has been a significant upgrade\ncompared to GPT 3.5, and many of the videos (see below and here) are highly reproducible, \nwith a typically 90% success rate (see preprint for a reproducibility analysis).\nWhile open-source models are promising and rapidly improving, they must get better to run Omega reliably. \nMore recent models by OpenAI's competitors, such as Google and Anthropic, are great news, \nbut Omega still needs to support these newer models fully -- it seems every week comes with a new batch of models.\n\nOmega could eventually help non-experts process and analyze images, especially\nin the bioimage domain.\nIt is also potentially valuable for educative purposes as it could\nassist in teaching image processing and analysis, making it more accessible.\nAlthough ChatGPT, which powers Omega, may still need to be on par with an expert image\nanalyst or computer vision expert, it is just a matter of time...\n\nOmega holds a conversation with the user and uses different tools to answer questions, \ndownload and operate on images, write widgets for napari, and more.\n\n## Omega's Built-in AI-Augmented Code Editor\n\nThe Omega AI-Augmented Code Editor is a new feature within Omega, designed to enhance the Omega's user experience. This editor is not just a text editor; it's a powerful interface that interacts with the Omega dialogue agent to generate, optimize, and manage code for advanced image analysis tasks.\n\n\n\n#### Key Features\n- **Code Highlighting and Completion**: For ease of reading and writing, the code editor comes with built-in syntax highlighting and intelligent code completion features.\n- **LLM-Augmented Tools**: The editor is equipped with AI tools that assist in commenting, cleaning up, fixing, modifying, and performing safety checks on the code.\n- **Persistent Code Snippets**: Users can save and manage snippets of code, preserving their work across multiple Napari sessions.\n- **Network Code Sharing (Code-Drop)**: Facilitates the sharing of code snippets across the local network, empowering collaborative work and knowledge sharing.\n\n#### Usage Scenarios\n- **Widget Creation**: Expert users can create widgets using the Omega dialogue agent and retain them for future use.\n- **Collaboration**: Share custom widgets with colleagues or the community, even if they don't have access to an API key.\n- **Learning**: New users can learn from the AI-augmented suggestions, improving their coding skills in Python and image analysis workflows.\n\nYou can find more information in the corresponding [wiki page](https://github.com/royerlab/napari-chatgpt/wiki/OmegaCodeEditor).\n\n----------------------------------\n\n## Omega's Installation instructions:\n\nAssuming you have a Python environment with a working napari installation, you can simply:\n\n pip install napari-chatgpt\n\nOr install the plugin from napari's plugin installer.\n\nFor detailed instructions and variations, check [this page](http://github.com/royerlab/napari-chatgpt/wiki/InstallOmega) of our wiki.\n \n## Requirements:\n\nYou need an OpenAI key; there is no way around this, I have been experimenting with \nother models, including open-source models, but right now, the best results, by far, are obtained with ChatGPT 4 (and to\na lesser extent 3.5). Check [here](https://github.com/royerlab/napari-chatgpt/wiki/OpenAIKey) for details on how to get your OpenAI key. In particular, check [this](https://github.com/royerlab/napari-chatgpt/wiki/AccessToGPT4) for how to gain access to GPT-4 models.\n\n## Usage:\n\nCheck this [page](https://github.com/royerlab/napari-chatgpt/wiki/HowToStartOmega) of our [wiki](https://github.com/royerlab/napari-chatgpt/wiki) for details on how to start Omega. \n\n## Tips, Tricks, and Example prompts:\n\nCheck our guide on how to prompt Omega and some examples [here](https://github.com/royerlab/napari-chatgpt/wiki/Tips&Tricks).\n\n## Video Demos:\n\nYou can check the original release videos [here](https://github.com/royerlab/napari-chatgpt/wiki/VideoDemos).\nYou can also find the latest preprint videos on [Vimeo](https://vimeo.com/showcase/10983382).\n\n## How does Omega work?\n\nCheck our preprint here: [10.5281/zenodo.8240289](10.5281/zenodo.8240289)\nand our [wiki page](https://github.com/royerlab/napari-chatgpt/wiki/OmegaDesign) on Omega's design and architecture.\n\n## Cost:\n\nDeveloping the initial version of Omega cost me $13.97, hardly a fortune. \nOpenAI [pricing](https://openai.com/pricing) on ChatGPT 4 is very reasonable at 0.01 dollars per 1K tokens, which means $1 per 750000 words. \n\nNote: you can limit the burn rate to a certain amount of dollars per month, just\nin case you let Omega think over the weekend and forget to stop it (don't worry, \nthis is actually **not** possible).\n\n## Disclaimer:\n\nDo not use this software lightly; it will download libraries of its own volition\nand write any code it deems necessary; it might do what you ask, even\nif it is a very bad idea. Also, beware that it might _misunderstand_ what you ask and\nthen do something bad in ways that elude you. For example, it is unwise to use Omega to delete \n'some' files from your system; it might end up deleting more than that if you are unclear in \nyour request. \nOmega is generally safe as long as you do not make dangerous requests. To be 100% safe, and\nif your experiments with Omega could be potentially problematic, I recommend using this \nsoftware from within a sandboxed virtual machine.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\nBE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR\nTHE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n## Contributing\n\nContributions are extremely welcome. Tests can be run with [tox], please ensure\nthe coverage at least stays the same before you submit a pull request.\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-chatgpt\" is free and open-source software\n\n## Issues\n\nIf you encounter any problems, please [file an issue] along with a detailed\ndescription.\n\n[napari]: https://github.com/napari/napari\n\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n\n[@napari]: https://github.com/napari\n\n[MIT]: http://opensource.org/licenses/MIT\n\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n\n[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt\n\n[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt\n\n[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n\n[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt\n\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n\n[file an issue]: https://github.com/royerlab/napari-chatgpt/issues\n\n[napari]: https://github.com/napari/napari\n\n[tox]: https://tox.readthedocs.io/en/latest/\n\n[pip]: https://pypi.org/project/pip/\n\n[PyPI]: https://pypi.org/\n","description_content_type":"text/markdown","keywords":null,"home_page":"https://github.com/royerlab/napari-chatgpt","download_url":null,"author":"Loic A. Royer and contributors","author_email":"royerloic@gmail.com","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Developers","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Topic :: Scientific/Engineering :: Image Processing"],"requires_dist":["numpy","magicgui","scikit-image","qtpy","QtAwesome","langchain ==0.2.0rc2","langchain-community ==0.2.0rc1","langchain-openai ==0.1.6","langchain-anthropic ==0.1.11","openai ==1.29.0","anthropic","fastapi","uvicorn","websockets","tiktoken","wikipedia","lxml","gTTS","playsound","matplotlib","xarray","arbol","playwright","duckduckgo-search ==5.3.0b4","ome-zarr","transformers","cryptography","tabulate","numba","imageio[ffmpeg,pyav]","notebook","nbformat","jedi","black","lxml-html-clean","tox ; extra == 'testing'","pytest ; extra == 'testing'","pytest-cov ; extra == 'testing'","pytest-qt ; extra == 'testing'","napari ; extra == 'testing'","pyqt5 ; extra == 'testing'"],"requires_python":">=3.9","requires_external":null,"project_url":["Bug Tracker, https://github.com/royerlab/napari-chatgpt/issues","Documentation, https://github.com/royerlab/napari-chatgpt#README.md","Source Code, https://github.com/royerlab/napari-chatgpt","User Support, https://github.com/royerlab/napari-chatgpt/issues"],"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}