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

public Class ByWordsTokenEstimator

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

Field Summary

Modifier and TypeField and Description
private static final float

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int
calculate(String content)

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

Field Detail

WORD_FACTORback to summary
private static final float WORD_FACTOR

Constructor Detail

ByWordsTokenEstimatorback to summary
public ByWordsTokenEstimator()

Method Detail

calculateback to summary
private int calculate(String content)
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