Open InAnYan opened 5 months ago
That's so awful. All errors are RuntimeError
s and I can't understand what errors can be.
I guess for now let's focus on two cases: 1) No internet 2) Wrong token 3) No money 4) Message is too large
Umm, I can't find those errors)
☠️
Low prio for now.
Problems with errors:
1) There are no unified error types or classes from langchain4j
. Every library, every AI provider has its own exceptions, that are extended from or wrapped into the RuntimeException
2) Some AI libraries don't even differentiate errors, and they just put JSON payload from server response into a general error type
Is your suggestion for improvement related to a problem? Please describe. In case of any errors while chatting with AI,
langchain4j
will throw a kind ofRuntimeError
.Currently, the JabRef presents user a raw error message, that is too scary for user.
Describe the solution you'd like Check the kind of error and provide user with a clear, simple, and internationalized message.
Additional context An example, if user has entered a wrong OpenAI API token: