Skip to main content

No project description provided

Project description

Development Status :: 3 - Alpha
Copyright (c) MinWoo Park 2023

Co-Coder

PyPI package PyPI commit update Code style: black

This package is compatible with both Python and iPython. It enhances traceback error messages by appending hints and example codes related to the error. Prompt engineering allows you to get the answers you need quickly. With a one-time setup, you can receive debugging hints for multiple errors, saving time you would have spent searching on StackOverflow or Googling.


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

Tutorial

Tutorials for all features can be found in this folder. Examples have been prepared for all possible cases.


Authentication

Open AI

Visit Open AI API for more information.

Google Bard

See the Python package BardAPI for more information.

  • Visit https://bard.google.com/
  • F12 for console
  • Session: Application → Cookies → Copy the value of __Secure-1PSID cookie.

Ipython

With Open AI chat GPT

  • Supported Language: English

    English
    Open In Colab

    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

  • Supported Language: Korean, English, Japanese

    English
    Open In Colab

    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
    Open In Colab

    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
    Open In Colab

    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

  • Supported Language: English
    Open In Colab

    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

  • Supported Language: Korean, English, Japanese

    English
    Open In Colab

    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)
    

Scripts

In the BardAPI scripts folder, I have released a script to help you compare OpenAI-ChatGPT and Google-Bard. I hope they will help more developers.

License

CoCoder: MIT
Licenses apply the each dependencies package, and the created posts follow CC BY-NC-SA.

Bugs and Issues

Sincerely grateful for any reports on new features or bugs. Your valuable feedback on the code is highly appreciated.

Contacts

:envelope: Core maintainer: Daniel Park, South Korea
:envelope: E-mail: parkminwoo1991@gmail.com

Reference

[1] https://github.com/dsdanielpark/BARD_API
[2] https://github.com/dsdanielpark/ExceptNotifier

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cocoder-0.1.4.tar.gz (10.2 kB view hashes)

Uploaded Source

Built Distribution

cocoder-0.1.4-py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page