Package com.tnsai.memory.advanced
Class EmbeddingDimensionMismatchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
com.tnsai.memory.advanced.EmbeddingDimensionMismatchException
- All Implemented Interfaces:
Serializable
Raised when an embedding vector does not match the dimension of its target.
The exception exposes both dimensions so callers can distinguish a configuration error from an embedding-provider failure without parsing the message.
- Since:
- 0.14.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmbeddingDimensionMismatchException(int expectedDimension, int actualDimension) Creates a dimension mismatch failure. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the dimension supplied by the caller or provider.intReturns the dimension required by the target.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EmbeddingDimensionMismatchException
public EmbeddingDimensionMismatchException(int expectedDimension, int actualDimension) Creates a dimension mismatch failure.- Parameters:
expectedDimension- required embedding dimensionactualDimension- received embedding dimension
-
-
Method Details
-
expectedDimension
public int expectedDimension()Returns the dimension required by the target.- Returns:
- required embedding dimension
-
actualDimension
public int actualDimension()Returns the dimension supplied by the caller or provider.- Returns:
- received embedding dimension
-