Verified Owner
Top Description Fields Constructors Methods
org.jabref.model.ai.tokenization

public final Enum TokenEstimatorKind

extends Enum<TokenEstimatorKind>
Class Inheritance
Imports
org.jabref.model.ai.AiDefaultEnums

Idea taken from: https://community.openai.com/t/what-is-the-openai-algorithm-to-calculate-tokens/58237/4.

Field Summary

Modifier and TypeField and Description
public static final TokenEstimatorKind
public static final TokenEstimatorKind
CHARS

4 characters = 1 token.

public static final TokenEstimatorKind
public static final TokenEstimatorKind
public static final TokenEstimatorKind
WORDS

0.75 words = 1 token.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TokenEstimatorKind
public static TokenEstimatorKind
public static TokenEstimatorKind[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AVERAGEback to summary
public static final TokenEstimatorKind AVERAGE

Average between TokenEstimatorKind#WORDS and TokenEstimatorKind#CHARS.

CHARSback to summary
public static final TokenEstimatorKind CHARS

4 characters = 1 token.

MAXback to summary
public static final TokenEstimatorKind MAX

Maximum between TokenEstimatorKind#WORDS and TokenEstimatorKind#CHARS.

MINback to summary
public static final TokenEstimatorKind MIN

Minimum between TokenEstimatorKind#WORDS and TokenEstimatorKind#CHARS.

WORDSback to summary
public static final TokenEstimatorKind WORDS

0.75 words = 1 token.

Constructor Detail

TokenEstimatorKindback to summary
private TokenEstimatorKind()

Method Detail

safeValueOfback to summary
public static TokenEstimatorKind safeValueOf(String name)
valueOfback to summary
public static TokenEstimatorKind valueOf(String name)
valuesback to summary
public static TokenEstimatorKind[] values()