feat: Implement tokenizer resolver and fallback tokenizer; update model profiles and README
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package de.extio.lmlib.token;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
@@ -12,6 +11,8 @@ import de.extio.lmlib.profile.ModelProfile;
|
||||
|
||||
final class LlamaServerTokenizer implements Tokenizer {
|
||||
|
||||
static final String NAME = "llamaServer";
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(LlamaServerTokenizer.class);
|
||||
|
||||
private final RestClient.Builder restClientBuilder;
|
||||
@@ -20,6 +21,11 @@ final class LlamaServerTokenizer implements Tokenizer {
|
||||
this.restClientBuilder = restClientBuilder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> tokenize(final String txt, final ModelProfile modelProfile) {
|
||||
LOGGER.debug("Requesting tokenizing");
|
||||
|
||||
Reference in New Issue
Block a user