Verified Owner
Top Fields Constructors Methods
org.jabref.logic.ai.tokenization.logic

public Class MinimumTokenEstimator

extends Object
implements TokenEstimator
Class Inheritance
All Implemented Interfaces
org.jabref.logic.ai.tokenization.logic.TokenEstimator
Imports
java.util.List, org.jabref.model.ai.chatting.ChatMessage, org.jabref.model.ai.tokenization.TokenEstimatorKind

Field Summary

Modifier and TypeField and Description
private final ByCharacterTokenEstimator
private final ByWordsTokenEstimator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int
calculate(int byWords, int byCharacters)

public int
public int
public TokenEstimatorKind
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

byCharacterTokenizerback to summary
private final ByCharacterTokenEstimator byCharacterTokenizer
byWordsTokenizerback to summary
private final ByWordsTokenEstimator byWordsTokenizer

Constructor Detail

MinimumTokenEstimatorback to summary
public MinimumTokenEstimator()

Method Detail

calculateback to summary
private int calculate(int byWords, int byCharacters)
estimateback to summary
public int estimate(ChatMessage.Role role, String content)

Implements org.jabref.logic.ai.tokenization.logic.TokenEstimator.estimate.

Annotations
@Override
estimateback to summary
public int estimate(List<ChatMessage> messages)

Implements org.jabref.logic.ai.tokenization.logic.TokenEstimator.estimate.

Annotations
@Override
getKindback to summary
public TokenEstimatorKind getKind()

Implements org.jabref.logic.ai.tokenization.logic.TokenEstimator.getKind.

Annotations
@Override