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

public Class ByCharacterTokenEstimator

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

CHAR_FACTORback to summary
private static final float CHAR_FACTOR

Constructor Detail

ByCharacterTokenEstimatorback to summary
public ByCharacterTokenEstimator()

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