Package org.codelibs.fess.llm
Class LlmException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.codelibs.fess.exception.FessSystemException
org.codelibs.fess.llm.LlmException
- All Implemented Interfaces:
Serializable
Exception thrown when an error occurs during LLM operations.
- Author:
- FessProject
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringError code for authentication failure (HTTP 401/403).static final StringError code for connection errors.static final StringError code for context length exceeded.static final StringError code for invalid response from the LLM provider.static final StringError code for model not found.static final StringError code for rate limit (HTTP 429).static final StringError code for service unavailable (HTTP 502/503).static final StringError code for request timeout.static final StringError code for unknown errors. -
Constructor Summary
ConstructorsConstructorDescriptionLlmException(String message) Creates a new exception with the specified message.LlmException(String message, String errorCode) Creates a new exception with the specified message and error code.LlmException(String message, String errorCode, Throwable cause) Creates a new exception with the specified message, error code and cause.LlmException(String message, Throwable cause) Creates a new exception with the specified message and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ERROR_RATE_LIMIT
Error code for rate limit (HTTP 429).- See Also:
-
ERROR_AUTH
Error code for authentication failure (HTTP 401/403).- See Also:
-
ERROR_SERVICE_UNAVAILABLE
Error code for service unavailable (HTTP 502/503).- See Also:
-
ERROR_TIMEOUT
Error code for request timeout.- See Also:
-
ERROR_CONTEXT_LENGTH_EXCEEDED
Error code for context length exceeded.- See Also:
-
ERROR_MODEL_NOT_FOUND
Error code for model not found.- See Also:
-
ERROR_INVALID_RESPONSE
Error code for invalid response from the LLM provider.- See Also:
-
ERROR_CONNECTION
Error code for connection errors.- See Also:
-
ERROR_UNKNOWN
Error code for unknown errors.- See Also:
-
-
Constructor Details
-
LlmException
Creates a new exception with the specified message.- Parameters:
message- the error message
-
LlmException
Creates a new exception with the specified message and cause.- Parameters:
message- the error messagecause- the cause of the exception
-
LlmException
Creates a new exception with the specified message and error code.- Parameters:
message- the error messageerrorCode- the error code
-
LlmException
Creates a new exception with the specified message, error code and cause.- Parameters:
message- the error messageerrorCode- the error codecause- the cause of the exception
-
-
Method Details
-
getErrorCode
Gets the error code.- Returns:
- the error code
-