In the PromptParser, if we reach max_api_calls because of API errors, we are raising a ValueError but if we reach max_api_calls because of unsuccessful extraction, we are logging a warning and returning None. We should have consistent behaviour if we cant parse a prompt (I think the right response is to raise a ValueError in both cases).
Should be a very small change, once we decide what the behaviour should be. Any thoughts on what the behaviour should be @neubig / @viswavi ?
Hi @saum7800, I think that in general we should try to raise exceptions when something broke, so raising a ValueError (or actually maybe RuntimeError is better) seems to be preferable to me.
In the PromptParser, if we reach
max_api_calls
because of API errors, we are raising aValueError
but if we reachmax_api_calls
because of unsuccessful extraction, we are logging a warning and returning None. We should have consistent behaviour if we cant parse a prompt (I think the right response is to raise aValueError
in both cases).Should be a very small change, once we decide what the behaviour should be. Any thoughts on what the behaviour should be @neubig / @viswavi ?