java.lang.Object
org.nasdanika.ai.ChunkingEmbeddings<char[]>
org.nasdanika.ai.CharChunkingEmbeddings
- All Implemented Interfaces:
Coordinates,Embeddings,Model
A simple implementation which treats a character as a token.
Can be used for testing and when an encoder is unknown or not available.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.nasdanika.ai.Embeddings
Embeddings.Requirement -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.nasdanika.ai.ChunkingEmbeddings
chunk, generate, generateAsync, getDimensions, getMaxInputTokens, getName, getProvider, getVersion, isTooLongMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nasdanika.ai.Embeddings
generate, generateAsync
-
Constructor Details
-
CharChunkingEmbeddings
-
-
Method Details
-
encode
Description copied from class:ChunkingEmbeddingsEncodes a string into tokens- Specified by:
encodein classChunkingEmbeddings<char[]>- Returns:
-
decode
Description copied from class:ChunkingEmbeddingsDecodes a string from an array of tokens- Specified by:
decodein classChunkingEmbeddings<char[]>- Returns:
-
size
- Specified by:
sizein classChunkingEmbeddings<char[]>
-
slice
- Specified by:
slicein classChunkingEmbeddings<char[]>
-