Package: cocoder
Your AI coding mate, Co-Coder.Co-Coder is a Python package that streamlines error debugging fromOpen AI chat GPTandGoogle Bardby providing hints, example code, and relevant Stack Overflow links, all by simply importing it and setting the environment variable.The Python package Co-Coder shows information about errors fromOpen AI chat GPTandGoogle Bard. 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.InstallThe latest stable release (and required dependencies) can be installed from PyPI:pip install cocoderYou may instead want to use the development version from Github:pip install git+https://github.com/dsdanielpark/Co-Coder.gitTutorialTutorials for all features can be found in thisfolder. Examples have been prepared for all possible cases.AuthenticationOpen AIVisitOpen AI APIfor more information.Visithttps://platform.openai.com/account/api-keysView API keys → + Create new secret keyGoogle BardSee the Python packageBardAPIfor more information.Visithttps://bard.google.com/F12 for consoleSession: Application → Cookies → Copy the value of  __Secure-1PSID cookie.IpythonWithOpen AI chat GPTSupported Language: EnglishEnglishimportcocoder.ipythonimportosos.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)WithGoogle BardSupported Language: Korean, English, JapaneseEnglishimportcocoder.ipythonimportosos.environ['_BARD_API_KEY']='xxxxxxxxxxx'# os.environ['_PROMPT_COMMAND'] = "You can make customized prompt in here."print(1/0)Koreanimportcocoder.ipythonimportosos.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)Japaneseimportcocoder.ipythonimportosos.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)PythonWithOpen AI chat GPTSupported Language: EnglishfromcocoderimportExceptPyCocoderimportos,sysos.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)WithGoogle BardSupported Language: Korean, English, JapaneseEnglishfromcocoderimportExceptPyCocoderimportos,sysos.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)ScriptsIn the BardAPI scriptsfolder, I have released a script to help you compareOpenAI-ChatGPTandGoogle-Bard. I hope they will help more developers.LicenseCoCoder: MITLicenses apply the eachdependencies package, and the created posts followCC BY-NC-SA.Bugs and IssuesSincerely grateful for any reports on new features or bugs. Your valuable feedback on the code is highly appreciated.ContactsMaintainer:Daniel Park, South KoreaE-mail:parkminwoo1991@gmail.comReference[1]https://github.com/dsdanielpark/BARD_API[2]https://github.com/dsdanielpark/ExceptNotifierDevelopment Status :: 3 - AlphaCopyright (c) MinWoo Park 2023