<p align="center">
<a href="https://github.com/dsdanielpark/Co-Coder"><img src="./assets/cocoder_main2.jpg"></a>
</p>
<h3 align="center"> Your AI coding mate, Co-Coder. </h3>
<p align="center">
<a><img alt="PyPI package" src="https://img.shields.io/badge/pypi-CoCoder-black"></a>
<!-- <a href="https://pepy.tech/project/bardapi"><img alt="Downloads" src="https://pepy.tech/badge/bardapi"></a> -->
<a><img alt="commit update" src="https://img.shields.io/github/last-commit/dsdanielpark/Co-Coder?color=black"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-black.svg"></a>
<!-- <a href="https://pypi.org/project/cocoder/"><img alt="PyPI" src="https://img.shields.io/pypi/v/cocoder"></a>
<a href="https://www.buymeacoffee.com/parkminwoo"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" height="20px"></a> -->
<a href="https://github.com/dsdanielpark/Co-Coder"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdsdanielpark%2FCo-Coder&count_bg=%23000000&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=CoCoder&edge_flat=false"/></a>
</p>
Co-Coder is a Python package that streamlines error debugging from [Open AI chat GPT](https://openai.com/blog/chatgpt) and [Google Bard](https://bard.google.com/) by providing hints, example code, and relevant Stack Overflow links, all by simply importing it and setting the environment variable.
![](./assets/cocoder_230513.gif)
The Python package Co-Coder shows information about errors from [Open AI chat GPT](https://openai.com/blog/chatgpt) and [Google Bard](https://bard.google.com/). Right below the tracebacked error, you will receive information about the error, debugging hints, and example code. Also, you can use it by modifying the prompt appropriately. Co-Coder helps you automatically get information about errors without Googling or Searching StackOverflow. If you use OpenAI's chatGPT model, it also returns links to Stack Overflow related to the error.
The Co-Coder package is executed by simply importing Co-Coder at Python or IPython. Just setting the proper environment variable once.
<br>
## Install
The latest stable release (and required dependencies) can be installed from PyPI:
```
pip install cocoder
```
You may instead want to use the development version from Github:
```
pip install git+https://github.com/dsdanielpark/Co-Coder.git
```
<br>
## Tutorial
Tutorials for all features can be found in this [folder](./tutorials/). Examples have been prepared for all possible cases.
<br>
## Authentication
### Open AI
Visit [Open AI API](https://platform.openai.com/docs/introduction) for more information.
- Visit https://platform.openai.com/account/api-keys
- View API keys → + Create new secret key
### Google Bard
See the Python package [BardAPI](https://github.com/dsdanielpark/bardapi) for more information.
- Visit https://bard.google.com/
- F12 for console
- Session: Application → Cookies → Copy the value of __Secure-1PSID cookie.
<br>
# Ipython
### With [Open AI chat GPT](https://openai.com/blog/chatgpt)
- Supported Language: English
*English* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1i8PLhWY2YRIUtRV7Llf2dHn4x8RYmCYi/view?usp=share_link)
```python
import cocoder.ipython
import os
os.environ['_OPEN_AI_API'] = 'sk-xxxxxxxxxxx'
os.environ['_OPEN_AI_MODEL'] = "gpt-3.5-turbo"
# os.environ['_PROMPT_COMMAND'] = "You can make customized prompt in here."
print(1/0)
```
### With [Google Bard](https://bard.google.com/)
- Supported Language: Korean, English, Japanese
*English* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1vNrmxhNnfwbEPB2Qr-dkh9yWP4RuhehL/view?usp=sharing)
```python
import cocoder.ipython
import os
os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'
# os.environ['_PROMPT_COMMAND'] = "You can make customized prompt in here."
print(1/0)
```
*Korean* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1yZJKjkV3zQI-sJkS48PDpePqxoMMfYRA/view?usp=sharing)
```python
import cocoder.ipython
import os
os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'
os.environ["_BARD_ADVICE_LANG"]='ko'
# os.environ['_PROMPT_COMMAND'] = "You can make customized prompt in here."
print(1/0)
```
*Japanese* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/178mt8_kkBN4-z408No_4qW8XfCWSL-wh/view?usp=sharing)
```python
import cocoder.ipython
import os
os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'
os.environ["_BARD_ADVICE_LANG"]='jp'
# os.environ['_PROMPT_COMMAND'] = "You can make customized prompt in here."
print(1/0)
```
# Python
### With [Open AI chat GPT](https://openai.com/blog/chatgpt)
- Supported Language: English <br>
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1zh2tX0Xtq5YqrWgNiJ9nF1RmaJgAvQ8E/view?usp=sharing)
```python
from cocoder import ExceptPyCocoder
import os, sys
os.environ['_OPEN_AI_API'] = 'sk-xxxxxxxxxxx'
os.environ['_OPEN_AI_MODEL'] = "gpt-3.5-turbo"
# os.environ['_PROMPT_COMMAND'] = "You can make customized prompt in here."
sys.excepthook = ExceptPyCocoder.__call__
print(1/0)
```
### With [Google Bard](https://bard.google.com/)
- Supported Language: Korean, English, Japanese
*English* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1Ax3y7_2PgBsuK_d6z374vvYrmClSp7JX/view?usp=sharing)
```python
from cocoder import ExceptPyCocoder
import os, sys
os.environ['_BARD_API_KEY'] = 'xxxxxxx'
# os.environ["_BARD_ADVICE_LANG"]='ko','jp'
# os.environ['_PROMPT_COMMAND']="You can make customized prompt in here."
sys.excepthook = ExceptPyCocoder.__call__
print(1/0)
```
<br>
## Scripts
In the BardAPI scripts [folder](https://github.com/dsdanielpark/BARD_API/tree/main/scripts), I have released a script to help you compare [OpenAI-ChatGPT](https://github.com/dsdanielpark/BARD_API/blob/main/scripts/openai_api.ipynb) and [Google-Bard](https://github.com/dsdanielpark/BARD_API/blob/main/scripts/google_api.ipynb). I hope they will help more developers.
## License
- CoCoder: MIT <br>
Licenses apply the each [dependencies package](https://choosealicense.com/licenses/), and the created posts follow [CC BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/).
## Bugs and Issues
Sincerely grateful for any reports on new features or bugs. Your valuable feedback on the code is highly appreciated.
## Contacts
- Maintainer: [Daniel Park, South Korea](https://github.com/DSDanielPark) <br>
- E-mail: parkminwoo1991@gmail.com <br>
## Reference
[1] https://github.com/dsdanielpark/BARD_API <br>
[2] https://github.com/dsdanielpark/ExceptNotifier <br><br>
Development Status :: 3 - Alpha <br>
*Copyright (c) MinWoo Park 2023*
Raw data
{
"_id": null,
"home_page": "https://github.com/dsdanielpark/Co-Coder",
"name": "cocoder",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "Python Debuger,Python AI Debug,Realtime Debuger,Search,Find Debug Infomation,Bard,ChatGPT,GoogleBard,OpenAIchatGPT",
"author": "daniel park",
"author_email": "parkminwoo1991@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/53/73/75727064e7aa74e73138430da6a576f40bd6233c636574230cdcead798a5/cocoder-0.1.5.tar.gz",
"platform": null,
"description": "<p align=\"center\">\r\n<a href=\"https://github.com/dsdanielpark/Co-Coder\"><img src=\"./assets/cocoder_main2.jpg\"></a>\r\n</p>\r\n\r\n<h3 align=\"center\"> Your AI coding mate, Co-Coder. </h3>\r\n\r\n<p align=\"center\">\r\n<a><img alt=\"PyPI package\" src=\"https://img.shields.io/badge/pypi-CoCoder-black\"></a>\r\n<!-- <a href=\"https://pepy.tech/project/bardapi\"><img alt=\"Downloads\" src=\"https://pepy.tech/badge/bardapi\"></a> -->\r\n<a><img alt=\"commit update\" src=\"https://img.shields.io/github/last-commit/dsdanielpark/Co-Coder?color=black\"></a>\r\n<a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-black.svg\"></a>\r\n<!-- <a href=\"https://pypi.org/project/cocoder/\"><img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/cocoder\"></a>\r\n<a href=\"https://www.buymeacoffee.com/parkminwoo\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" height=\"20px\"></a> -->\r\n<a href=\"https://github.com/dsdanielpark/Co-Coder\"><img src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdsdanielpark%2FCo-Coder&count_bg=%23000000&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=CoCoder&edge_flat=false\"/></a>\r\n</p>\r\n\r\nCo-Coder is a Python package that streamlines error debugging from [Open AI chat GPT](https://openai.com/blog/chatgpt) and [Google Bard](https://bard.google.com/) by providing hints, example code, and relevant Stack Overflow links, all by simply importing it and setting the environment variable.\r\n\r\n![](./assets/cocoder_230513.gif)\r\n\r\nThe Python package Co-Coder shows information about errors from [Open AI chat GPT](https://openai.com/blog/chatgpt) and [Google Bard](https://bard.google.com/). Right below the tracebacked error, you will receive information about the error, debugging hints, and example code. Also, you can use it by modifying the prompt appropriately. Co-Coder helps you automatically get information about errors without Googling or Searching StackOverflow. If you use OpenAI's chatGPT model, it also returns links to Stack Overflow related to the error. \r\nThe Co-Coder package is executed by simply importing Co-Coder at Python or IPython. Just setting the proper environment variable once.\r\n\r\n<br>\r\n\r\n\r\n## Install \r\nThe latest stable release (and required dependencies) can be installed from PyPI:\r\n```\r\npip install cocoder\r\n```\r\nYou may instead want to use the development version from Github:\r\n```\r\npip install git+https://github.com/dsdanielpark/Co-Coder.git\r\n```\r\n\r\n<br>\r\n\r\n## Tutorial \r\nTutorials for all features can be found in this [folder](./tutorials/). Examples have been prepared for all possible cases.\r\n\r\n<br>\r\n\r\n## Authentication\r\n### Open AI\r\nVisit [Open AI API](https://platform.openai.com/docs/introduction) for more information.\r\n- Visit https://platform.openai.com/account/api-keys\r\n- View API keys \u2192 + Create new secret key\r\n\r\n### Google Bard \r\nSee the Python package [BardAPI](https://github.com/dsdanielpark/bardapi) for more information.\r\n- Visit https://bard.google.com/\r\n- F12 for console\r\n- Session: Application \u2192 Cookies \u2192 Copy the value of __Secure-1PSID cookie.\r\n\r\n<br>\r\n\r\n# Ipython\r\n\r\n### With [Open AI chat GPT](https://openai.com/blog/chatgpt)\r\n- Supported Language: English \r\n\r\n *English* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1i8PLhWY2YRIUtRV7Llf2dHn4x8RYmCYi/view?usp=share_link)\r\n ```python\r\n import cocoder.ipython\r\n import os\r\n os.environ['_OPEN_AI_API'] = 'sk-xxxxxxxxxxx'\r\n os.environ['_OPEN_AI_MODEL'] = \"gpt-3.5-turbo\" \r\n # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\r\n\r\n print(1/0)\r\n ```\r\n\r\n\r\n\r\n### With [Google Bard](https://bard.google.com/)\r\n- Supported Language: Korean, English, Japanese\r\n\r\n *English* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1vNrmxhNnfwbEPB2Qr-dkh9yWP4RuhehL/view?usp=sharing)\r\n\r\n ```python\r\n import cocoder.ipython\r\n import os\r\n os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'\r\n # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\r\n\r\n print(1/0)\r\n ```\r\n \r\n\r\n *Korean* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1yZJKjkV3zQI-sJkS48PDpePqxoMMfYRA/view?usp=sharing)\r\n ```python\r\n import cocoder.ipython\r\n import os\r\n os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'\r\n os.environ[\"_BARD_ADVICE_LANG\"]='ko'\r\n # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\r\n\r\n print(1/0)\r\n ```\r\n\r\n *Japanese* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/178mt8_kkBN4-z408No_4qW8XfCWSL-wh/view?usp=sharing)\r\n ```python\r\n import cocoder.ipython\r\n import os\r\n os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'\r\n os.environ[\"_BARD_ADVICE_LANG\"]='jp'\r\n # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\r\n\r\n print(1/0)\r\n ```\r\n\r\n\r\n# Python\r\n### With [Open AI chat GPT](https://openai.com/blog/chatgpt)\r\n- Supported Language: English <br>\r\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1zh2tX0Xtq5YqrWgNiJ9nF1RmaJgAvQ8E/view?usp=sharing)\r\n\r\n ```python\r\n from cocoder import ExceptPyCocoder\r\n import os, sys\r\n os.environ['_OPEN_AI_API'] = 'sk-xxxxxxxxxxx'\r\n os.environ['_OPEN_AI_MODEL'] = \"gpt-3.5-turbo\" \r\n # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\r\n\r\n sys.excepthook = ExceptPyCocoder.__call__\r\n print(1/0)\r\n ```\r\n\r\n### With [Google Bard](https://bard.google.com/)\r\n- Supported Language: Korean, English, Japanese\r\n\r\n *English* <br> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1Ax3y7_2PgBsuK_d6z374vvYrmClSp7JX/view?usp=sharing)\r\n ```python\r\n from cocoder import ExceptPyCocoder\r\n import os, sys\r\n os.environ['_BARD_API_KEY'] = 'xxxxxxx'\r\n # os.environ[\"_BARD_ADVICE_LANG\"]='ko','jp'\r\n # os.environ['_PROMPT_COMMAND']=\"You can make customized prompt in here.\"\r\n\r\n sys.excepthook = ExceptPyCocoder.__call__\r\n print(1/0)\r\n ```\r\n\r\n\r\n\r\n<br>\r\n\r\n## Scripts\r\nIn the BardAPI scripts [folder](https://github.com/dsdanielpark/BARD_API/tree/main/scripts), I have released a script to help you compare [OpenAI-ChatGPT](https://github.com/dsdanielpark/BARD_API/blob/main/scripts/openai_api.ipynb) and [Google-Bard](https://github.com/dsdanielpark/BARD_API/blob/main/scripts/google_api.ipynb). I hope they will help more developers.\r\n\r\n## License \r\n- CoCoder: MIT <br>\r\n\r\nLicenses apply the each [dependencies package](https://choosealicense.com/licenses/), and the created posts follow [CC BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/).\r\n\r\n## Bugs and Issues\r\nSincerely grateful for any reports on new features or bugs. Your valuable feedback on the code is highly appreciated.\r\n\r\n## Contacts\r\n- Maintainer: [Daniel Park, South Korea](https://github.com/DSDanielPark) <br>\r\n- E-mail: parkminwoo1991@gmail.com <br>\r\n\r\n## Reference \r\n[1] https://github.com/dsdanielpark/BARD_API <br>\r\n[2] https://github.com/dsdanielpark/ExceptNotifier <br><br>\r\n\r\nDevelopment Status :: 3 - Alpha <br>\r\n*Copyright (c) MinWoo Park 2023*\r\n\r\n",
"bugtrack_url": null,
"license": "",
"summary": "",
"version": "0.1.5",
"project_urls": {
"Homepage": "https://github.com/dsdanielpark/Co-Coder"
},
"split_keywords": [
"python debuger",
"python ai debug",
"realtime debuger",
"search",
"find debug infomation",
"bard",
"chatgpt",
"googlebard",
"openaichatgpt"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "23d0ef5ad06303368b16a289e0cce5ac200ea905b8bfe5e39aa017ccef6826cc",
"md5": "4c321640bee7f5a3fb3c7ad55203bedb",
"sha256": "e0d8895edc19aa7fbe97330d0ede11d2d60131fef982b92eb27cafeb0a952042"
},
"downloads": -1,
"filename": "cocoder-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4c321640bee7f5a3fb3c7ad55203bedb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 10417,
"upload_time": "2023-05-13T17:15:52",
"upload_time_iso_8601": "2023-05-13T17:15:52.980480Z",
"url": "https://files.pythonhosted.org/packages/23/d0/ef5ad06303368b16a289e0cce5ac200ea905b8bfe5e39aa017ccef6826cc/cocoder-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "537375727064e7aa74e73138430da6a576f40bd6233c636574230cdcead798a5",
"md5": "404efbb2cc1994260dcaf764f2d77c82",
"sha256": "e6641be1f1929eec4763fe7c9e2e27c79f3c3359e273770ac32891e2167b6a02"
},
"downloads": -1,
"filename": "cocoder-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "404efbb2cc1994260dcaf764f2d77c82",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 10614,
"upload_time": "2023-05-13T17:15:58",
"upload_time_iso_8601": "2023-05-13T17:15:58.510608Z",
"url": "https://files.pythonhosted.org/packages/53/73/75727064e7aa74e73138430da6a576f40bd6233c636574230cdcead798a5/cocoder-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-13 17:15:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dsdanielpark",
"github_project": "Co-Coder",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "openai",
"specs": [
[
"==",
"0.27.4"
]
]
},
{
"name": "docutils",
"specs": []
},
{
"name": "IPython",
"specs": []
},
{
"name": "bardapi",
"specs": []
}
],
"lcname": "cocoder"
}