Closed behrica closed 1 year ago
In case of Azure, the exception has nil for (-> e ex-data)
so,
the construction of new ex-info
fails.
Thanks for debugging this.
See my commit, it should at least not crash on Azure error, but if you could provide the PR which extracts whatever is needed for ex-info
extra exception data map so that when re-thrown it is maximally informative.
We will in this point have exceptions from all type of LLMs. So we should make minimal assumptions what to get.
Looking at 7e4b23239e0b0e453c22e2d443aa4df6845a1523 I would have done the same, Assuming 2 cases, one with existing ex-data , one without.
To assume "more" then having a exception message might break other LLMs.
So I would consider this done.
see #37 It seems better then your attempt, as it keeps exception root case (java.net.Exception)
I hot-fixed a bit the code related to #30, and came to a point where it indeed tried a call to Azure, which (correctly) gave an exception :
This was wrongly handled here: https://github.com/zmedelis/bosquet/blob/95d410ae5db8e0b5d544b9f79e6cafabf9f01b7a/src/bosquet/llm/openai.clj#L79
therefore "hidden" and resulted in this exception:
So something goes wrong in the exception handling above. (L79)