Class GPTException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.composum.ai.backend.base.service.GPTException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GPTException.GPTContextLengthExceededException
,GPTException.GPTRetryableResponseErrorException
,GPTException.GPTUserNotificationException
public class GPTException extends RuntimeException
Any kind of error when accessing GPT.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GPTException.GPTContextLengthExceededException
{ "error": { "message": "This model's maximum context length is 4097 tokens.
static class
GPTException.GPTRetryableResponseErrorException
An exception that is thrown when the response from the GPT service is not as expected.static class
GPTException.GPTUserNotificationException
A special exception if the user should be notified about something instead of completing the task.
-
Constructor Summary
Constructors Constructor Description GPTException(String message)
GPTException(String message, Throwable cause)
GPTException(Throwable cause)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GPTException
buildException(Integer errorStatusCode, String result)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-