Name | gpt-magic JSON |
Version |
0.2.0
JSON |
| download |
home_page | |
Summary | A Jupyter/IPython magic command for generating code using GPT. |
upload_time | 2023-04-01 19:41:49 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.6 |
license | MIT License Copyright (c) 2023 BIFF Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
jupyter
ipython
gpt
ai
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# GPT magic
A Jupyter/IPython magic command for generating code using GPT
## Example
Generating code with GPT by loading the extension and prefixing your line with `%gpt`.

## Install
Install with pip
```python
pip install gpt-magic
````
Please note that users will need to provide their own OpenAI API key. Set an environment variable called `OPEN_AI_KEY` with your key. Or pass the API key when loading the extension, by running the following line before %load_ext gpt_magic:
```python
import os
os.environ["OPENAI_API_KEY"] = "your_openai_api_key_here"
```
## Usage
```python
%load_ext gpt
%gpt "Your request here"
```
## Model
The current default is the gpt-3-turbo model, but can be changed using `OPENAI_MODEL` environmental variable.
Using GPT-4 example
```python
import os
os.environ["OPENAI_MODEL"] = "gpt-4"
```
## Arguments
### Chat
You can enable memory of all previous requests and responses with the `-c` argument. By default it's memory-less.
```python
%gpt -c "Write a function which calculates the average of a numpy array"
```
### Temperature
You can set the temperature with `-t` argument. The default is 0.
```python
%gpt -t 0.5 "Write a function which calculates the average of a numpy array"
```
Raw data
{
"_id": null,
"home_page": "",
"name": "gpt-magic",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "jupyter,ipython,gpt,ai",
"author": "",
"author_email": "BIFF <info@biff.ai>",
"download_url": "https://files.pythonhosted.org/packages/6e/a3/0e2b6e14c9ea0720552801fc5f692f293fb6b3b9b6c94b85f1fbb509f218/gpt-magic-0.2.0.tar.gz",
"platform": null,
"description": "# GPT magic\nA Jupyter/IPython magic command for generating code using GPT\n\n## Example\nGenerating code with GPT by loading the extension and prefixing your line with `%gpt`.\n\n\n\n## Install\n\nInstall with pip\n```python\npip install gpt-magic\n````\n\nPlease note that users will need to provide their own OpenAI API key. Set an environment variable called `OPEN_AI_KEY` with your key. Or pass the API key when loading the extension, by running the following line before %load_ext gpt_magic:\n\n```python\nimport os\nos.environ[\"OPENAI_API_KEY\"] = \"your_openai_api_key_here\"\n```\n\n## Usage\n```python\n%load_ext gpt\n%gpt \"Your request here\"\n```\n\n## Model\n\nThe current default is the gpt-3-turbo model, but can be changed using `OPENAI_MODEL` environmental variable. \n\nUsing GPT-4 example\n```python\nimport os\nos.environ[\"OPENAI_MODEL\"] = \"gpt-4\"\n```\n\n## Arguments\n\n### Chat\n\nYou can enable memory of all previous requests and responses with the `-c` argument. By default it's memory-less.\n\n```python\n%gpt -c \"Write a function which calculates the average of a numpy array\"\n```\n\n### Temperature\n\nYou can set the temperature with `-t` argument. The default is 0.\n\n```python\n\n%gpt -t 0.5 \"Write a function which calculates the average of a numpy array\"\n```\n\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 BIFF Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A Jupyter/IPython magic command for generating code using GPT.",
"version": "0.2.0",
"split_keywords": [
"jupyter",
"ipython",
"gpt",
"ai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "332fb1186ce87b8379a943589c31bad58aa1aafe5f382cfe89f942e4d012df98",
"md5": "a7668826598afb31c49dd942b380df8e",
"sha256": "03da0bccaef609f385a6075891e3ac9111f02edb56a7f1819c7448b80d5ca6ab"
},
"downloads": -1,
"filename": "gpt_magic-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a7668826598afb31c49dd942b380df8e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7397,
"upload_time": "2023-04-01T19:41:46",
"upload_time_iso_8601": "2023-04-01T19:41:46.634702Z",
"url": "https://files.pythonhosted.org/packages/33/2f/b1186ce87b8379a943589c31bad58aa1aafe5f382cfe89f942e4d012df98/gpt_magic-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6ea30e2b6e14c9ea0720552801fc5f692f293fb6b3b9b6c94b85f1fbb509f218",
"md5": "1409c7f1f95d133ec5920bbbcd758222",
"sha256": "6edb5fa416577e0d30444082a81a7eddb26f63766abc6c8c08d2f031b0bab311"
},
"downloads": -1,
"filename": "gpt-magic-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "1409c7f1f95d133ec5920bbbcd758222",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 7476,
"upload_time": "2023-04-01T19:41:49",
"upload_time_iso_8601": "2023-04-01T19:41:49.093539Z",
"url": "https://files.pythonhosted.org/packages/6e/a3/0e2b6e14c9ea0720552801fc5f692f293fb6b3b9b6c94b85f1fbb509f218/gpt-magic-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-01 19:41:49",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "gpt-magic"
}