Metadata-Version: 2.1
Name: dangermode
Version: 0.2.0
Summary: ChatGPT Danger Mode for Jupyter
Home-page: https://github.com/rgbkrk/dangermode
Author: Kyle Kelley
Author-email: rgbkrk@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: fastapi (>=0.95.0,<0.96.0)
Requires-Dist: ipython (>=8.12.0,<9.0.0)
Requires-Dist: jupyter-console (>=6.6.3,<7.0.0)
Requires-Dist: uvicorn (>=0.21.1,<0.22.0)
Description-Content-Type: text/markdown

# 🚨 Dangermode

## Overview

🚨 Dangermode is a ChatGPT Plugin written with Python and FastAPI that allows users to execute code snippets in an IPython session.

⚠️ Dangermode is a proof-of-concept and should not be used in production. It is not secure and should not be used to execute code on a remote server. ⚠️

## Features

- Execute code snippets in an IPython session through ChatGPT.
- Inspect variables and view results in real-time.
- Serve images and display data to ChatGPT.

## Get started, the recommended way

Since you don't want to unleash ChatGPT on your own machine, lab, etc. Build the docker image and run it locally like this:

```
docker build . -t dangermode
docker run -p 8000:8000 -i -t --rm dangermode
```

## (SCARY DANGER MODE) Installation

To install the Dangermode package, use the following command:

```bash
pip install dangermode
```

## Usage

🚨🚨🚨 YOU ARE GIVING AN AI ACCESS TO YOUR ENTIRE COMPUTER. 🚨🚨🚨

After installing the package, you can use the Dangermode plugin in your IPython session. Here's how to get started:

1. Import the `dangermode` package in your IPython session.

```python
import dangermode
```

2. Activate the Dangermode plugin.

```python
dangermode.activate_dangermode()
```

3. Use ChatGPT to run code snippets and interact with your IPython session.

## API Endpoints

- `GET /openapi.json`: Retrieve the OpenAPI JSON configuration.
- `GET /.well-known/ai-plugin.json`: Retrieve the AI plugin JSON configuration.
- `GET /images/{image_name}`: Retrieve an image by its name.
- `GET /api/variable/{variable_name}`: Retrieve the value of a variable by its name.
- `POST /api/run_cell`: Execute a code cell and return the result.

## Contributing

Please do. I can't let Large Language Models write all of it.

Please fork the repository, make your changes, and submit a pull request.

## License

Dangermode is released under the BSD 3-Clause License. See [LICENSE](LICENSE) for more information.

## Contact

If you have any questions or feedback, please feel free to reach out to the author, Kyle Kelley, on Twitter at [@KyleRayKelley](https://twitter.com/KyleRayKelley) or just open an issue on the repository.

