{"id":13641386,"url":"https://github.com/dsdanielpark/co-coder","last_synced_at":"2025-04-09T19:23:30.566Z","repository":{"id":164629689,"uuid":"639935248","full_name":"dsdanielpark/co-coder","owner":"dsdanielpark","description":"Co-Coder is a Python package that streamlines error debugging from Open AI chat GPT and Google Bard by providing hints, example code, and relevant Stack Overflow links.","archived":false,"fork":false,"pushed_at":"2023-05-22T11:08:13.000Z","size":20017,"stargazers_count":45,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T09:17:55.342Z","etag":null,"topics":["bard-api","chat-gpt","google","google-bard","interactive-python","ipython","large-language-models","openai-api","python-package"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/cocoder/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsdanielpark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-12T15:04:25.000Z","updated_at":"2025-04-01T16:55:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"c87f9908-481a-49d9-b50e-21269dad4f35","html_url":"https://github.com/dsdanielpark/co-coder","commit_stats":{"total_commits":77,"total_committers":2,"mean_commits":38.5,"dds":0.2727272727272727,"last_synced_commit":"71612567984bd5ac650eb9bb07c8db20d66acb64"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsdanielpark%2Fco-coder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsdanielpark%2Fco-coder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsdanielpark%2Fco-coder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsdanielpark%2Fco-coder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsdanielpark","download_url":"https://codeload.github.com/dsdanielpark/co-coder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248095987,"owners_count":21046959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bard-api","chat-gpt","google","google-bard","interactive-python","ipython","large-language-models","openai-api","python-package"],"created_at":"2024-08-02T01:01:20.313Z","updated_at":"2025-04-09T19:23:30.528Z","avatar_url":"https://github.com/dsdanielpark.png","language":"Jupyter Notebook","readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/dsdanielpark/Co-Coder\"\u003e\u003cimg src=\"./assets/cocoder_main2.jpg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e Your AI coding mate, Co-Coder. \u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca\u003e\u003cimg alt=\"PyPI package\" src=\"https://img.shields.io/badge/pypi-CoCoder-black\"\u003e\u003c/a\u003e\n\u003c!-- \u003ca href=\"https://pepy.tech/project/bardapi\"\u003e\u003cimg alt=\"Downloads\" src=\"https://pepy.tech/badge/bardapi\"\u003e\u003c/a\u003e --\u003e\n\u003c!-- \u003ca\u003e\u003cimg alt=\"commit update\" src=\"https://img.shields.io/github/last-commit/dsdanielpark/Co-Coder?color=black\"\u003e\u003c/a\u003e --\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-black.svg\"\u003e\u003c/a\u003e\n\u003c!-- \u003ca href=\"https://pypi.org/project/cocoder/\"\u003e\u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/cocoder\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.buymeacoffee.com/parkminwoo\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" height=\"20px\"\u003e\u003c/a\u003e --\u003e\n\u003ca href=\"https://github.com/dsdanielpark/Co-Coder\"\u003e\u003cimg src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdsdanielpark%2FCo-Coder\u0026count_bg=%23000000\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=CoCoder\u0026edge_flat=false\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\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.\n\n![](./assets/cocoder_230513.gif)\n\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. \nThe Co-Coder package is executed by simply importing Co-Coder at Python or IPython. Just setting the proper environment variable once.\n\n\u003cbr\u003e\n\n\n## Install \nThe latest stable release (and required dependencies) can be installed from PyPI:\n```\npip install cocoder\n```\nYou may instead want to use the development version from Github:\n```\npip install git+https://github.com/dsdanielpark/Co-Coder.git\n```\n\n\u003cbr\u003e\n\n## Tutorial \nTutorials for all features can be found in this [folder](./tutorials/). Examples have been prepared for all possible cases.\n\n\u003cbr\u003e\n\n## Authentication\n### Open AI\nVisit [Open AI API](https://platform.openai.com/docs/introduction) for more information.\n- Visit https://platform.openai.com/account/api-keys\n- View API keys → + Create new secret key\n\n### Google Bard  \nSee the Python package [BardAPI](https://github.com/dsdanielpark/Bard-API) for more information.\n- Visit https://bard.google.com/\n- F12 for console\n- Session: Application → Cookies → Copy the value of  __Secure-1PSID cookie.\n\n\u003cbr\u003e\n\n# Ipython\n\n### With [Open AI chat GPT](https://openai.com/blog/chatgpt)\n- Supported Language: English \n\n    *English* \u003cbr\u003e [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1i8PLhWY2YRIUtRV7Llf2dHn4x8RYmCYi/view?usp=share_link)\n    ```python\n    import cocoder.ipython\n    import os\n    os.environ['_OPEN_AI_API'] = 'sk-xxxxxxxxxxx'\n    os.environ['_OPEN_AI_MODEL'] = \"gpt-3.5-turbo\" \n    # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\n\n    print(1/0)\n    ```\n\n\n\n### With [Google Bard](https://bard.google.com/)\n- Supported Language: Korean, English, Japanese\n\n    *English* \u003cbr\u003e [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1vNrmxhNnfwbEPB2Qr-dkh9yWP4RuhehL/view?usp=sharing)\n\n    ```python\n    import cocoder.ipython\n    import os\n    os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'\n    # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\n\n    print(1/0)\n    ```\n    \n\n    *Korean* \u003cbr\u003e [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1yZJKjkV3zQI-sJkS48PDpePqxoMMfYRA/view?usp=sharing)\n    ```python\n    import cocoder.ipython\n    import os\n    os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'\n    os.environ[\"_BARD_ADVICE_LANG\"]='ko'\n    # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\n\n    print(1/0)\n    ```\n\n    *Japanese* \u003cbr\u003e [![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)\n    ```python\n    import cocoder.ipython\n    import os\n    os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'\n    os.environ[\"_BARD_ADVICE_LANG\"]='jp'\n    # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\n\n    print(1/0)\n    ```\n    \n    *Other languages* \u003cbr\u003e\n    The bardapi package, starting from version 0.1.11 github dev version, utilizes the translation feature from the Python package called [deep-translator](https://pypi.org/project/deep-translator/). This allows users to receive debugging assistance in various languages, which can be helpful for students or beginners in Python. It provides a small but valuable aid to overcome language barriers and understand error messages in different languages, enabling users to find solutions. This update opens up opportunities for more people to start programming and receive support in problem-solving. \n    ```python\n    import cocoder.ipython\n    import os\n    os.environ['_BARD_API_KEY'] = 'xxxxxxxxxxx'\n    os.environ[\"_BARD_ADVICE_LANG\"]='arabic'\n    # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\n\n    print(1/0)\n    ```\n    \n\n\n# Python\n### With [Open AI chat GPT](https://openai.com/blog/chatgpt)\n- Supported Language: English \u003cbr\u003e\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1zh2tX0Xtq5YqrWgNiJ9nF1RmaJgAvQ8E/view?usp=sharing)\n\n    ```python\n    from cocoder import ExceptPyCocoder\n    import os, sys\n    os.environ['_OPEN_AI_API'] = 'sk-xxxxxxxxxxx'\n    os.environ['_OPEN_AI_MODEL'] = \"gpt-3.5-turbo\" \n    # os.environ['_PROMPT_COMMAND'] = \"You can make customized prompt in here.\"\n\n    sys.excepthook = ExceptPyCocoder()\n    print(1/0)\n    ```\n\n### With [Google Bard](https://bard.google.com/)\n- Supported Language: Korean, English, Japanese\n\n    *English* \u003cbr\u003e [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://drive.google.com/file/d/1Ax3y7_2PgBsuK_d6z374vvYrmClSp7JX/view?usp=sharing)\n    ```python\n    from cocoder import ExceptPyCocoder\n    import os, sys\n    os.environ['_BARD_API_KEY'] = 'xxxxxxx'\n    # os.environ[\"_BARD_ADVICE_LANG\"]='ko','jp','arabic' etc.\n    # os.environ['_PROMPT_COMMAND']=\"You can make customized prompt in here.\"\n\n    sys.excepthook = ExceptPyCocoder()\n    print(1/0)\n    ```\n\n\n\n\u003cbr\u003e\n\n## Scripts\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.\n\n## License \n- CoCoder: MIT \u003cbr\u003e\n\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/).\n\n## Bugs and Issues\nSincerely grateful for any reports on new features or bugs. Your valuable feedback on the code is highly appreciated.\n\n## Contacts\n- Maintainer: [Daniel Park, South Korea](https://github.com/DSDanielPark) \u003cbr\u003e\n- E-mail: parkminwoo1991@gmail.com \u003cbr\u003e\n\n## Reference \n[1] https://github.com/dsdanielpark/Bard-API \u003cbr\u003e\n[2] https://github.com/dsdanielpark/ExceptNotifier \u003cbr\u003e\u003cbr\u003e\n\nDevelopment Status :: 3 - Alpha \u003cbr\u003e\n*Copyright (c) MinWoo Park 2023*\n\n","funding_links":["https://www.buymeacoffee.com/parkminwoo"],"categories":["Jupyter Notebook"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsdanielpark%2Fco-coder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsdanielpark%2Fco-coder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsdanielpark%2Fco-coder/lists"}