neulab / prompt2model

prompt2model - Generate Deployable Models from Natural Language Instructions
Apache License 2.0
1.95k stars 173 forks source link

Refactor OpenAI exception handling from instruction parser #328

Closed saum7800 closed 1 year ago

saum7800 commented 1 year ago

Description

Currently the OpenAIInstructionParser handles OpenAI exceptions from its own class. With this change, the exception is handled as required directly from the ChatGPTAgent. Refactoring the exception handling is a step in the direction of converting the OpenAIInstructionParser to a more general InstructionParser class that can be passed any Generative Agent (OpenAI, cohere, local hf models, etc).

Key Changes

krrishdholakia commented 1 year ago

oh - what was the breaking change? Happy to take a look as well @neubig

neubig commented 1 year ago

No worries @krrishdholakia , probably just a minor conflict: https://github.com/neulab/prompt2model/pull/328/conflicts

saum7800 commented 1 year ago

ah yes, just a minor conflict, will update my PR

krrishdholakia commented 1 year ago

Ok, sounds good. Thanks for the merge!

saum7800 commented 1 year ago

Updated the PR. Feel free to review whenever you get a chance @viswavi / @neubig